Displaying hector mapping bag file
My group and I are still pretty new to all of this. Right now we are using hector_mapping and carrying the LIDAR around. We see the map being built properly. We want to start playing with navigation and because we don't have a physical robot to drive around with we'd like to work from bag files. Right now that means just recording a bag and playing it back.
We found this tutorial: http://www.ros.org/wiki/slam_gmapping/Tutorials/MappingFromLoggedData
Unfortunately it doesn't seem like we can just run gmapping on the data from hector_slam.
This is what we are running:
<launch>
<node pkg="sicktoolbox_wrapper" type="sicklms" name="sicklms" >
<param name="baud" value="38400" />
<param name="port" value="/dev/ttyUSB0"/>
</node>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
</node>
<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100" />
</launch>
We tried just recording the scan data:
rosbag record -O myscandata /scan
And then running the launch file above without the LIDAR running, but that doesn't seem to work. The bag file is pretty much empty. What do we need to do to just record the LIDAR data and apply hector_slam to the recorded data? There is a hector slam tutorial on building a map from logged data but it only works when playing from an existing bag file that they provide.
As a bonus it would be nice to know what we need to record from the hector_mapping to then just play it back with gmapping. I would think this is possible because the inferred odometry data is also published when running hector_mapping.