pub struct DriveFuture<'a, M, L, A, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,{ /* private fields */ }Expand description
Drives the robot forward or backwards for a distance at a given heading.
Implementations§
Source§impl<M, L, A, T> DriveFuture<'_, M, L, A, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
impl<M, L, A, T> DriveFuture<'_, M, L, A, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
Sourcepub fn with_linear_controller(&mut self, controller: L) -> &mut Self
pub fn with_linear_controller(&mut self, controller: L) -> &mut Self
Modifies this motion’s linear feedback controller.
Sourcepub fn with_angular_controller(&mut self, controller: A) -> &mut Self
pub fn with_angular_controller(&mut self, controller: A) -> &mut Self
Modifies this motion’s angular feedback controller.
Sourcepub const fn with_timeout(&mut self, timeout: Duration) -> &mut Self
pub const fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Modifies this motion’s timeout duration.
Sourcepub const fn without_timeout(&mut self) -> &mut Self
pub const fn without_timeout(&mut self) -> &mut Self
Removes this motion’s timeout duration.
Sourcepub const fn with_linear_tolerances(
&mut self,
tolerances: Tolerances,
) -> &mut Self
pub const fn with_linear_tolerances( &mut self, tolerances: Tolerances, ) -> &mut Self
Modifies this motion’s linear tolerances.
Sourcepub const fn with_linear_error_tolerance(&mut self, tolerance: f64) -> &mut Self
pub const fn with_linear_error_tolerance(&mut self, tolerance: f64) -> &mut Self
Modifies this motion’s linear error tolerance.
Sourcepub const fn without_linear_error_tolerance(&mut self) -> &mut Self
pub const fn without_linear_error_tolerance(&mut self) -> &mut Self
Removes this motion’s linear error tolerance.
Sourcepub const fn with_linear_velocity_tolerance(
&mut self,
tolerance: f64,
) -> &mut Self
pub const fn with_linear_velocity_tolerance( &mut self, tolerance: f64, ) -> &mut Self
Modifies this motion’s linear velocity tolerance.
Sourcepub const fn without_linear_velocity_tolerance(&mut self) -> &mut Self
pub const fn without_linear_velocity_tolerance(&mut self) -> &mut Self
Removes this motion’s linear velocity tolerance.
Sourcepub const fn with_linear_tolerance_duration(
&mut self,
duration: Duration,
) -> &mut Self
pub const fn with_linear_tolerance_duration( &mut self, duration: Duration, ) -> &mut Self
Modifies this motion’s linear tolerance duration.
Sourcepub const fn without_linear_tolerance_duration(&mut self) -> &mut Self
pub const fn without_linear_tolerance_duration(&mut self) -> &mut Self
Removes this motion’s linear tolerance duration.
Sourcepub const fn without_tolerance_duration(&mut self) -> &mut Self
pub const fn without_tolerance_duration(&mut self) -> &mut Self
Removes this motion’s linear and angular tolerance durations.
Sourcepub const fn with_angular_tolerances(
&mut self,
tolerances: Tolerances,
) -> &mut Self
pub const fn with_angular_tolerances( &mut self, tolerances: Tolerances, ) -> &mut Self
Modifies this motion’s angular tolerances.
Sourcepub const fn with_angular_error_tolerance(
&mut self,
tolerance: f64,
) -> &mut Self
pub const fn with_angular_error_tolerance( &mut self, tolerance: f64, ) -> &mut Self
Modifies this motion’s angular error tolerance.
Sourcepub const fn without_angular_error_tolerance(&mut self) -> &mut Self
pub const fn without_angular_error_tolerance(&mut self) -> &mut Self
Removes this motion’s angular error tolerance.
Sourcepub const fn with_angular_velocity_tolerance(
&mut self,
tolerance: f64,
) -> &mut Self
pub const fn with_angular_velocity_tolerance( &mut self, tolerance: f64, ) -> &mut Self
Modifies this motion’s angular velocity tolerance.
Sourcepub const fn without_angular_velocity_tolerance(&mut self) -> &mut Self
pub const fn without_angular_velocity_tolerance(&mut self) -> &mut Self
Removes this motion’s angular velocity tolerance.
Sourcepub const fn with_angular_tolerance_duration(
&mut self,
duration: Duration,
) -> &mut Self
pub const fn with_angular_tolerance_duration( &mut self, duration: Duration, ) -> &mut Self
Modifies this motion’s angular tolerance duration.
Sourcepub const fn without_angular_tolerance_duration(&mut self) -> &mut Self
pub const fn without_angular_tolerance_duration(&mut self) -> &mut Self
Removes this motion’s angular tolerance duration.
Source§impl<M, A, T> DriveFuture<'_, M, Pid, A, T>where
M: Arcade,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
impl<M, A, T> DriveFuture<'_, M, Pid, A, T>where
M: Arcade,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
Sourcepub const fn with_linear_gains(
&mut self,
kp: f64,
ki: f64,
kd: f64,
) -> &mut Self
pub const fn with_linear_gains( &mut self, kp: f64, ki: f64, kd: f64, ) -> &mut Self
Modifies this motion’s linear PID gains.
Sourcepub const fn with_linear_kp(&mut self, kp: f64) -> &mut Self
pub const fn with_linear_kp(&mut self, kp: f64) -> &mut Self
Modifies this motion’s linear proportional gain (kp).
Sourcepub const fn with_linear_ki(&mut self, ki: f64) -> &mut Self
pub const fn with_linear_ki(&mut self, ki: f64) -> &mut Self
Modifies this motion’s linear integral gain (ki).
Sourcepub const fn with_linear_kd(&mut self, kd: f64) -> &mut Self
pub const fn with_linear_kd(&mut self, kd: f64) -> &mut Self
Modifies this motion’s linear derivative gain (kd).
Sourcepub const fn with_linear_integration_range(
&mut self,
integration_range: f64,
) -> &mut Self
pub const fn with_linear_integration_range( &mut self, integration_range: f64, ) -> &mut Self
Modifies this motion’s linear integration range.
Sourcepub const fn without_linear_integration_range(&mut self) -> &mut Self
pub const fn without_linear_integration_range(&mut self) -> &mut Self
Removes this motion’s linear integration range.
Sourcepub const fn with_linear_output_limit(&mut self, limit: f64) -> &mut Self
pub const fn with_linear_output_limit(&mut self, limit: f64) -> &mut Self
Modifies this motion’s linear output limit.
Sourcepub const fn without_linear_output_limit(&mut self) -> &mut Self
pub const fn without_linear_output_limit(&mut self) -> &mut Self
Removes this motion’s linear output limit.
Source§impl<M, L, T> DriveFuture<'_, M, L, AngularPid, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
impl<M, L, T> DriveFuture<'_, M, L, AngularPid, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
Sourcepub const fn with_angular_gains(
&mut self,
kp: f64,
ki: f64,
kd: f64,
) -> &mut Self
pub const fn with_angular_gains( &mut self, kp: f64, ki: f64, kd: f64, ) -> &mut Self
Modifies this motion’s angular PID gains.
Sourcepub const fn with_angular_kp(&mut self, kp: f64) -> &mut Self
pub const fn with_angular_kp(&mut self, kp: f64) -> &mut Self
Modifies this motion’s angular proportional gain (kp).
Sourcepub const fn with_angular_ki(&mut self, ki: f64) -> &mut Self
pub const fn with_angular_ki(&mut self, ki: f64) -> &mut Self
Modifies this motion’s angular integral gain (ki).
Sourcepub const fn with_angular_kd(&mut self, kd: f64) -> &mut Self
pub const fn with_angular_kd(&mut self, kd: f64) -> &mut Self
Modifies this motion’s angular derivative gain (kd).
Sourcepub const fn with_angular_integration_range(
&mut self,
integration_range: Angle,
) -> &mut Self
pub const fn with_angular_integration_range( &mut self, integration_range: Angle, ) -> &mut Self
Modifies this motion’s angular integration range.
Sourcepub const fn with_angular_output_limit(&mut self, limit: f64) -> &mut Self
pub const fn with_angular_output_limit(&mut self, limit: f64) -> &mut Self
Modifies this motion’s angular output limit.
Sourcepub const fn without_angular_integration_range(&mut self) -> &mut Self
pub const fn without_angular_integration_range(&mut self) -> &mut Self
Removes this motion’s angular integration range.
Sourcepub const fn without_angular_output_limit(&mut self) -> &mut Self
pub const fn without_angular_output_limit(&mut self) -> &mut Self
Removes this motion’s angular output limit.
Trait Implementations§
Source§impl<M, L, A, T> Future for DriveFuture<'_, M, L, A, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
impl<M, L, A, T> Future for DriveFuture<'_, M, L, A, T>where
M: Arcade,
L: Feedback<State = f64, Signal = f64> + Unpin,
A: Feedback<State = Angle, Signal = f64> + Unpin,
T: TracksForwardTravel + TracksHeading + TracksVelocity,
Auto Trait Implementations§
impl<'a, M, L, A, T> Freeze for DriveFuture<'a, M, L, A, T>where
L: Freeze,
A: Freeze,
impl<'a, M, L, A, T> RefUnwindSafe for DriveFuture<'a, M, L, A, T>where
L: RefUnwindSafe,
A: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, M, L, A, T> Send for DriveFuture<'a, M, L, A, T>where
L: Send,
A: Send,
M: Send,
T: Send,
impl<'a, M, L, A, T> Sync for DriveFuture<'a, M, L, A, T>where
L: Sync,
A: Sync,
M: Sync,
T: Sync,
impl<'a, M, L, A, T> Unpin for DriveFuture<'a, M, L, A, T>
impl<'a, M, L, A, T> UnsafeUnpin for DriveFuture<'a, M, L, A, T>where
L: UnsafeUnpin,
A: UnsafeUnpin,
impl<'a, M, L, A, T> !UnwindSafe for DriveFuture<'a, M, L, A, T>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for Twhere
T: Future + ?Sized,
impl<T> FutureExt for Twhere
T: Future + ?Sized,
Source§fn map<U, F>(self, f: F) -> Map<Self, F>where
F: FnOnce(Self::Output) -> U,
Self: Sized,
fn map<U, F>(self, f: F) -> Map<Self, F>where
F: FnOnce(Self::Output) -> U,
Self: Sized,
Source§fn map_into<U>(self) -> MapInto<Self, U>where
Self::Output: Into<U>,
Self: Sized,
fn map_into<U>(self) -> MapInto<Self, U>where
Self::Output: Into<U>,
Self: Sized,
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
Self: Sized,
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
Self: Sized,
f. Read moreSource§fn left_future<B>(self) -> Either<Self, B>where
B: Future<Output = Self::Output>,
Self: Sized,
fn left_future<B>(self) -> Either<Self, B>where
B: Future<Output = Self::Output>,
Self: Sized,
Source§fn right_future<A>(self) -> Either<A, Self>where
A: Future<Output = Self::Output>,
Self: Sized,
fn right_future<A>(self) -> Either<A, Self>where
A: Future<Output = Self::Output>,
Self: Sized,
Source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
Source§fn flatten(self) -> Flatten<Self>where
Self::Output: Future,
Self: Sized,
fn flatten(self) -> Flatten<Self>where
Self::Output: Future,
Self: Sized,
Source§fn flatten_stream(self) -> FlattenStream<Self>where
Self::Output: Stream,
Self: Sized,
fn flatten_stream(self) -> FlattenStream<Self>where
Self::Output: Stream,
Self: Sized,
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
poll will never again be called once it has
completed. This method can be used to turn any Future into a
FusedFuture. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F>where
F: FnOnce(&Self::Output),
Self: Sized,
fn inspect<F>(self, f: F) -> Inspect<Self, F>where
F: FnOnce(&Self::Output),
Self: Sized,
Source§fn unit_error(self) -> UnitError<Self>where
Self: Sized,
fn unit_error(self) -> UnitError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = ()>.Source§fn never_error(self) -> NeverError<Self>where
Self: Sized,
fn never_error(self) -> NeverError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = Never>.Source§fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>where
Self: Unpin,
fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>where
Self: Unpin,
Future::poll on Unpin future types.Source§fn now_or_never(self) -> Option<Self::Output>where
Self: Sized,
fn now_or_never(self) -> Option<Self::Output>where
Self: Sized,
Future::poll. Read more