pub struct LidarMcl { /* private fields */ }Expand description
Particle-filter localization against an OccupancyGrid.
Implementations§
Source§impl LidarMcl
impl LidarMcl
Sourcepub fn new(grid: OccupancyGrid, config: LidarMclConfig) -> Self
pub fn new(grid: OccupancyGrid, config: LidarMclConfig) -> Self
Creates a filter on grid with particles spread uniformly over the
free cells (global localization).
Sourcepub fn grid(&self) -> &OccupancyGrid
pub fn grid(&self) -> &OccupancyGrid
The map being localized in.
Sourcepub fn initialize_global(&mut self)
pub fn initialize_global(&mut self)
Spreads the particles uniformly over the free space.
Sourcepub fn initialize_at(&mut self, pose: Pose2D, xy: f64, yaw: f64)
pub fn initialize_at(&mut self, pose: Pose2D, xy: f64, yaw: f64)
Spreads the particles around pose (position σ xy, heading σ yaw).
Sourcepub fn scan_match_candidates(
&self,
scan_body: &[Vector2<f64>],
count: usize,
) -> Vec<(Pose2D, f64)>
pub fn scan_match_candidates( &self, scan_body: &[Vector2<f64>], count: usize, ) -> Vec<(Pose2D, f64)>
Correlative scan matching (Olson, 2009) over the whole map: scores a
coarse lattice of free positions × headings against a wide likelihood
field, refines the best by local search on the fine field, and returns
up to count distinct poses with their per-beam likelihood, best
first. Look-alike places come back as separate candidates.
Sourcepub fn candidates(&self) -> &[(Pose2D, f64)]
pub fn candidates(&self) -> &[(Pose2D, f64)]
The current scan-matching candidates (refreshed during updates).
Sourcepub fn update(&mut self, scan_body: &[Vector2<f64>])
pub fn update(&mut self, scan_body: &[Vector2<f64>])
Measurement update and resampling with a beam-ordered body-frame scan.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LidarMcl
impl RefUnwindSafe for LidarMcl
impl Send for LidarMcl
impl Sync for LidarMcl
impl Unpin for LidarMcl
impl UnsafeUnpin for LidarMcl
impl UnwindSafe for LidarMcl
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.