Struct TurnToPointFuture

Source
pub struct TurnToPointFuture<'a, L: ControlLoop<Input = f64, Output = f64> + Unpin, A: ControlLoop<Input = Angle, Output = f64> + Unpin, T: TracksPosition + TracksHeading + TracksVelocity> { /* private fields */ }
Expand description

Turns the robot to face a point on the field.

Implementations§

Source§

impl<L: ControlLoop<Input = f64, Output = f64> + Unpin, A: ControlLoop<Input = Angle, Output = f64> + Unpin, T: TracksPosition + TracksForwardTravel + TracksHeading + TracksVelocity> TurnToPointFuture<'_, L, A, T>

Source

pub fn with_linear_controller(&mut self, controller: L) -> &mut Self

Modifies this motion’s linear feedback controller.

Source

pub fn with_angular_controller(&mut self, controller: A) -> &mut Self

Modifies this motion’s angular feedback controller.

Source

pub const fn with_timeout(&mut self, timeout: Duration) -> &mut Self

Modifies this motion’s timeout duration.

Source

pub const fn without_timeout(&mut self) -> &mut Self

Removes this motion’s timeout duration.

Source

pub const fn with_linear_tolerances( &mut self, tolerances: Tolerances, ) -> &mut Self

Modifies this motion’s linear tolerances.

Source

pub const fn with_linear_error_tolerance(&mut self, tolerance: f64) -> &mut Self

Modifies this motion’s linear error tolerance.

Source

pub const fn without_linear_error_tolerance(&mut self) -> &mut Self

Removes this motion’s linear error tolerance.

Source

pub const fn with_linear_velocity_tolerance( &mut self, tolerance: f64, ) -> &mut Self

Modifies this motion’s linear velocity tolerance.

Source

pub const fn without_linear_velocity_tolerance(&mut self) -> &mut Self

Removes this motion’s linear velocity tolerance.

Source

pub const fn with_linear_tolerance_duration( &mut self, duration: Duration, ) -> &mut Self

Modifies this motion’s linear tolerance duration.

Source

pub const fn without_linear_tolerance_duration(&mut self) -> &mut Self

Removes this motion’s linear tolerance duration.

Source

pub const fn with_angular_tolerances( &mut self, tolerances: Tolerances, ) -> &mut Self

Modifies this motion’s angular tolerances.

Source

pub const fn with_angular_error_tolerance( &mut self, tolerance: f64, ) -> &mut Self

Modifies this motion’s angular error tolerance.

Source

pub const fn without_angular_error_tolerance(&mut self) -> &mut Self

Removes this motion’s angular error tolerance.

Source

pub const fn with_angular_velocity_tolerance( &mut self, tolerance: f64, ) -> &mut Self

Modifies this motion’s angular velocity tolerance.

Source

pub const fn without_angular_velocity_tolerance(&mut self) -> &mut Self

Removes this motion’s angular velocity tolerance.

Source

pub const fn with_angular_tolerance_duration( &mut self, duration: Duration, ) -> &mut Self

Modifies this motion’s angular tolerance duration.

Source

pub const fn without_angular_tolerance_duration(&mut self) -> &mut Self

Removes this motion’s angular tolerance duration.

Source§

impl<A: ControlLoop<Input = Angle, Output = f64> + Unpin, T: TracksPosition + TracksForwardTravel + TracksHeading + TracksVelocity> TurnToPointFuture<'_, Pid, A, T>

Source

pub const fn with_linear_gains( &mut self, kp: f64, ki: f64, kd: f64, ) -> &mut Self

Modifies this motion’s linear PID gains.

Source

pub const fn with_linear_kp(&mut self, kp: f64) -> &mut Self

Modifies this motion’s linear proportional gain (kp).

Source

pub const fn with_linear_ki(&mut self, ki: f64) -> &mut Self

Modifies this motion’s linear integral gain (ki).

Source

pub const fn with_linear_kd(&mut self, kd: f64) -> &mut Self

Modifies this motion’s linear derivative gain (kd).

Source

pub const fn with_linear_integration_range( &mut self, integration_range: f64, ) -> &mut Self

Modifies this motion’s linear integration range.

Source

pub const fn without_linear_integration_range(&mut self) -> &mut Self

Removes this motion’s linear integration range.

Source

pub const fn with_linear_output_limit(&mut self, limit: f64) -> &mut Self

Modifies this motion’s linear output limit.

Source

pub const fn without_linear_output_limit(&mut self) -> &mut Self

Removes this motion’s linear output limit.

Source§

impl<L: ControlLoop<Input = f64, Output = f64> + Unpin, T: TracksPosition + TracksForwardTravel + TracksHeading + TracksVelocity> TurnToPointFuture<'_, L, AngularPid, T>

Source

pub const fn with_angular_gains( &mut self, kp: f64, ki: f64, kd: f64, ) -> &mut Self

Modifies this motion’s angular PID gains.

Source

pub const fn with_angular_kp(&mut self, kp: f64) -> &mut Self

Modifies this motion’s angular proportional gain (kp).

Source

pub const fn with_angular_ki(&mut self, ki: f64) -> &mut Self

Modifies this motion’s angular integral gain (ki).

Source

pub const fn with_angular_kd(&mut self, kd: f64) -> &mut Self

Modifies this motion’s angular derivative gain (kd).

Source

pub const fn with_angular_integration_range( &mut self, integration_range: Angle, ) -> &mut Self

Modifies this motion’s angular integration range.

Source

pub const fn with_angular_output_limit(&mut self, limit: f64) -> &mut Self

Modifies this motion’s angular output limit.

Source

pub const fn without_angular_integration_range(&mut self) -> &mut Self

Removes this motion’s angular integration range.

Source

pub const fn without_angular_output_limit(&mut self) -> &mut Self

Removes this motion’s angular output limit.

Trait Implementations§

Source§

impl<L: ControlLoop<Input = f64, Output = f64> + Unpin, A: ControlLoop<Input = Angle, Output = f64> + Unpin, T: TracksForwardTravel + TracksHeading + TracksVelocity + TracksPosition> Future for TurnToPointFuture<'_, L, A, T>

Source§

type Output = ()

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

§

impl<'a, L, A, T> Freeze for TurnToPointFuture<'a, L, A, T>
where L: Freeze, A: Freeze,

§

impl<'a, L, A, T> !RefUnwindSafe for TurnToPointFuture<'a, L, A, T>

§

impl<'a, L, A, T> !Send for TurnToPointFuture<'a, L, A, T>

§

impl<'a, L, A, T> !Sync for TurnToPointFuture<'a, L, A, T>

§

impl<'a, L, A, T> Unpin for TurnToPointFuture<'a, L, A, T>

§

impl<'a, L, A, T> !UnwindSafe for TurnToPointFuture<'a, L, A, T>

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<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
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.