pub struct LidarGraphSlam { /* private fields */ }Expand description
Scan-to-map odometry with pose-graph loop closure.
Implementations§
Source§impl LidarGraphSlam
impl LidarGraphSlam
Sourcepub fn new(config: LidarGraphSlamConfig, initial_pose: Pose2D) -> Self
pub fn new(config: LidarGraphSlamConfig, initial_pose: Pose2D) -> Self
Creates a SLAM instance whose graph frame starts at initial_pose.
Sourcepub fn config(&self) -> &LidarGraphSlamConfig
pub fn config(&self) -> &LidarGraphSlamConfig
Configuration.
Sourcepub fn pose(&self) -> Pose2D
pub fn pose(&self) -> Pose2D
Best current pose estimate: last optimized node plus front-end motion since.
Sourcepub fn front_end_pose(&self) -> Pose2D
pub fn front_end_pose(&self) -> Pose2D
Front-end (odometry-only) pose, without loop closure.
Sourcepub fn node_poses(&self) -> Vec<Pose2D>
pub fn node_poses(&self) -> Vec<Pose2D>
Optimized pose-graph node poses.
Sourcepub fn node_front_end_poses(&self) -> Vec<Pose2D>
pub fn node_front_end_poses(&self) -> Vec<Pose2D>
Front-end poses recorded when each node was created.
Sourcepub fn node_scan(&self, index: usize) -> Option<&[Vector2<f64>]>
pub fn node_scan(&self, index: usize) -> Option<&[Vector2<f64>]>
Body-frame scan stored with node index, if it exists.
Sourcepub fn loop_closures(&self) -> &[LoopClosure]
pub fn loop_closures(&self) -> &[LoopClosure]
Accepted loop closures, oldest first.
Sourcepub fn ambiguous_loop_rejections(&self) -> usize
pub fn ambiguous_loop_rejections(&self) -> usize
Number of loop matches rejected as ambiguous (perceptual aliasing).
Sourcepub fn map_points(&self) -> Vec<Vector2<f64>> ⓘ
pub fn map_points(&self) -> Vec<Vector2<f64>> ⓘ
All node scans rendered at their optimized poses.
Sourcepub fn update(
&mut self,
odom_delta: Pose2D,
scan_body: &[Vector2<f64>],
) -> LidarGraphSlamUpdate
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.
Sourcepub fn background_step(&mut self, max_iterations: usize) -> bool
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.
Sourcepub fn background_pending(&self) -> bool
pub fn background_pending(&self) -> bool
Whether Self::background_step still has queued loop checks or a
pending optimization.
Sourcepub fn optimize(&mut self)
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.
Sourcepub fn optimization_pending(&self) -> bool
pub fn optimization_pending(&self) -> bool
Whether a disagreeing loop edge is waiting for (more) optimization.
Only set when LidarGraphSlamConfig::deferred_optimization is on.
Sourcepub fn optimize_step(&mut self, max_iterations: usize) -> bool
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
impl Clone for LidarGraphSlam
Auto Trait Implementations§
impl Freeze for LidarGraphSlam
impl RefUnwindSafe for LidarGraphSlam
impl Send for LidarGraphSlam
impl Sync for LidarGraphSlam
impl Unpin for LidarGraphSlam
impl UnsafeUnpin for LidarGraphSlam
impl UnwindSafe for LidarGraphSlam
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.