Skip to main content

LoopRefinementSolver

Enum LoopRefinementSolver 

Source
pub enum LoopRefinementSolver {
    Se3,
    Sim3(Sim3PoseGraphConfig),
}
Expand description

Which pose-graph solver backs OnlineSlamLoopClosureRefinementConfig’s periodic PGO trigger.

Self::Se3 (the default) is today’s rigid solve (PoseGraph::optimize_se3_iterative, or PoseGraph::optimize_se3_gnc when gnc is set) — byte-identical behaviour for existing callers.

Self::Sim3 instead mirrors the running graph into a parallel Sim3PoseGraph (one Sim3 node per keyframe, seeded at scale 1.0 from its current rigid pose; one Sim3 edge per sequential/loop-closure edge, likewise seeded at scale 1.0 since both the odometry chain and the PnP loop-closure verifier are metric) and solves that instead. Its extra per-node scale degree of freedom lets a loop closure absorb scale drift — e.g. a learned monocular-style tracker’s accumulated 1.4-2.1x scale error — that a rigid SE(3) graph cannot represent and instead smears as rotation/translation error across the whole trajectory (see pipelines/slam/tests/online_slam.rs’s sim3_solver_recovers_scale_drift_se3_cannot for a measured A/B on a synthetic drifted chain).

This variant is only appropriate when scale is genuinely unobservable, such as a monocular map or a merge between independently scaled maps. Metric stereo and RGB-D maps must use Self::Se3: following ORB-SLAM2/3, their loop scale is fixed to 1 rather than re-estimated from noisy per-frame depths. Allowing every pose-graph node to change scale in a metric map discards the sensor’s scale observation and can turn depth noise into global scale drift.

Write-back and correction-propagation conventions for this path (maybe_run_loop_closure_refinement’s Sim3 branch): each solved node’s rigid pose for map.keyframes[*].frame.pose is Pose { rotation: R, translation: t / s } (ORB-SLAM2’s OptimizeEssentialGraph convention — dividing by scale, not multiplying, is what keeps the corrected pose’s reprojection ray invariant, since a pinhole projection is invariant to a positive rescale of camera-frame depth); each corrected keyframe’s world-frame similarity correction for landmark propagation is Siw_new⁻¹ ∘ Siw_old (the direct Sim(3) generalisation of the SE(3) path’s T_cw_new⁻¹ ∘ T_cw_old); the tracker’s last_successful_pose is corrected by the same correction’s rotation+translation part only, with the motion model’s cached world velocity additionally scaled by correction.scale (see visloc_tracking::Tracker::apply_similarity_pose_correction).

OnlineSlamLoopClosureRefinementConfig::gnc is ignored on this path: Sim3PoseGraph has no Graduated Non-Convexity variant yet. Callers that set both should treat it as a configuration smell (the demo CLI warns); a wrong loop closure will not be annealed out when solver is Sim3. OnlineSlamLoopClosureRefinementConfig::marginalization_window is likewise ignored on this path — Sim3PoseGraph has no fixed-lag marginalization yet, so the Sim3 mirror grows unbounded for the lifetime of the session. PCM / the covariance gate are unaffected: both screen a candidate before it enters either graph, using only the always-maintained SE(3) mirror.

Variants§

Trait Implementations§

Source§

impl Clone for LoopRefinementSolver

Source§

fn clone(&self) -> LoopRefinementSolver

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LoopRefinementSolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for LoopRefinementSolver

Source§

fn default() -> LoopRefinementSolver

Returns the “default value” for a type. Read more
Source§

impl PartialEq for LoopRefinementSolver

Source§

fn eq(&self, other: &LoopRefinementSolver) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LoopRefinementSolver

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V