Skip to main content

VoLoopClosureConfig

Struct VoLoopClosureConfig 

Source
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: usize

Visual-word count for the VLAD vocabulary (k-means centroids).

§vocab_iterations: usize

Lloyd iterations for vocabulary construction.

§vocab_seed: u64

Deterministic seed for vocabulary k-means++ seeding.

§vocab_descriptor_stride: usize

Keep 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: usize

Minimum 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: f32

Minimum VLAD cosine similarity for a frame pair to become a candidate.

§max_candidates_per_frame: usize

Keep 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: PnPLoopClosureVerifierConfig

PnP loop-closure verifier thresholds.

§ransac: PnPRansac

PnP RANSAC backend used by the verifier.

§pnp_essential_inlier_filter: bool

Before 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: bool

Bias 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: PoseGraphSe3Config

SE(3) pose-graph solver configuration.

§gnc: GncConfig

GNC robust-optimization configuration.

§refine_loops_two_view: bool

Refine 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: bool

Give 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

Source§

fn clone(&self) -> VoLoopClosureConfig

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 VoLoopClosureConfig

Source§

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

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

impl Default for VoLoopClosureConfig

Source§

fn default() -> VoLoopClosureConfig

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

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<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