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

Displaying hector mapping bag file

asked 2013-04-25 12:31:49 -0500

Rudolf gravatar image

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:

Unfortunately it doesn't seem like we can just run gmapping on the data from hector_slam.

This is what we are running:


<node pkg="sicktoolbox_wrapper" type="sicklms" name="sicklms" >
    <param name="baud" value="38400" />
    <param name="port" value="/dev/ttyUSB0"/>

<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 pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100" />


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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-26 04:26:15 -0500

dornhege gravatar image

Your are mainly missing the tf data, so add /tf to the recordings. gmapping will need odometry, if you want to use hector_mapping's SLAM pose as odometry for gmapping the tf_remap tool might help.

edit flag offensive delete link more

Question Tools


Asked: 2013-04-25 12:31:49 -0500

Seen: 650 times

Last updated: Apr 26 '13