Skip to main content

WheelCalibration

Struct WheelCalibration 

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

Pairs wheel odometry with VIO poses and map localizations as they arrive and fits where the wheel odometry is measured.

Implementations§

Source§

impl WheelCalibration

Source

pub fn new(config: WheelCalibrationConfig, imu_from_body: SE3) -> Self

Pairs with a VIO, imu_from_body being the robot description’s transform from the odometry’s body (e.g. base_link) to the VIO’s IMU.

Source

pub fn without_vio(config: WheelCalibrationConfig) -> Self

Pairs with map localizations only, until Self::set_imu_from_body.

Source

pub fn with_prior(self, prior: WheelCalibrationEstimate) -> Self

Values for what the pairs do not show yet (e.g. a saved calibration).

Source

pub fn set_imu_from_body(&mut self, imu_from_body: SE3)

Where the VIO’s IMU sits on the body; VIO poses pair from now on.

Source

pub const fn has_imu_from_body(&self) -> bool

Source

pub fn pairs(&self) -> usize

Pairs with the VIO.

Source

pub fn fixes(&self) -> usize

Map localizations paired with the wheel odometry.

Source

pub fn turned_deg(&self) -> f64

Total turn of the wheel odometry over the VIO pairs, in degrees.

Source

pub fn travel_m(&self) -> f64

The wheel odometry’s path length over the VIO pairs, in its own units.

Source

pub fn fix_turned_deg(&self) -> f64

Turn and path of the wheel odometry between map localizations.

Source

pub fn fix_travel_m(&self) -> f64

Source

pub fn is_ready(&self) -> bool

Whether the VIO pairs have seen enough turning and travel to give the offset.

Source

pub fn fixes_ready(&self) -> bool

Whether there are enough map localizations to give the level.

Source

pub fn fixes_travelled(&self) -> bool

Whether the map localizations have also travelled enough to give the scale.

Source

pub fn add_vio(&mut self, timestamp_ns: i64, world_from_imu: &SE3)

Adds a VIO pose (the IMU in the VIO’s gravity-aligned world), in time order.

Source

pub fn add_wheel(&mut self, timestamp_ns: i64, odom_from_wheel: &SE3)

Adds a wheel odometry pose (its point, level), in time order.

Source

pub fn add_fix(&mut self, timestamp_ns: i64, map_from_body: &SE3)

Adds a localization against a map: the body’s pose in the map (gravity-aligned), at its image’s stamp. It pairs with the wheel odometry interpolated to that stamp, now or once the wheel odometry gets there.

Source

pub fn estimate(&self) -> Option<WheelCalibrationEstimate>

The fit over the pairs so far: the offset from the VIO (from the map localizations without one), the level from the map localizations (from the VIO without them), the scale from the map localizations, the rest from the prior. None until the VIO pairs are ready or the map localizations ready.

Trait Implementations§

Source§

impl Clone for WheelCalibration

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 WheelCalibration

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

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

Source§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

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

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

Source§

fn vzip(self) -> V