Re: rtabmap does not find loop closures

Posted by acp on
URL: http://official-rtab-map-forum.206.s1.nabble.com/rtabmap-does-not-find-loop-closures-tp6586p6598.html

Hi Mathieu

Thank you for your answer.

matlabbe wrote
1) Look at Section 3.5 of this paper:

RTAB-Map integrates three graph optimization approaches:  TORO [Grisetti et al., 2010], g2o [Kummerle et al.,2011] and GTSAM [Dellaert, 2012].  g2o and GTSAM converge faster than TORO, but are less robust to multi-session mapping when multiple independent graphes have to be merged together.  TORO is also lesss ensitive to poorly estimated odometry covariance.  However, for single map, based on empirical data, g2o and GTSAM optimization quality is better than TORO, particularly for 6DoF maps.  GTSAM is slightly more robust to multi-session than g2o, and thus is the strategy now used by default in RTAB-Map contrarily to our previous works using TORO.


RGBD/OptimizeMaxError is also explained in that section. Note that you can do "rtabmap --params"  to have a description of all parameters. g2o/Optimizer is the optimization approach used in g2o, which is [0=Levenberg 1=GaussNewton]. RGBD/LoopClosureReextractFeatures to true can be used to re-do old approach on loop closures, where we re-extracted features. In recent versions, we don't need it as we have already extracted all features we needed to compute loop closure transformation.

I have read the section  3.5  and according what you have explained and the section 3.5 of the paper, the default optimiser used in rtabmap_ros is GTSAM together with   RGBD/OptimizeMaxError, right?

Based  on the previous, I have few questions

1.- I have read in this link  that to set GTSAM the follwoing parameters must be set RGBD/OptimizeStrategy = 2,   RGBD/OptimizeMaxError = 0,  RGBD/OptimizeRobust = true. Since GTSAM is now the default optimiser in rtabmap_ros, I just wanted to check that those parameters have that value.


When I run $rosparam list
I get:

/zed/rtabmap/Optimizer/Strategy
/zed/rtabmap/RGBD/OptimizeMaxError
/zed/rtabmap/Optimizer/Robust



And

When I  run:

 $ rosparam get /zed/rtabmap/Optimizer/Strategy
'1'


$ rosparam get /zed/rtabmap/RGBD/OptimizeMaxError
'3.0'


$ rosparam get /zed/rtabmap/Optimizer/Robust
'false'




 This mean that I do have g2o optimization as a default with RGBD/OptimizeMaxError to reject wrong loop closures, right?

So if I want to try GTSAM

I need to set the following parameters, right?

$ rosparam set /zed/rtabmap/Optimizer/Strategy 2

$ rosparam set  /zed/rtabmap/RGBD/OptimizeMaxError 0

$ rosparam set /zed/rtabmap/Optimizer/Robust true

$ rosparam set /zed/rtabmap/Optimizer/GravitySigma 0.3


2.-  Do you recommend that I shall try to set GTSAM or just leave the g20 as a default.  Or, try to run both and compare them.

3.- Well I can see in rtabmapviz/prferences/RGB-D-SLAM/Graph-Optimization tab  TORO, g2o and GTSAM, however  GTSAM is grayout,  maybe the version of rtabmap_ros I have does not support GTSAM.

4,-  Just to mentioned for some one who may be helpful that to check individual info parameters:
    $rosrun rtabmap_ros rtabmap --params | grep Optimizer/Robust








Thank you and looking forward to your replay.