WheeledTracking

Struct WheeledTracking 

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

Tracking system that uses wheels to track position and orientation.

Implementations§

Source§

impl WheeledTracking

Source

pub fn new<T: RotarySensor + 'static, U: RotarySensor + 'static, const NUM_FORWARD: usize, const NUM_SIDEWAYS: usize>( origin: Vec2<f64>, heading: Angle, forward_wheels: [TrackingWheel<T>; NUM_FORWARD], sideways_wheels: [TrackingWheel<U>; NUM_SIDEWAYS], imu: Option<InertialSensor>, ) -> Self

Creates a new wheeled tracking system.

Source

pub fn forward_only<T: RotarySensor + 'static, const NUM_FORWARD: usize>( origin: Vec2<f64>, heading: Angle, forward_wheels: [TrackingWheel<T>; NUM_FORWARD], imu: Option<InertialSensor>, ) -> Self

Creates a new wheeled tracking system with no sideways tracking wheels.

Source

pub fn set_heading(&mut self, heading: Angle)

Offsets the currently tracked heading to a given Angle.

Source

pub fn set_position(&mut self, position: Vec2<f64>)

Sets the currently tracked position to a new point.

Trait Implementations§

Source§

impl Debug for WheeledTracking

Source§

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

Formats the value using the given formatter. Read more
Source§

impl TracksForwardTravel for WheeledTracking

Source§

fn forward_travel(&self) -> f64

Returns the signed forward wheel travel of the robot in wheel units. Read more
Source§

impl TracksHeading for WheeledTracking

Source§

fn heading(&self) -> Angle

Returns the robot’s orientation bounded from [0, 2π] radians.
Source§

impl TracksPosition for WheeledTracking

Source§

fn position(&self) -> Vec2<f64>

Return’s the robot’s position on a 2D cartesian coordinate plane measured in wheel units.
Source§

impl TracksVelocity for WheeledTracking

Source§

fn angular_velocity(&self) -> f64

Returns the robot’s estimated angular velocity in radians per second.
Source§

fn linear_velocity(&self) -> f64

Returns the robot’s estimated linear velocity in wheel units per second.

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.