• Stars
    star
    468
  • Rank 93,767 (Top 2 %)
  • Language
    C++
  • License
    BSD 2-Clause "Sim...
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Robust Pose Graph Optimization

Kimera-RPGO: Open-Source Robust Pose Graph Optimization

Authors: Yun Chang, Luca Carlone, Marcus Abate, Antoni Rosinol

Publications

We kindly ask to cite our paper if you find this library useful:

@InProceedings{Rosinol20icra-Kimera,
  title = {Kimera: an Open-Source Library for Real-Time Metric-Semantic Localization and Mapping},
  author = {Rosinol, Antoni and Abate, Marcus and Chang, Yun and Carlone, Luca},
  year = {2020},
  booktitle = {IEEE Intl. Conf. on Robotics and Automation (ICRA)},
  url = {https://github.com/MIT-SPARK/Kimera},
  pdf = {https://arxiv.org/pdf/1910.02490.pdf}
}

Related Publications

Outlier Rejection based on:

  • J. Mangelson, D. Dominic, R. Eustice, and R. Vasudevan. Pairwise Consistent Measurement Set Maximization for Robust Multi-robot Map Merging. IEEE Intl. Conf. on Robotics and Automation (ICRA), 2018.

Maximum Clique Finder used with slight adaptations:

  • B. Pattabiraman, M. Patwary, A. Gebremedhin, W. Liao, and A. Choudhary. Fast Algorithms for the Maximum Clique Problem on Massive Graphs with Applications to Overlapping Community Detection, Internet Mathematics, 2014.

  • B. Pattabiraman, M. Patwary, A. Gebremedhin, W. Liao, and A. Choudhary. Fast Algorithms for the Maximum Clique Problem on Massive Sparse Graphs, In Proceedings of the 10th Workshop on Algorithms and Models for the Web Graph, Cambridge, MA, Lecture Notes in Computer Science, Springer, vol. 8305, pp. 156-169, 2013.

Dependencies

GTSAM Latest commit tested: 686e16aaae26c9a4f23d4af7f2d4a504125ec9c3

(Note that the BUILD_WITH_MARCH_NATIVE flag caused some problems on some machines. )

Clone GTSAM to your preferred location:

git clone [email protected]:borglab/gtsam.git

Build

cd gtsam
mkdir build
cd build
cmake .. -DGTSAM_POSE3_EXPMAP=ON -DGTSAM_ROT3_EXPMAP=ON
sudo make install

Note: The reason why we need EXPMAP is for the correct calculation of Jacobians. Enabling this and the #define SLOW_BUT_CORRECT_BETWEENFACTOR before any #include <gtsam/slam/BetweenFactor.h> are both important. Otherwise the default are some identity approximations for rotations, which works for some cases but fails for cases with manual loop closures, or artifacts. Note that sudo make check in gtsam will partially fail because some unittests assume the EXPMAP flags to be off.

Build

git clone [email protected]:MIT-SPARK/Kimera-RPGO.git
cd Kimera-RPGO
mkdir build
cd build
cmake ..
make

Usage

This repository can be used as an optimization backend. A sample setup looks something like below. The default solver is LM.

// Set up
// set up KimeraRPGO solver
RobustSolverParams params;
params.setPcm3DParams(0.0, 10.0, Verbosity::QUIET);
// Verbosity levels are QUIET, UPDATE, and, VERBOSE in order of increasing number of messages (the default is UPDATE)
// For 2D params.setPcm2DParams(0.0, 10.0); Have been tested
// If threshold is set to < 0, either odom check or loop consistency check disabled

// To use GaussNewton instead of LM: params.solver = Solver::GN;

std::unique_ptr<RobustSolver> pgo = KimeraRPGO::make_unique<RobustSolver>(params);
//...
//...

// Run
pgo->update(new_factor, new_values);

This can also be used as a standalone experimental tool. A read g2o function can be found in examples.

# for 2D:
./RpgoReadG2o 2d <g2o-file> <odom-check-threshold> <pcm-threshold> <optional:folder-to-save-g2o> <optional:v to toggle verbosity>

# for 3D
./RpgoReadG2o 3d <g2o-file> <odom-check-threshold> <pcm-threshold> <optional:folder-to-save-g2o> <optional:v to toggle verbosity>

Example, do ./RpgoReadG2o 3d /home/user/Desktop/in.g2o 1.0 1.0 /home/user/Desktop/out/ v

Example

// set up KimeraRPGO solver
RobustSolverParams params;
params.setPcm3DParams(<translation_threshold>, <rotation_threshold>);
std::vector<char> special_symbs{'l', 'u'}; // for landmarks
params.specialSymbols = special_symbs;

std::unique_ptr<RobustSolver> pgo = KimeraRPGO::make_unique<RobustSolver>(params); // initiate pgo solver

// When using it normally
pgo->update(new_factor, new_values);

// load a graph (assuming pgo has been reset)
pgo->loadGraph(nfg, values, prior_factor);
pgo->loadGraph(nfg, values, key0); // can just load the first key

// add a graph (ex. already have graph or robot a and adding graph of robot b)
pgo->addGraph(nfg, values, between_factor);


/////// To not use outlier rejection, set up like
RobustSolverParams params;
params.setNoRejection();

std::unique_ptr<RobustSolver> pgo = KimeraRPGO::make_unique<RobustSolver>(params); // initiate pgo solver

BSD License

Kimera-RPGO is open source under the BSD license, see the LICENSE.BSD file.

More Repositories

1

Kimera

Index repo for Kimera code
1,800
star
2

TEASER-plusplus

A fast and robust point cloud registration library
C++
1,753
star
3

Kimera-VIO

Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
C++
1,534
star
4

Kimera-Semantics

Real-Time 3D Semantic Reconstruction from 2D data
C++
640
star
5

Hydra

C++
583
star
6

Kimera-VIO-ROS

ROS wrapper for Kimera-VIO
C++
371
star
7

Kimera-Multi

Index repo for Kimera-Multi system
Shell
327
star
8

Khronos

Spatio-Temporal Metric-Semantic SLAM
C++
273
star
9

Loc-NeRF

Monte Carlo Localization using Neural Radiance Fields
Python
259
star
10

Kimera-Multi-Data

A large-scale multi-robot dataset for multi-robot SLAM
149
star
11

GNC-and-ADAPT

Graduated Non-Convexity (GNC) and Adaptive Trimming (ADAPT) algorithms for outlier robust estimation
MATLAB
112
star
12

CertifiablyRobustPerception

Certifiable Outlier-Robust Geometric Perception
MATLAB
107
star
13

PD-MeshNet

Primal-Dual Mesh Convolutional Neural Networks
Python
106
star
14

GlobalOptimizationTutorial

Hands-on Tutorial for Global Optimization in Matlab
MATLAB
104
star
15

llm_scene_understanding

HTML
71
star
16

STRIDE

Solver for Large-Scale Rank-One Semidefinite Relaxations
MATLAB
66
star
17

Clio

66
star
18

VNAV-labs

Labs for MIT 16.485
Python
64
star
19

Spatial-Hash

Minimal C++ library for spatial data structures based on voxel hashing
C++
57
star
20

KISS-Matcher

52
star
21

Hydra-ROS

Hydra ROS Interface
C++
39
star
22

Spark-DSG

Scene Graph API (C++ and Python)
C++
37
star
23

Kimera-VIO-ROS2

C++
36
star
24

Kimera-Multi-LCD

C++
34
star
25

Kimera-VIO-Evaluation

Code to automatically evaluate and tune parameters for Kimera-VIO pipeline.
Python
33
star
26

Kimera-PGMO

C++
33
star
27

ROBIN

C++
31
star
28

config_utilities

Automatic C++ config structs and tools.
C++
28
star
29

pose_graph_tools

C++
26
star
30

pose-baselines

Jupyter Notebook
25
star
31

estimation-contracts

MATLAB
25
star
32

neural_tree

Python
22
star
33

C-3PO

Python
21
star
34

Kimera-Distributed

C++
21
star
35

MiDiffusion

Python
17
star
36

LP2

Long-term Human Trajectory Prediction using 3D DSGs
15
star
37

GlobalOptimization-ICCV2019

ICCV 2019 Tutorial: Global Optimization for Geometric Understanding with Provable Guarantees
TeX
14
star
38

FUSES

C++
11
star
39

Hydra-GNN

Room classification network training and inference code
Python
10
star
40

certifiable_tracking

MATLAB
8
star
41

PACE

Index repo for the PACE project
Python
7
star
42

robotRepresentations-RSS2023

Robot Representations Workshop @ RSS 2023
SCSS
6
star
43

ensemble_pose

Self-training for an ensemble of object pose estimators
Python
5
star
44

ford-paper-params

Parameters for competitor pipelines for the Kimera Multicamera project
5
star
45

CertifiablePerception-RSS2020

Workshop website on Certifiable Robot Perception for RSS2020
TeX
5
star
46

Longterm-Perception-WS

Workshop on Long-term Perception for Autonomy in Dynamic Human-shared Environments
SCSS
4
star
47

ThreedFront

Python
4
star
48

PerceptionMonitoring

Python
3
star
49

dbow2_catkin

CMake
2
star
50

PAL-ICRA2020

Ruby
2
star
51

kimera-multi-vocab

Vocabulary file for Kimera-Multi in the Kimera-Multi dataset
2
star
52

VNAV2020-handouts

Handouts/webpage for VNAV 2020
HTML
1
star