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.

ShonanAveraging

Created by Codex.

Implement the common staircase relaxation and optimality-certificate machinery for Shonan rotation averaging.

Open In Colab

Mathematical idea

Rotation averaging seeks absolute rotations whose relative rotations agree with measurements:

min⁡Ri∈SO(d)∑(i,j)∥RiRij−Rj∥F2.\min_{R_i\in\mathrm{SO}(d)}\sum_{(i,j)} \left\lVert R_iR_{ij}-R_j\right\rVert_F^2.

SO(d)\mathrm{SO}(d) is the special orthogonal group. Shonan averaging lifts the problem from SO(d)\mathrm{SO}(d) to successively larger SO(p)\mathrm{SO}(p) manifolds, searches for a certifiable optimum, and rounds the lifted solution back to dimension dd.

Purpose and availability

ShonanAveraging<d> is the templated C++ implementation shared by the concrete ShonanAveraging2 and ShonanAveraging3 interfaces. It builds and optimizes problems on increasing SO(p) levels, checks the minimum eigenvalue certificate, descends through a negative-curvature direction when needed, and rounds a lifted solution back to rotations.

Use the concrete classes in application code. The base template itself is not directly exposed in Python.

Configure the staircase

Python exposes dimension-specific parameter classes. Both wrap ordinary LevenbergMarquardtParams and add anchoring, robust-loss, and optimality-certificate controls. Robust loss and optimality certification are alternative modes: disable Huber loss before requesting a certificate.

Planar rotation averaging

ShonanAveraging2 accepts planar pose-between factors and returns Rot2 values at the original keys. Only the rotational part of each pose measurement contributes to the objective.

Spatial rotation averaging

ShonanAveraging3 accepts BinaryMeasurementRot3 or BetweenFactorPose3 measurements. The returned Values contains Rot3 estimates; the scalar reports the staircase certificate quantity.