Re: How to Avoid Collision (Obstacle) while navigating using rtabmap_ros and navigation stack

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/How-to-Avoid-Collision-Obstacle-while-navigating-using-rtabmap-ros-and-navigation-stack-tp6309p6319.html

You can save the map just before closing rtabmap after mapping, or re-launch in localization mode (make sure RGBD/SavedLocalizationIgnored is false so that the map is loaded on start) then do (adjust map topic name if not /map):
$ rosrun map_server map_saver map:=/map
[ INFO] [1570502875.518163666]: Waiting for the map
[ INFO] [1570502875.723854641]: Received a 421 X 421 map @ 0.050 m/pix
[ INFO] [1570502875.723896028]: Writing map occupancy data to map.pgm
[ INFO] [1570502875.727056048, 50.102000000]: Writing map occupancy data to map.yaml
[ INFO] [1570502875.727141205, 50.102000000]: Done

The map is saved in the directory you launched map_saver.

The map.yaml:
image: map.pgm
resolution: 0.050000
origin: [-10.525000, -10.525000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196