This tutorial shows how to create a map using ROS nodes. The other variant (todo: add link) is first creating dump files, and then uses the dump files to create a map.
By using ROS nodes, we can easily create a map in an online fashion, that is, creating a map live while the robot is collecting data. However since this has to run at realtime (or at least at a fixed frame rate, when using bag files), this method will inevitably drop sensor data if the data procession is too slow.
For the example below, we are using a bag file, instead of live data. Depending on your hardware, you might want to slow down the playback speed, and/or use the “-shrink” and “-skip” command line options to reduce the required computation power.
Use the thin_scan_matcher to provide odometry by using the laser range finder.
Start the odom_tf_publisher.
The actual mapper node.
-t /calib_camera_front/depth/image_raw \
-t /calib_camera_left/depth/image_raw \
-t /calib_camera_right/depth/image_raw \
-base_link_frame_id base_link -shrink 2 -skip 2 -max_distance 3.5 \
Camera calibration, one node for each camera:
Playing form the bag file