Techniqueresearch
Switchable constraints
Also called switch variables for robust SLAM.
Gives each loop closure a switch variable that the optimizer can turn off, so false loop closures stop distorting the map.
Switchable constraints make the back end of a SLAM system robust to wrong loop closures. A loop closure detector sometimes says that two places are the same when they are not. One such edge in a pose graph can bend the whole map, because least squares gives a large error a large weight. Sünderhauf and Protzel give each loop closure edge a new variable , the switch. The error of the edge is multiplied by , a function with values in , and a prior term pulls each switch toward 1, the value "on". The optimizer then decides, together with the poses, how much to trust each loop closure. A wrong edge with a large error costs less when its switch goes toward 0 and the prior is paid instead. It is a heuristic. It does not guarantee that wrong edges are switched off or that right edges stay on, and the joint problem has more local minima than the original one.
In plain words
Each loop closure gets a dimmer. The solver can turn a dimmer down when that loop closure does not fit with the rest of the map, but each turn costs a small fixed price. A correct loop closure fits, so turning it down saves nothing, and it stays on. A wrong loop closure pulls hard against all the other measurements. Turning it down saves more than the price, so the solver turns it down and the map comes back into shape. The dimmers are found together with the poses by the same solver, so no separate step is needed to find the bad measurements.
When it applies
- The problem is pose graph optimization or a factor graph problem with a least squares cost, solved by Gauss-Newton or a similar local method.
- Some edges are doubtful, usually loop closures from appearance, and other edges are reliable, usually odometry.
- The wrong edges are a minority, and the reliable edges together give a good first guess.
- There is no time to check each loop closure separately, or the check needs the whole graph.
The template
Let be the odometry edges and the loop closure edges, with errors and information matrices . Add one scalar switch for each loop closure and minimize jointly
- Choose the switch function : a sigmoid, or the linear function with held in .
- Choose the prior weight , the inverse variance of the switch prior. A small makes switches cheap to turn off; a large one makes the method close to plain least squares.
- Start every switch at 1 and the poses at the usual first guess, for example the odometry chain.
- Run the same nonlinear least squares solver on poses and switches together. The new variables are scalars, and each one touches only its own edge, so the sparsity of the problem stays almost the same.
- Read the final switches. A value near 0 marks a loop closure that the solver rejected.
The implied robust cost. With the linear switch, the switch of one edge with squared Mahalanobis error can be eliminated by hand. The term is least at , and its value there is
This is bounded by for any error, so one wrong edge can add at most to the cost. So switchable constraints with a linear switch act like a redescending M-estimator of the Geman-McClure type on each loop closure.
Classic examples
One pose and two loop closures. Pose is fixed. Odometry says . Loop closure says , and it is correct. Loop closure says , and it is wrong. All weights are 1, the switches are linear, and .
- Plain least squares gives . The wrong edge moves the pose by almost 1.
- With switches, alternate between the best for fixed switches, , and the best switches for fixed , . From , the switches become and , then , then and , then . The process ends at , and , with the cost 0.913.
The wrong edge is mostly switched off, but not fully. The result 1.116 is close to, but not equal to, 1.1, the least squares answer without the wrong edge.
Pose graphs with added false loop closures. Sünderhauf and Protzel added many random false loop closures to standard pose graph data sets and showed that the switchable formulation still recovered the map in their experiments. These are measured results on those data sets, not a guarantee.
Variations
- Dynamic covariance scaling. Agarwal and colleagues eliminated the switch in closed form and applied the result as a scale on the information matrix of each loop closure. This gives the same kind of bounded cost without extra variables.
- Max-mixtures. Olson and Agarwal model each doubtful edge by a mixture of a narrow and a wide Gaussian, and take the most likely component in each step.
- Consistency checks. RRR of Latif, Cadena and Neira, and pairwise consistency maximization, group loop closures that agree with each other and reject the rest before or during the optimization. Such checks can use RANSAC-like ideas.
- Robust kernels. Huber, Cauchy and other M-estimators on loop closures work in a similar way, with a fixed kernel in place of a switch.
- Certifiable robust methods. Later work combines outlier models with relaxations like those of SE-Sync, at a higher cost.
Pitfalls
- A poor first guess. The joint problem is more nonconvex than the original. If odometry drift is large, a correct loop closure can also have a large error at the start, and its switch goes off. The map then keeps the drift.
- The prior weight. With too large, wrong edges stay on. With too small, correct edges with a large error, which are the most useful ones, are switched off.
- Many consistent wrong edges. Several wrong loop closures that agree with each other, for example from a repeated corridor, can win against the odometry. Switches cannot tell them from correct edges.
- Partial switches. A switch that ends between 0 and 1 still pulls the map a little. Inspect the final switch values, and remove clearly rejected edges if the bias matters.
- Odometry is trusted. The method assumes that the edges without switches are correct. A wrong odometry edge is not handled.
Exercises
- Show that is attained at , and that the minimum value is .
- In the example with one pose, find the value of if the switches are fixed at and . Explain why the result of the switched problem differs from it.
- Give a one-dimensional example with a first guess for which the alternating method switches off the correct loop closure.
- Explain why adding one scalar variable per loop closure keeps the information matrix sparse, and what new nonzero entries appear.
References
- Niko Sünderhauf and Peter Protzel, Switchable constraints for robust pose graph SLAM, IEEE/RSJ International Conference on Intelligent Robots and Systems, 2012, pages 1879 to 1884, the switch variable on each loop closure, the switch function, the switch prior, and the experiments with added false loop closures
- Niko Sünderhauf and Peter Protzel, Towards a robust back-end for pose graph SLAM, IEEE International Conference on Robotics and Automation, 2012, pages 1254 to 1261, the first form of the switchable constraints in a factor graph
- Cesar Cadena, Luca Carlone, Henry Carrillo, Yasir Latif, Davide Scaramuzza, Jose Neira, Ian Reid and John J. Leonard, Past, present, and future of simultaneous localization and mapping: toward the robust-perception age, IEEE Transactions on Robotics 32(6), 2016, pages 1309 to 1332, the discussion of robust back ends against wrong data association
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag CZESV3 Edit this page History Report an error Markdown