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§
Se3
Sim3(Sim3PoseGraphConfig)
Trait Implementations§
Source§impl Clone for LoopRefinementSolver
impl Clone for LoopRefinementSolver
Source§fn clone(&self) -> LoopRefinementSolver
fn clone(&self) -> LoopRefinementSolver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoopRefinementSolver
impl Debug for LoopRefinementSolver
Source§impl Default for LoopRefinementSolver
impl Default for LoopRefinementSolver
Source§fn default() -> LoopRefinementSolver
fn default() -> LoopRefinementSolver
Source§impl PartialEq for LoopRefinementSolver
impl PartialEq for LoopRefinementSolver
impl StructuralPartialEq for LoopRefinementSolver
Auto Trait Implementations§
impl Forget for LoopRefinementSolver
impl Freeze for LoopRefinementSolver
impl Move for LoopRefinementSolver
impl RefUnwindSafe for LoopRefinementSolver
impl Send for LoopRefinementSolver
impl Sync for LoopRefinementSolver
impl Unpin for LoopRefinementSolver
impl UnsafeUnpin for LoopRefinementSolver
impl UnwindSafe for LoopRefinementSolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.