Support proximity detection when switching back to mapping mode #1644
+48
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new way to automatically merge sessions when we switch from mapping mode to localization mode online. Related to #1635
Original behavior:
Problem:
Solution:
RGBD/ProximityMaxGraphDepthparameterResults:
RGBD/MaxOdomCacheSize) and the map, proximity detection can be done between the new map nodes towards to "closest" nodes in the previous map based onRGBD/ProximityMaxGraphDepthand the constraints in odometry cache.RGBD/ProximityMaxGraphDepthis disabled (set to 0).Here a sequence of switching between mapping and localization modes using only lidar-based mapping (no visual loop closures possible), showing that as long as the robot is already localized in the map, it can now find proximity detections with the old map when switching from localization to mapping modes.
Peek.2026-01-24.17-24.mp4
Here is a case when we switch to mapping mode while the robot cannot localize in the previous map, it depletes the odometry cache and optimizes its own map before localizing in the old one. In this case, without a camera, we cannot automatically merge the new session with the old one, one would have to do it manually with
rtabmap-databaseViewer.Peek.2026-01-24.17-26.mp4