Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pose & Priors

factors::pose — relative constraints and anchors. No sensor model: these express graph topology.

Throughout, is the right perturbation , its inverse , and , the right and left Jacobians of the group. The identity used everywhere below is


BetweenFactor<T>

A relative measurement between two variables of the same Lie group. Odometry edges and loop closures are both this factor, the latter usually with a robust loss.

Blocks — any T: LieGroup. Residual , Jacobian .

Error

With measurement ,

zero exactly when the estimated relative transform equals the measured one.

Jacobian

Write . Perturbing the second variable, , gives directly

Perturbing the first, , moves the inverse to the left of , and it has to be commuted through:

so

For SE(3), and

The implementation never writes these forms out: it chains the Jacobians that between, compose and log report, so it stays correct for every group.

#![allow(unused)]
fn main() {
use apex_solver::factors::pose::BetweenFactor;

problem.add_residual_block_with_noise(
    &[key_i, key_j],
    Box::new(BetweenFactor::new(measured_relative_pose)),
    Some(Box::new(HuberLoss::new(1.345)?)),
    NoiseModel::from_sigmas(&[0.05, 0.05, 0.05, 0.01, 0.01, 0.02])?,
);
}

PriorFactor<T>

Anchors one variable to a known value in the tangent space. Prefer this to Problem::fix_variable: fixed indices are honoured when the step is applied, but the linear system still treats those coordinates as free, so variables sharing factors with a “fixed” one are systematically under-corrected.

Blocks . Residual , Jacobian square.

Error and Jacobian

This is a BetweenFactor with an identity measurement and a constant first argument, and is implemented as exactly that — the two share one chain and cannot drift apart. Because the residual never touches the parameters, there is no quaternion double-cover ambiguity.


EuclideanPriorFactor

Registration rejects any manifold but Rn — on a Lie group this would difference raw parameters, which is not a tangent-space error. Use it to anchor velocities, biases and intrinsics.


PoseRotationPrior / PoseTranslationPrior

Constrain one half of an SE(3) pose and leave the other free.

The translation block is , not , because the right perturbation moves the origin by in the world frame.

These are not a decomposition of PriorFactor<SE3>: the translation rows here are the world-frame difference, whereas the prior’s are the coupled SE(3) logarithm , which mixes rotation into translation through . Stacking both does not reproduce the full prior.

PoseRotationPrior is the usual rotation-only loop-closure initializer; PoseTranslationPrior is how a GNSS position fix attaches to an SE(3) pose.