Skip to main content

LoopAppearanceCandidateConfig

Struct LoopAppearanceCandidateConfig 

Source
pub struct LoopAppearanceCandidateConfig {
Show 14 fields pub min_keyframe_id_gap: u64, pub max_candidates_per_frame: usize, pub min_similarity: f32, pub min_candidate_landmark_count: usize, pub covisibility_max_keyframes: usize, pub covisibility_min_shared_landmarks: usize, pub min_covisible_keyframe_verifications: usize, pub max_covisibility_translation_disagreement_meters: f64, pub max_covisibility_rotation_disagreement_radians: f64, pub region_confirmation_required_keyframes: usize, pub region_confirmation_max_misses: usize, pub projection_search_radius_px: Option<f64>, pub min_projection_correspondence_count: usize, pub pnp_verifier: PnPLoopClosureVerifierConfig,
}
Expand description

Opt-in appearance-based long-range loop-candidate source for OnlineSlamLoopClosureRefinementConfig. The shared-landmark detector (detect_loop_closure_candidates) can only ever propose candidates that still reference the SAME map landmark ids the current frame’s inliers carry; once the tracker drifts around a loop and revisits a place, the mapper has typically re-triangulated fresh landmark ids for the very same walls, so shared-id candidates are inherently short-range (near-in-time keyframes only). This stream instead ranks past keyframes by cosine similarity of their cached mean local descriptor against the current frame’s, restricted to candidates at least min_keyframe_id_gap keyframe-ids older — i.e. genuinely long-range, appearance-only place recognition, mirroring OnlineSlamRelocalizationAppearanceConfig’s retrieval machinery (relocalization_mean_descriptor / cosine ranking) but tuned for long-range loop detection rather than short-range recovery-after-loss.

Each ranked candidate keyframe is verified by building 2D-3D correspondences via descriptor matching (current frame descriptors against the candidate keyframe’s own observed landmarks’ descriptors — there is no shared-id assembly to fall back to, by construction) and running them through PnPLoopClosureVerifier configured by pnp_verifier. Accepted candidates flow through the exact same downstream fold as shared-landmark candidates (PCM / covariance gate / PGO / GNC / write-back).

Fields§

§min_keyframe_id_gap: u64

Minimum keyframe-id gap between the newly-registered keyframe and a candidate older keyframe. This is what makes the stream long-range: set it comfortably above the span the shared-landmark detector and local mapping window already cover.

§max_candidates_per_frame: usize

Maximum number of appearance-ranked candidate keyframes verified per frame. Bounds the per-frame PnP-verification cost.

§min_similarity: f32

Minimum cosine similarity between the current frame’s mean local descriptor and a candidate keyframe’s cached mean local descriptor.

§min_candidate_landmark_count: usize

Minimum number of descriptor-bearing landmarks a candidate keyframe must observe before appearance verification runs against it. A keyframe with fewer descriptors than pnp_verifier.min_inliers can never pass the PnP gate anyway, so this is a cheap early reject.

§covisibility_max_keyframes: usize

Number of strongest covisible neighbors gathered on each side of a candidate, matching ORB-SLAM3’s ten-keyframe local-region search.

§covisibility_min_shared_landmarks: usize

Shared landmark floor used to define a covisibility edge.

§min_covisible_keyframe_verifications: usize

Number of current-region keyframes that must independently PnP-verify against the matched candidate region. Includes the current keyframe.

§max_covisibility_translation_disagreement_meters: f64

Maximum translation disagreement between a neighbor’s independent PnP loop pose and the primary loop pose propagated through local odometry.

§max_covisibility_rotation_disagreement_radians: f64

Rotation counterpart of max_covisibility_translation_disagreement_meters.

§region_confirmation_required_keyframes: usize

Number of separate current keyframes that must verify the same covisible candidate region before it may enter the graph.

§region_confirmation_max_misses: usize

Consecutive keyframes allowed to miss a pending region before reset.

§projection_search_radius_px: Option<f64>

Optional ORB-SLAM3-style post-PnP projection search radius. When set, the primary appearance PnP pose projects the candidate region into the current image, rematches only inside each landmark’s pixel window, and requires a second PnP verification before covisibility confirmation.

§min_projection_correspondence_count: usize

Minimum one-to-one projection-guided correspondences required before the refined PnP solve. ORB-SLAM3 uses a 50-match pre-optimization gate; this remains configurable because visloc-rs uses SuperPoint rather than ORB descriptors and must measure its own correspondence distribution.

§pnp_verifier: PnPLoopClosureVerifierConfig

PnP RANSAC verifier thresholds. min_inliers defaults higher than the shared-landmark PnP path’s default because a false long-range loop closure is catastrophic (it can fold the whole trajectory into a wrong basin), so this stream demands stronger evidence before admitting a candidate.

Trait Implementations§

Source§

impl Clone for LoopAppearanceCandidateConfig

Source§

fn clone(&self) -> LoopAppearanceCandidateConfig

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 LoopAppearanceCandidateConfig

Source§

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

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

impl Default for LoopAppearanceCandidateConfig

Source§

fn default() -> LoopAppearanceCandidateConfig

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

impl PartialEq for LoopAppearanceCandidateConfig

Source§

fn eq(&self, other: &LoopAppearanceCandidateConfig) -> 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 LoopAppearanceCandidateConfig

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