Skip to Content
VectorLib

Drivetrain

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


pub struct Drivetrain

Constants for a drivetrain.

View source

Fields

Prop

Type

Methods

Prop

Type

new

pub fn new(
        left_motors: MotorGroup,
        right_motors: MotorGroup,
        track_width: f32,
        wheel_diameter: f32,
        rpm: f32,
        horizontal_drift: f32,
    ) -> Self

Same argument order as LemLib's Drivetrain constructor.



let drivetrain = Drivetrain::new(
    left_motors,       // left motor group
    right_motors,      // right motor group
    10.0,              // 10 inch track width
    Omniwheel::NEW_4,  // using new 4" omnis
    360.0,             // drivetrain rpm is 360
    2.0,               // horizontal drift is 2. If we had traction wheels, it would have been 8
);

Parameters

Prop

Type

Returns

Self

View source

On this page