Created map by using hector_slam - GigaFlopsis/rc_car_ros GitHub Wiki
Hector_map is a SLAM approach that can be used without odometry as well as on platforms that exhibit roll/pitch motion (of the sensor, the platform or both).
1. Set up hector param located this file:
rosed rc_bringup mapping_default.launch
Description of the parameters are on the official page
2. To created a map, you need to run:
roslaunch rc_bringup create_map.launch
This is .launch file includes rc_remote, tf and hector settings.
Moving through the room via remote control to create a map.
If you open rviz you will see a map
3. Save map
When you are satisfied with the map, run the following command of map_server:
rosrun map_server map_saver [-f mapname]
map_saver retrieves map data and writes it out to map.pgm and map.yaml. Use the -f option to provide a different base name for the output files.
Example
rosrun map_server map_saver -f mymap
4. Add created map to launch
Set the path in the desired map to the file: rc_car_ros/rc_bringup/launch/bringup.launch
like this
<arg name="map_file" default="$(find rc_bringup)/map/laba.yaml"/>
