Re: Loop closure detection tuning

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Loop-closure-detection-tuning-tp3297p3300.html

Hi Chris,

Keep Mem/STMSize small (e.g., 10-20), it is only used avoid linking with just seen images.

Some descriptions of the proximity parameters:
$ rosrun rtabmap_ros rtabmap --params | grep Proximity
Param: RGBD/ProximityAngle = "45"                          [Maximum angle (degrees) for visual proximity detection.]
Param: RGBD/ProximityBySpace = "true"                      [Detection over locations (in Working Memory or STM) near in space.]
Param: RGBD/ProximityByTime = "false"                      [Detection over all locations in STM.]
Param: RGBD/ProximityMaxGraphDepth = "50"                  [Maximum depth from the current/last loop closure location and the local loop closure hypotheses. Set 0 to ignore.]
Param: RGBD/ProximityMaxPaths = "3"                        [Maximum paths compared (from the most recent) for proximity detection by space. 0 means no limit.]
Param: RGBD/ProximityPathFilteringRadius = "0.5"           [Path filtering radius to reduce the number of nodes to compare in a path. A path should also be inside that radius to be considered for proximity detection.]
Param: RGBD/ProximityPathMaxNeighbors = "0"                [Maximum neighbor nodes compared on each path. Set to 0 to disable merging the laser scans.]
Param: RGBD/ProximityPathRawPosesUsed = "true"             [When comparing to a local path, merge the scan using the odometry poses (with neighbor link optimizations) instead of the ones in the optimized local graph.]

Actually, RGBD/ProximityBySpace is done only with localizations in WM, I'll fix the doc. In your case, you may set "RGBD/ProximityMaxGraphDepth" = "0" and "RGBD/ProximityPathFilteringRadius" = "1". For 30 m long, there is about 150 nodes, so the "50" default is too small. Note that for such long trajectory (unless odometry is very precise) doing proximity detection is not reliable, so it is why by default it is max 50 nodes. At that point, it would be global loop closure detection that will find the loop closures instead of the proximity detection. Global loop closure detection is not done with nodes in STM, so setting large STM disables capacity to find loop closures. To find a loop closures, the environment should have discriminative visual features.

cheers,
Mathieu