How to build a Map Using Logged Data
Description: This tutorial shows you how to create a 2-D map from logged transform and laser scan data.Tutorial Level: BEGINNER
Contents
Building a map
1. Make sure you have installed hector_slam correctly. Build the whole stack:
rosmake hector_slam
2. Get a bagfile to work with. For this tutorial, we will use the RoboCup 2011 Rescue Arena bagfile we recorded with a handheld mapping system. Download it to the current directory using wget:
wget http://tu-darmstadt-ros-pkg.googlecode.com/files/Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag
You can also try the other bagfiles we provide here: http://code.google.com/p/tu-darmstadt-ros-pkg/downloads/list
3. Start the hector_slam system:
roslaunch hector_slam_launch tutorial.launch
This launch file starts the hector_mapping node as well as the hector_trajectory_server and hector_geotiff nodes needed for generating geotiff maps.
4. Open another terminal. Type
rosbag play Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag --clock
You should now see the mapping process in realtime in rviz.
Generating a GeoTiff map
1. To save a geotiff file at any time during the mapping process type:
rostopic pub syscommand std_msgs/String "savegeotiff"
2. By default, geotiff maps are saved to the 'hector_slam/hector_geotiff/maps' directory. You should find both a .tif file containing the image data and a .tfw file containing the georeference information there. The creation time is appended to the map base name for both files.






