Skip to main content

LidarGraphSlam

Struct LidarGraphSlam 

Source
pub struct LidarGraphSlam { /* private fields */ }
Expand description

Scan-to-map odometry with pose-graph loop closure.

Implementations§

Source§

impl LidarGraphSlam

Source

pub fn new(config: LidarGraphSlamConfig, initial_pose: Pose2D) -> Self

Creates a SLAM instance whose graph frame starts at initial_pose.

Source

pub fn config(&self) -> &LidarGraphSlamConfig

Configuration.

Source

pub fn pose(&self) -> Pose2D

Best current pose estimate: last optimized node plus front-end motion since.

Source

pub fn front_end_pose(&self) -> Pose2D

Front-end (odometry-only) pose, without loop closure.

Source

pub fn node_poses(&self) -> Vec<Pose2D>

Optimized pose-graph node poses.

Source

pub fn node_front_end_poses(&self) -> Vec<Pose2D>

Front-end poses recorded when each node was created.

Source

pub fn node_scan(&self, index: usize) -> Option<&[Vector2<f64>]>

Body-frame scan stored with node index, if it exists.

Source

pub fn loop_closures(&self) -> &[LoopClosure]

Accepted loop closures, oldest first.

Source

pub fn ambiguous_loop_rejections(&self) -> usize

Number of loop matches rejected as ambiguous (perceptual aliasing).

Source

pub fn edges(&self) -> &[Edge2D]

Pose-graph edges (odometry and loop) in insertion order.

Source

pub fn map_points(&self) -> Vec<Vector2<f64>> ⓘ

All node scans rendered at their optimized poses.

Source

pub fn update( &mut self, odom_delta: Pose2D, scan_body: &[Vector2<f64>], ) -> LidarGraphSlamUpdate

Integrates one odometry step and the beam-ordered body-frame scan at its end.

Source

pub fn background_step(&mut self, max_iterations: usize) -> bool

Spreads deferred work over frames: each call either takes one small step of queued loop verification (one registration, or two ambiguity re-registrations) or, once no loop check is queued, runs at most max_iterations optimizer iterations if a loop edge left the graph inconsistent. Call once per frame; returns whether work remains.

Source

pub fn background_pending(&self) -> bool

Whether Self::background_step still has queued loop checks or a pending optimization.

Source

pub fn optimize(&mut self)

Re-optimizes the pose graph over all odometry and loop edges.

Self::update calls this when a loop closure disagrees with the graph; call it explicitly to fold in consistent loop edges, e.g. before reading the final trajectory.

Source

pub fn optimization_pending(&self) -> bool

Whether a disagreeing loop edge is waiting for (more) optimization. Only set when LidarGraphSlamConfig::deferred_optimization is on.

Source

pub fn optimize_step(&mut self, max_iterations: usize) -> bool

Runs at most max_iterations optimizer iterations if optimization is pending, warm-started from the current node poses, and returns whether it is still pending. Call once per frame to bound the work per frame.

Trait Implementations§

Source§

impl Clone for LidarGraphSlam

Source§

fn clone(&self) -> Self

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 LidarGraphSlam

Source§

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

Formats the value using the given formatter. 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> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V