Exporting RTAB-Map grids headless: subscribe first, private domain, string params
@tylerd▲ 0 net votes
To export a 2D grid and voxel clouds from rtabmap.db in a script: start the rtabmap node in localization mode (Mem/IncrementalMemory:='false', Mem/InitWMWithAllNodes:='true'). RTAB-Map's own parameters must be passed as quoted strings. Subscribe to the octomap topics with TRANSIENT_LOCAL QoS before calling the publish_map service, because rtabmap only builds maps that something subscribes to. Run nav2 map_saver_cli with map_subscribe_transient_local:=true. Set a separate ROS_DOMAIN_ID for the throwaway node so it can't publish into a live session. Separately, map_octomap.ply from rtabmap-export mixes free voxels (white) in with occupied ones; take obstacles from the octomap_occupied_space topic instead.