ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to create SLAM gmapping bag from other version of logged data

asked 2013-08-01 17:50:24 -0600

clonzz gravatar image

updated 2014-01-28 17:05:11 -0600

ngrennan gravatar image


I am a total beginner with ROS. I am using LabVIEW to control my robot. Currently I have the odometry and Kinect data (Laser-like) and will be able to store it in a .txt file. I can store it in the form of something like this:

[Time] [Robot Pose] [Scanned object]

If I managed to get something like this on the .txt file, how do I transform it into a .bag file for use with the gmapping algorithm (offline mode)?

Alternatively, can I use the ROS toolkit for LabVIEW to feed data to the ROS's gmapping in runtime or create a bag?

Any help is much appreciated.

edit retag flag offensive close merge delete


I tried to view the text version of the .bag file using gedit but it is not possible. Is there any way to view it in text form instead of graphically?

clonzz gravatar image clonzz  ( 2013-08-01 17:53:08 -0600 )edit

ROS itself is a control framework. Why you are using labView?

RB gravatar image RB  ( 2013-10-28 19:21:55 -0600 )edit

It is National Instruments robot and uses Labview Operating System. So, Linux (and ROS) is not available. All the data is transfered to a PC for data processing and to run Slam_gmapping.

clonzz gravatar image clonzz  ( 2013-10-29 02:58:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-02 13:28:49 -0600

Zee-Q gravatar image

updated 2013-08-12 21:49:04 -0600


Once you play your rosbag file you can subscribe to the topics for example /odom /scan /tf in your case and save the desired data in file. you have to go through these tutorials to see how to subscribe any topic rest is writing to a file.

I dont have any experience with Ros toolkit for Labview. What i understand that you have laser scan and odometry in Lab view and you want to run gmapping on that data.

  1. you can re write gmapping in windows plateform by seeing the paper and source code of it that will be a lengthy and tiring process.
  2. Write your own nodes which publishes the /scan /odom and /tf data and feed it to gmapping. The data to publish on these topics can be acquired from lab view written files in offline mode or you can write client/server application to send that data from labview in windows to Ros nodes in linux in online mode.

Edit 1:

Yes its possible to get the map data. you can see Map message here and figure how it looks from inside. Each time this message publishes 16MB of data. you can reduce the size of data by altering the size of environment in Slamgmapping code. you can subscribe to the /map Topic and store that data and feed it to Labview. Is it fast enough? it depends how you handle it but that wont be a problem i think.

edit flag offensive delete link more


I prefer the second method since the first may be a lengthy process. Is it possible to get back the runtime map data (in matrix form) instead of viewing it using rviz. I want to display the map in Labview and be able to modify it to my application. If it is possible, how large is the data in each tranmission and is it fast enough for online mode?

clonzz gravatar image clonzz  ( 2013-08-06 06:16:43 -0600 )edit

Question Tools



Asked: 2013-08-01 17:50:24 -0600

Seen: 1,025 times

Last updated: Aug 12 '13