Jun 520165 June 2016

Code: Robust edge types for G2O

Available on GitHub.

Maintenance Fork

Robust SLAM has seen quite some attention since 2013, with several implementations of robust edge types (e.g. MaxMixture and Switchable Constraints) available as open source. As usual with research-level code, it does not get maintained so well to match new versions of dependencies, namely G2O in this case.

So, in order to facilitate replication experiments and aid in general ease-of-use for these libraries, I have forked them and published my patches to them under their original license with copyright notices and links to the original libraries. Today, these should compile and work fine with the master branch of G2O.

Extensions

Apart from the patched maintenance forks of MaxMixture and Switchable Constraints, I have also included two original libraries:

  1. My own templated implementation of MaxMixture edges, with some usability improvements.
  2. A templated implementation of a “robustified” edge, where the m-estimator (e.g. Huber, Cauchy, etc) can be chosen for each edge separately.

Templated MaxMixture

The new MaxMixture implementation allows for two improvements:

  1. Automatic reinitialization of the underlying linear solver due to sparsity structure changes when performing the max operation. By using the pre-iteration callback of G2O, the implementation can detect if the sparsity structure of the hessian changes, and if so, opportunistically reset the solver. This allows running complex MaxMixture graphs for more than one iteration, which was a major drawback of the original library.
  2. Easy addition of new MaxMixture types through template instances. The original library replicated a lot of code, and my generic implementation should be compatible with any edge type of G2O.

These differences should make the use of MaxMixture edges in experiments much easier.

Robustified Edges

The second library implements a generic edge type that allows specification of the m-estimator (“robust kernel” in G2O) and its parameter in the G2O text file format. This is quite powerful if not all edges or all non-sequential edges should be treated with the same m-estimator. For example, it allows to only add an m-estimator for loop edges that were found by relaxing a threshold below the conservative level for appearance based methods such as FABMAP. New types are easily added thanks to C++ templates.

The generic form is:

EDGE_*_ROBUST <vertices> <kernel name> <kernel delta> <base edge info>

For example:

EDGE_SE2_ROBUST         0 1        Cauchy      1.0   1 0 0 10 0 0 10 0 10
----edge tag---  -vertices-  -m-est name-  -param- | ---base edge info---

The information in base edge info is the same as in the inherited edge type, EDGE_SE2 in this case.

© 2015-2019 Max Pfingsthorn. Made with Hugo, Bootstrap, and FontAwesome.