Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Certifiable Landmark SLAM on SE(2)

This notebook solves an SE(2)SE(2) landmark SLAM problem with GTSAM’s Burer-Monteiro Riemannian Staircase and checks an SDP certificate that, when it passes, establishes global optimality. It extends the pose graph example with landmarks, which enter as extra unconstrained variables.

Three factors appear, all quadratic:

  • FrobeniusBetweenFactorRot2 contributes κij∥Rj−RiRij∥F2\kappa_{ij}\lVert R_j - R_i R_{ij}\rVert_F^2,

  • RelativeTranslationFactor2 contributes τij∥tj−ti−Rit~ij∥2\tau_{ij}\lVert t_j - t_i - R_i \tilde{t}_{ij}\rVert^2 for odometry,

  • the same factor contributes νik∥ℓk−ti−Riv~ik∥2\nu_{ik}\lVert \ell_k - t_i - R_i \tilde{v}_{ik}\rVert^2 for a landmark sighting, with the landmark taking the role of the second translation.

A landmark carries no constraint of its own, so it is a free row of the lifted variable. See also the SE(3)SE(3) version.

Open In Colab

A grid world with landmarks

16 poses, 3 landmarks
15 odometry edges, 23 sightings

Generative model

rotation:  kappa = 100, sigma = 4.05 deg
odometry:  tau   = 25, sigma = 0.20 m
sighting:  nu    = 40, sigma = 0.16 m
53 factors

Lifted initial values

rotation slice:  (2, 2)
landmark slice:  (1, 2)

Run and certify

Certified:    True
Final rank:   2
Ranks tried:  [2]
Solver time:  0.0092 s

Round back to SE(2)SE(2)

Relaxation lower bound: 21.925877
Rounded objective:      21.925913
Relative gap:           1.654e-06
Objective at truth:     40.620375

A relative gap at the level of solver tolerance means the rounded SE(2)SE(2) solution attains the relaxation’s lower bound, so it is the global optimum of the original problem, not merely a good local one.

residuals 91 - parameters 51 = 40 dof
Expected optimal cost (0.5 * chi^2): 20.0
Observed optimal cost:               21.9
Ratio:                               1.10

The estimated map

Loading...
RMS position error after alignment: 0.1642 m

Where the time goes

Loading...
  QCQP build: 0.00010 s
 local solve: 0.00894 s
      verify: 0.00009 s