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
fn set_enable_torque(
&mut self,
interface: &mut I,
enable_torque: bool
) -> Result<(), Error>
&mut self,
interface: &mut I,
enable_torque: bool
) -> Result<(), Error>
Enable/Disable torque on the servo.
fn set_position(&mut self, interface: &mut I, value: f32) -> Result<(), Error>
Set the goal position. Some servos will be put into "position control mode" when this method is called.
value is in unit: radians
fn get_position(&mut self, interface: &mut I) -> Result<f32, Error>
Get the current position.
The result is returned in unit: radians
Implementors
impl<I: Interface> Servo<I> for M4210S260R<I>
impl<I: Interface> Servo<I> for MX28<I>