Re: Best Practices for Quick Automatic Localization
Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Best-Practices-for-Quick-Automatic-Localization-tp6881p6890.html
Hi,
When reloading a database in localization mode (Mem/IncrementalMemory=false):
A) Normally with the default parameters, the robot will think that it is restarting where it has shutdown, proximity detection would work already without having to find a visual loop closure.
B) If we set RGBD/SavedLocalizationIgnored to true, the robot will think it is restarting from the origin of the map (note that older versions, the robot will not be localized at origin with this option, a loop closure is required).
C) If the robot didn't restart at its last position and not from the origin of the map, the robot would localize only with visual loop closures. It is possible to manually give an estimate pose in the map with the "2D Pose Estimate" button in rviz (assuming the button publishes on /rtabmap/initialpose).
For your comments:
1-2. If the robot starts always in front of a visually discriminative area, it would localize on start. They robot could rotate on place slowly or rotate/stop/rotate/stop (to avoid motion blur) on start to see around, assuming that the robot is starting somewhere inside the map. Other approach is to use an apriltag for localization. Apriltags can be mapped and saved in the map, then on localization, the robot will instantaneously localize on.
3. If you look at the /rtabmap/info topic, loopClosureId will be not null when the robot just localized.
As a side note, if you restart in SLAM mode from a previous database and don't want to start a new map before it has been localized on the previous one, we can set Rtabmap/StartNewMapOnLoopClosure to true.