pub struct VoLoopClosureConfig {Show 19 fields
pub vocab_k: usize,
pub vocab_iterations: usize,
pub vocab_seed: u64,
pub vocab_descriptor_stride: usize,
pub vocab_max_pool: Option<usize>,
pub min_frame_gap: usize,
pub min_path_length: Option<f64>,
pub min_similarity: f32,
pub max_candidates_per_frame: usize,
pub max_verifications: Option<usize>,
pub match_ratio: Option<f32>,
pub verifier: PnPLoopClosureVerifierConfig,
pub ransac: PnPRansac,
pub pnp_essential_inlier_filter: bool,
pub pnp_confidence_weighted_sampling: bool,
pub se3: PoseGraphSe3Config,
pub gnc: GncConfig,
pub refine_loops_two_view: bool,
pub loop_edge_information: bool,
}Expand description
Configuration for close_loops_on_vo_trajectory.
Fields§
§vocab_k: usizeVisual-word count for the VLAD vocabulary (k-means centroids).
vocab_iterations: usizeLloyd iterations for vocabulary construction.
vocab_seed: u64Deterministic seed for vocabulary k-means++ seeding.
vocab_descriptor_stride: usizeKeep every vocab_descriptor_stride-th left descriptor when pooling for
vocabulary construction (1 = use all; larger keeps k-means tractable on
thousand-frame sequences).
vocab_max_pool: Option<usize>Optional hard cap on the pooled descriptor count fed to k-means, applied
after striding by evenly sub-sampling the pool. k-means is
O(pool · k · dim · iters), so without a cap a 4500-frame sequence pools
millions of descriptors and vocabulary construction alone runs for the
better part of an hour. A few tens of thousands of descriptors already
seed a stable k=64 vocabulary. None uses the full strided pool.
min_frame_gap: usizeMinimum temporal gap (in frames) between the two frames of a loop
candidate. A cheap floor; the portable gate is min_path_length.
min_path_length: Option<f64>Optional minimum accumulated VO path length (metres travelled along the
trajectory) between a candidate’s two frames. This is the frame-rate-
and speed-independent loop gate: a loop only corrects drift if drift had
room to accumulate between the revisit and its original observation, and
drift grows with distance travelled — not with frame index. A small
frame gap during slow motion (e.g. a hovering UAV at 20 Hz) travels
almost nothing and yields odometry-consistent “loops” that contribute no
correction; gating on path length rejects them without per-dataset
frame-gap tuning. None disables the gate (frame gap only). Measured on
EuRoC MH_03: frame-gap 30 alone left ATE unchanged (2.46 m), while a few
metres of required travel recovers the genuine long-range revisits.
min_similarity: f32Minimum VLAD cosine similarity for a frame pair to become a candidate.
max_candidates_per_frame: usizeKeep at most this many earlier frames per query frame as candidates (strongest similarity first).
max_verifications: Option<usize>Optional global cap on how many candidates reach PnP verification, taken
in descending appearance similarity. Bounds the cost of the dominant
stage — per-pair brute-force descriptor matching is O(N_kp² · dim) — on
long sequences where appearance alone proposes thousands of (mostly
redundant) pairs. None verifies every candidate.
match_ratio: Option<f32>Lowe-ratio for the loop-pair descriptor matcher.
verifier: PnPLoopClosureVerifierConfigPnP loop-closure verifier thresholds.
ransac: PnPRansacPnP RANSAC backend used by the verifier.
pnp_essential_inlier_filter: boolBefore PnP, optionally retain only correspondences that are also
essential-matrix inliers under the same loop-pair match set. This is an
opt-in diagnostic/policy lever for long-baseline loop candidates where
2D-2D geometry is strong but stereo-lifted 2D-3D correspondences are
noisy. false keeps the historical PnP input unchanged.
pnp_confidence_weighted_sampling: boolBias loop PnP RANSAC sampling by descriptor-match confidence when
enough finite positive confidences are available and their spread is
meaningful. false keeps historical uniform sampling.
se3: PoseGraphSe3ConfigSE(3) pose-graph solver configuration.
gnc: GncConfigGNC robust-optimization configuration.
refine_loops_two_view: boolRefine each verified loop’s relative pose with a local two-view bundle
adjustment before it enters the pose graph. See
refine_loop_relative_two_view for the rationale: PnP minimises
reprojection in the newer frame only while holding the older frame’s
stereo-depth points fixed, so their triangulation error biases the loop
edge; a 2-view BA (older pose fixed, newer pose + shared landmarks free,
the older stereo disparity a soft metric anchor) lets the points refine
to satisfy reprojection in both frames and recovers a metrically better
grounded relative pose. Strictly local — it touches only each loop’s two
frames, never the rest of the trajectory; the global drift distribution
stays with the SE(3) PGO. false reproduces the PnP-only loop edges.
loop_edge_information: boolGive each loop-closure edge an anisotropic 6×6 information matrix Ω
derived from the loop’s own reprojection geometry, instead of the default
isotropic scalar weight (inlier_count). PnP/2-view BA constrain a loop
edge tightly in rotation and the lateral image directions but only weakly
along the optical axis (depth), yet the scalar weight pulls all six DOF
equally — so the SE(3) PGO smears each loop correction isotropically over
the cycle rather than routing it into the directions the loop actually
observes. loop_edge_information recovers Ω as the reprojection
Hessian Σ JᵀJ (in the solver’s [ρ; ω] SE(3)-tangent convention) and
trace-normalises it to the same total weight inlier_count, so this
changes only the directional distribution of each loop’s pull, not the
calibrated loop-vs-odometry ratio. This is the ORB-SLAM Essential-Graph
per-edge information that the isotropic edges omit. false keeps the
scalar-weight loop edges.
Trait Implementations§
Source§impl Clone for VoLoopClosureConfig
impl Clone for VoLoopClosureConfig
Source§fn clone(&self) -> VoLoopClosureConfig
fn clone(&self) -> VoLoopClosureConfig
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 VoLoopClosureConfig
impl Debug for VoLoopClosureConfig
Source§impl Default for VoLoopClosureConfig
impl Default for VoLoopClosureConfig
Source§fn default() -> VoLoopClosureConfig
fn default() -> VoLoopClosureConfig
Auto Trait Implementations§
impl Forget for VoLoopClosureConfig
impl Freeze for VoLoopClosureConfig
impl Move for VoLoopClosureConfig
impl RefUnwindSafe for VoLoopClosureConfig
impl Send for VoLoopClosureConfig
impl Sync for VoLoopClosureConfig
impl Unpin for VoLoopClosureConfig
impl UnsafeUnpin for VoLoopClosureConfig
impl UnwindSafe for VoLoopClosureConfig
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
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.