GSLAM  3.0.0
Tools for Developing a SLAM

Serveral tools are provided to accelerate developing a SLAM system.

Bag of Words Vocabulary

GSLAM carries out a header only implementation of DBoW3 vocabulary with the following features:

A comparison of the four implementations is demonstrated in Table. In the experiment, each parent node has 10 children, and for ORB feature detection we use the ORB-SLAM, and SiftGPU is used for SIFT detection. Two ORB vocabularies with 4 and 6 levels and one SIFT vocabulary are used in the results. Both FBoW and GSLAM use multi-thread for vocabulary training. Our implementation outperforms in almost all items including loading and saving the vocabulary, training a new vocabulary, transforming a descriptor list to a BoW vector for place recognition and a feature vector for fast feature matching. Furthermore, the GSLAM implementation uses less memory and allocates less pieces of dynamic memories as we found that the fragmentation problem is the main reason that DBoW2 needs lots of memory. We published the comparison code as an open source project on github: https://github.com/zdzhaoyong/GSLAMVocabulary.

Comparison of four BoW implementations in loading, saving and training a same vocabulary with memory usage statistics. The experiment is performed on a computer with i7-6700 CPU, 16GB RAM running 64bit Ubuntu. 400 and 10k images from DroneMap dataset are used to train the models with 4 and 6 levels.

ImplementationGSLAM DBoW2 DBoW3 FBoW
Load ORB-467.3us47.2ms 7.1ms72.3us
Load ORB-67.2ms6.8 s 1.1 s 9.5ms
Load SIFT-41.0ms436.1ms 5.1ms 1.1ms
Save ORB-4437.9us40.4ms 1.7ms 553.1us
Save ORB-634.4ms 4.8 s 632.4ms 20.6ms
Save SIFT-44.4ms 437.6ms 6.7ms 2.7ms
Train ORB-47.6 s 24.8 s 23.6 s 8.5 s
Train ORB-6230.5 s1.1Ks 911.4 s 270.4 s
Train SIFT-423.5 s 327.7 s 299.0 s 18.7 s
Trans ORB-4 615.5us 2.1ms 1.9ms 862.4us
Trans ORB-6 723.7us 6.0ms 4.9ms 1.2ms
Trans SIFT-4 1.1ms 10.3ms 9.2ms 11.5ms
Mem ORB-4 0.44MB 2.5MB 2.5MB 0.45MB
Mem ORB-6 44.4MB 247.1MB 246.5MB 45.3MB
Mem SIFT-4 5.8MB 7.8MB 7.8MB 5.8MB

Estimator

The purely geometric computation remains a fundamental problem that requires robust and accurate real-time solutions. Both classical visual SLAM algorithms or modern visual-inertial solutions rely on geometric vision algorithms for initialization, relocalization and loop-closure. OpenCV provides several geometry algorithms and Kneip presents a toolbox for geometric vision OpenGV which is limited to camera pose computation. Estimator of GSLAM aims to provide a collection of close-form solvers covering all interesting cases with robust sample consensus (RANSAC) methods.

Table lists the algorithms supported by the estimator. They are divided into three categories according to the given observations. 2D-2D matches are used to estimate epipolar or homography constraints and relative pose could be decomposed from them. 2D-3D correspondences are used to estimate both central or non-central absolute pose for monocular or multiple camera systems, which is the famous PnP problem. 3D geometry functions such as plane fitting, and estimating the SIM3 transformation of two point clouds are also supported.

Optimizer

Nonlinear optimization is the core part of state-of-the-art geometric SLAM systems. Due to the high dimensionality and sparseness of Hessian matrix, graph structures are used to modeling complex estimation problems for SLAM. Several frameworks including Ceres, G2O and GTSAM are proposed to solve general graph optimization problems. These frameworks are popular used by different SLAM systems. ORB-SLAM, SVO use G2O for bundle adjustment and pose graph optimization. OKVIS , VINS use Ceres for graph optimization with IMU factors and sliding window is used to control the computation complex. Forster et al. present a visual-initial method based on SVO and implement the back-end with GTSAM. Optimizer of GSLAM aims to provide an unified interface for most of nonlinear SLAM problems such as PnP solver, bundle adjustment, pose graph optimization. A general implementation plugin for these problems is carried out based on the Ceres library.