pub struct OdomCorrection { /* private fields */ }Implementations§
Source§impl OdomCorrection
impl OdomCorrection
pub fn new(config: OdomCorrectionConfig) -> Self
pub const fn config(&self) -> &OdomCorrectionConfig
Sourcepub const fn is_set(&self) -> bool
pub const fn is_set(&self) -> bool
Whether the offset is set, i.e. odometry poses have a map pose.
Sourcepub fn map_from_odom(&self) -> Option<SE3>
pub fn map_from_odom(&self) -> Option<SE3>
The current odometry-to-map transform, once set.
Sourcepub fn last_fix(&self) -> Option<(i64, Vector3<f64>)>
pub fn last_fix(&self) -> Option<(i64, Vector3<f64>)>
Timestamp and odometry position of the newest fix the offset uses.
The error of Self::map_from_body grows with the odometry travel
(and time) since this fix, so callers can use it to judge a pose.
Sourcepub fn map_from_body(&self, odom_from_body: &SE3) -> Option<SE3>
pub fn map_from_body(&self, odom_from_body: &SE3) -> Option<SE3>
An odometry pose expressed in the map frame, once set.
Sourcepub fn observe_odometry(&mut self, timestamp_ns: i64, odom_from_body: &SE3)
pub fn observe_odometry(&mut self, timestamp_ns: i64, odom_from_body: &SE3)
Adds an odometry pose, so the gate measures the odometry’s travel along its path rather than between fixes. Poses must arrive in time order (older or repeated stamps are ignored), but may run ahead of the fixes: a fix’s travel is read off the path at its own stamp.
Sourcepub fn add_fix(
&mut self,
timestamp_ns: i64,
map_from_body: &SE3,
odom_from_body: &SE3,
) -> FixOutcome
pub fn add_fix( &mut self, timestamp_ns: i64, map_from_body: &SE3, odom_from_body: &SE3, ) -> FixOutcome
Adds a map fix: the body’s map pose from localization, and its odometry pose at the same instant. Fixes must arrive in time order.
Sourcepub fn add_weak_fix(
&mut self,
timestamp_ns: i64,
map_from_body: &SE3,
odom_from_body: &SE3,
) -> FixOutcome
pub fn add_weak_fix( &mut self, timestamp_ns: i64, map_from_body: &SE3, odom_from_body: &SE3, ) -> FixOutcome
Adds a weak fix: a localization with fewer inliers than a fix needs.
It counts toward setting the first offset, which then takes
init_fixes_weak agreeing fixes, and is FixOutcome::Unused once
the offset is set.
Trait Implementations§
Source§impl Clone for OdomCorrection
impl Clone for OdomCorrection
Auto Trait Implementations§
impl Forget for OdomCorrection
impl Freeze for OdomCorrection
impl Move for OdomCorrection
impl RefUnwindSafe for OdomCorrection
impl Send for OdomCorrection
impl Sync for OdomCorrection
impl Unpin for OdomCorrection
impl UnsafeUnpin for OdomCorrection
impl UnwindSafe for OdomCorrection
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,
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.