0
$\begingroup$

Rosanswers logo

We have a large facility I want to map in stages. I've already created a decent map of a large portion of the facility but need to add additional rooms/corridors. I am able to continue mapping by starting on the existing map in localization mode, going to where I want to extend the map, setting rtabmap to mapping mode, and then going into the unknown (as recommended for multi-session mapping). This works but after a little while the occupancy grid map published on /rtabmap/grid_map is replaced by a new map that only shows the newly explored area. I understand from reading in the rtabmap forum that this is expected, and that the old map may reappear on that topic when the robot is back in that old area and a loop closure is detected. But I still need the complete map for navigation.

Is there a way to ask rtabmap to publish the global, merged 2D map during localization mode? Alternatively, is there a way to export the merged 2D map? I figured out how to export each individual map using rtabmap-databaseViewer (select the right node in the graph view (this step wasn't obvious) > Regenerate optimized 2D map > Export optimized 2D map). So that's a starts, but these maps come without a yaml file containing the origin, so it's not clear how to align them for manual merging.


Originally posted by chfritz on ROS Answers with karma: 553 on 2020-10-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

While Miura's answer wasn't a solution per-se it pointed me in the right direction (thanks!).

I just found out that if you make this call:

rosservice call /rtabmap/publish_map true false false

rtabmap will successively publish all local maps on the above topic (including headers with origin), hence giving me a chance to capture them, merge them, and republish in merged form using map_server or similar. This is still not the ideal solution but to anyone facing the same issue it gets one unblocked.


Originally posted by chfritz with karma: 553 on 2020-10-24

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.