Trait rrtk::FeedbackMotor

source ·
pub trait FeedbackMotor {
    // Required methods
    fn get_state(&mut self) -> Datum<State>;
    fn set_acceleration(&mut self, acceleration: f32);
    fn set_velocity(&mut self, velocity: f32);
    fn set_position(&mut self, position: f32);

    // Provided method
    fn follow_motion_profile(&mut self, motion_profile: MotionProfile) { ... }
}
Expand description

A trait for motors with some form of feedback, regardless if we can see it or not.

Required Methods§

source

fn get_state(&mut self) -> Datum<State>

Get the motor’s current acceleration, velocity, and position and the time at which they were recorded.

source

fn set_acceleration(&mut self, acceleration: f32)

Make the motor run at a given acceleration.

source

fn set_velocity(&mut self, velocity: f32)

Make the motor run at a given velocity.

source

fn set_position(&mut self, position: f32)

Make the mootr go to a given position.

Provided Methods§

source

fn follow_motion_profile(&mut self, motion_profile: MotionProfile)

Implementors§