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.

ShonanGaugeFactor

Created by Codex.

Remove the stabilizer gauge directions introduced by a lifted Shonan variable.

Open In Colab

Mathematical idea

Only the first dd columns of Q∈SO(p)Q\in\mathrm{SO}(p) affect the lifted rotation. Right actions in the remaining p−dp-d dimensions therefore form an SO(p−d)\mathrm{SO}(p-d) stabilizer with

(p−d)(p−d−1)2\frac{(p-d)(p-d-1)}{2}

unobservable tangent directions. ShonanGaugeFactor constrains exactly this linearized null space without adding a nonlinear residual.

Purpose and availability

An SO(p) relaxation contains SO(p-d) directions that do not alter its projected Stiefel frame. ShonanGaugeFactor contributes a constant Jacobian on precisely those tangent directions. Its nonlinear error is always zero; its role appears during linearization.

This implementation class is currently C++-only. ShonanAveraging adds it internally when configured with gauge weight.

C++ example

#include <gtsam/sfm/ShonanGaugeFactor.h>

using namespace gtsam;

const Key key = Symbol('Q', 0);
const size_t p = 6;
const size_t d = 3;
ShonanGaugeFactor factor(key, p, d, 1e3);  // optional precision gamma

Values values;
values.insert(key, SOn::FromMatrix(Matrix::Identity(p, p)));
const auto linear = factor.linearize(values);

The constructor requires p >= d. For p-d < 2, the stabilizer has zero dimension and the factor contributes no rows.