pub struct SlamSystem { /* private fields */ }Expand description
Top-level ORB-SLAM system: orchestrates tracking, mapping, and state transitions.
Implementations§
Source§impl SlamSystem
impl SlamSystem
Sourcepub fn new(camera: PinholeCamera, config: SlamConfig) -> Self
pub fn new(camera: PinholeCamera, config: SlamConfig) -> Self
Creates a new system with identity pose.
Sourcepub fn with_rig(rig: SensorRig, config: SlamConfig) -> Self
pub fn with_rig(rig: SensorRig, config: SlamConfig) -> Self
Builds a system from an explicit sensor rig, so IMU noise parameters and extrinsics can be supplied for the actual sensor.
Sourcepub fn set_vocabulary(&mut self, vocabulary: Vocabulary)
pub fn set_vocabulary(&mut self, vocabulary: Vocabulary)
Enables appearance-based loop detection with a bag-of-words vocabulary. Without it, keyframes are not indexed and no loop candidates are emitted.
pub fn drain_loop_closure_events(&mut self) -> Vec<LoopClosureEvent>
Sourcepub fn set_imu_extrinsics(&mut self, t_bc: Pose3d)
pub fn set_imu_extrinsics(&mut self, t_bc: Pose3d)
Enables the inertial path by providing the camera-to-body extrinsic
T_BC (X_body = T_BC * X_cam). Without it, IMU samples are ignored.
Sourcepub fn process_frame(
&mut self,
frame: Frame,
previous_image: Option<&Image<u8, 1>>,
current_image: &Image<u8, 1>,
timestamp_sec: f64,
imu_samples: Vec<ImuMeasurement>,
) -> TrackingResult
pub fn process_frame( &mut self, frame: Frame, previous_image: Option<&Image<u8, 1>>, current_image: &Image<u8, 1>, timestamp_sec: f64, imu_samples: Vec<ImuMeasurement>, ) -> TrackingResult
Processes one frame (pre-extracted features) and returns the tracking result.
Sourcepub fn with_map_points<R>(&self, f: impl FnOnce(&[MapPoint]) -> R) -> R
pub fn with_map_points<R>(&self, f: impl FnOnce(&[MapPoint]) -> R) -> R
Runs f against the live map points, holding the map lock only for the
duration of the call. Avoids cloning the whole point list (descriptors
included) for read-only consumers such as viz logging and summaries.
Sourcepub fn current_keyframe_idx(&self) -> Option<usize>
pub fn current_keyframe_idx(&self) -> Option<usize>
Returns the index of the current reference keyframe, if tracking has one.
Sourcepub fn num_active_map_points(&self) -> usize
pub fn num_active_map_points(&self) -> usize
Returns the number of active (non-culled) map points.
Sourcepub fn drain_debug_messages(&mut self) -> Vec<String>
pub fn drain_debug_messages(&mut self) -> Vec<String>
Drain any debug messages accumulated since the last call.
Auto Trait Implementations§
impl !Freeze for SlamSystem
impl !RefUnwindSafe for SlamSystem
impl !Sync for SlamSystem
impl !UnwindSafe for SlamSystem
impl Send for SlamSystem
impl Unpin for SlamSystem
impl UnsafeUnpin for SlamSystem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<Src> ConvertColorExt for Src
impl<Src> ConvertColorExt for Src
Source§fn cvt<Dst>(&self) -> Result<Dst, ImageError>
fn cvt<Dst>(&self) -> Result<Dst, ImageError>
Dst. Dst is chosen by inference or turbofish.Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
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.