Hi,
Look at this
paper (Section 3.4):
Loop closure detection is done using the bag-of-words approach described in [Labbé and Michaud, 2013]. Basically, when creating a new node, STM extracts visual features from the RGB image and quantizes them to an incremental visual word vocabulary.
[...]
When a loop closure hypothesis reaches the fixed threshold “Rtabmap/LoopThr”,a loop closure is detected and transformation is computed. The transformation is computed using the same Motion Estimation approach used by visual odometry (Section 3.1.1), and if accepted, the new link is added to the graph. When a laser scan or a point cloud is available, link’s transformation is refined using the same ICP Registration approach than with lidar odometry (described in Section 3.1.2).
In localization mode, we do exactly the same as loop closure detection, but without adding a new constraint to graph, just correcting the current pose.
cheers,
Mathieu