Hello derwee,
Localization mode can be triggered anytime (can be before or after loading a pre-built map, or after mapping in the same session). Note sure about your 3, but when a loop closure is found with a location in any of maps contained in the loaded database, the kinect is aligned to this location. In mapping mode, the both maps would be merged together. In localization mode, the kinect is now in the same referential than the map. It may drift over time if no other loop closures are detected.
Do you have three maps in separated databases? or in the same? But yes, the comparison is done in the core, so you don't need rtabmap GUI. If in your program you don't use threading, you can call
Rtabmap::getLoopClosureId() after
Rtabmap::process() to know if a match occurred (when returned id > 0). If you are using RtabmapThread, the event RtabmapEvent
is posted after processing data and if there is a loop closure, it is saved in the Statistics::kLoopAccepted_hypothesis_id() key of the Statistics object contained in the event.
cheers