Trait dynamixel::Servo [] [src]

pub trait Servo<I: Interface> {
    fn set_enable_torque(
        &mut self,
        interface: &mut I,
        enable_torque: bool
    ) -> Result<(), Error>;
fn set_position(
        &mut self,
        interface: &mut I,
        value: f32
    ) -> Result<(), Error>;
fn get_position(&mut self, interface: &mut I) -> Result<f32, Error>; }

The generic servo trait

Allow using servos without knowing the exact type.

Required Methods

Enable/Disable torque on the servo.

Set the goal position. Some servos will be put into "position control mode" when this method is called.

value is in unit: radians

Get the current position.

The result is returned in unit: radians

Implementors