Re: rtabmap does not find loop closures

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

Hi,

I was using the parameters you've shown in previous posts. In recent versions, the parameter is now called Optimizer/Strategy. If you set RGBD/OptimizeStrategy, it will still be recognized for backward compatibility (copied to Optimizer/Strategy under the hood).

To enable GTSAM, you should rebuild rtabmap with GTSAM support, then the option won't be grayed out anymore.

You can see your current build dependencies with:
$ rtabmap --version
...
With GTSAM:               true
...

If with GTSAM is false, install GTSAM and rebuild rtabmap. make sure in cmake status GTSAM has been found before compiling.

$ git clone --branch 4.0.0-alpha2 https://github.com/borglab/gtsam.git gtsam-4.0.0-alpha2
$ cd gtsam-4.0.0-alpha2
$ mkdir build
$ cd build
$ cmake -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_UNSTABLE=OFF ..
$ make -j4
$ sudo make install
Then
$ cd rtabmap/build
$ cmake ..
-- --------------------------------------------
-- Info :
--   Version : 0.19.7
...
--  Solvers:
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--  *With g2o                  = YES (License: BSD)
--  *With GTSAM                = YES (License: BSD)
--  *With Ceres                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = NO (cvsba not found)
--  *With libpointmatcher      = YES (License: BSD)
...