Skip to Content
VectorLib

MoveToPose

vectorlib::MoveToPose — fields, methods, parameters and return types.


pub struct MoveToPose<'a>

Builder returned by Chassis::move_to_pose.

View source

Methods

Prop

Type

forwards

pub fn forwards(self, forwards: bool) -> Self

Drive forwards (true, default) or backwards (false).

Parameters

Prop

Type

Returns

Self

View source

horizontal_drift

pub fn horizontal_drift(self, horizontal_drift: f32) -> Self

How fast the robot moves around corners. 0 (default) uses the drivetrain's value.

Parameters

Prop

Type

Returns

Self

View source

lead

pub fn lead(self, lead: f32) -> Self

Carrot point multiplier, 0-1. Higher is curvier. 0.6 by default.

Parameters

Prop

Type

Returns

Self

View source

max_speed

pub fn max_speed(self, max_speed: f32) -> Self

Maximum speed, 0-127. 127 by default.

Parameters

Prop

Type

Returns

Self

View source

min_speed

pub fn min_speed(self, min_speed: f32) -> Self

Minimum speed, 0-127. Non-zero switches to motion-chaining exit conditions.

Parameters

Prop

Type

Returns

Self

View source

early_exit_range

pub fn early_exit_range(self, early_exit_range: f32) -> Self

Exit when within this many inches. Only used when min_speed is non-zero.

Parameters

Prop

Type

Returns

Self

View source

early_lambda_range

pub fn early_lambda_range(self, early_lambda_range: f32) -> Self

LemLib-TitanTron: run the early lambda once within this many inches of the target.

Parameters

Prop

Type

Returns

Self

View source

params

pub fn params(self, params: MoveToPoseParams) -> Self

Replace the complete movement options.

Parameters

Prop

Type

Returns

Self

View source

run_async

pub fn run_async(self, run_async: bool) -> Self

Run in the background when true (default). With false, await completion.

Parameters

Prop

Type

Returns

Self

View source

early_lambda

pub fn early_lambda<F, Fut>(self, lambda: F) -> Self where F: Fn() -> Fut + 'static, Fut: Future<Output = ()> + 'static

Run a callback once when the early lambda range is reached.

Parameters

Prop

Type

Returns

Self

View source

set_early_lambda

pub fn set_early_lambda(self, lambda: Option<EarlyLambda>) -> Self

Set or clear the callback.

Parameters

Prop

Type

Returns

Self

View source