Hi,
When editing the 2D map in DatabaseViewer, the resulting edited map will be available only in localization mode afterwards in rtabmap_ros. If you restart in SLAM mode, the map will be regenerated.
Here is an example with this
demo. Make a map:
roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false
rosbag play --clock demo_mapping.bag
Close rtabmap and open the database in rtabmap-databaseViewer:
rtabmap-databaseViewer ~/.ros/rtabmap.db
Do File->Edit optimized 2D map... and add obstacles (here I've written "OBSTACLE" in the editor). Close and say No for the question about cropping all scans. Close databaseViewer and relaunch in localization mode:
roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false localization:=true
rosbag play --clock demo_mapping.bag
Regards,
Mathieu