pub struct Arm(/* private fields */);Expand description
Newtype wrapping a MotorGroup that represents an articulated arm.
Implementations§
Source§impl Arm
impl Arm
Sourcepub fn velocities(&self) -> Vec<f64>
pub fn velocities(&self) -> Vec<f64>
Slice of velocities in insertion order.
Sourcepub fn mit_control(&mut self, cmds: &[MitCmd]) -> Result<(), Error>
pub fn mit_control(&mut self, cmds: &[MitCmd]) -> Result<(), Error>
Batch MIT control. cmds.len() must equal self.len().
Sourcepub fn pos_vel_control(&mut self, cmds: &[PosVelCmd]) -> Result<(), Error>
pub fn pos_vel_control(&mut self, cmds: &[PosVelCmd]) -> Result<(), Error>
Batch PosVel control.
Sourcepub fn vel_control(&mut self, cmds: &[VelCmd]) -> Result<(), Error>
pub fn vel_control(&mut self, cmds: &[VelCmd]) -> Result<(), Error>
Batch pure-velocity control.
Sourcepub fn pos_force_control(&mut self, cmds: &[PosForceCmd]) -> Result<(), Error>
pub fn pos_force_control(&mut self, cmds: &[PosForceCmd]) -> Result<(), Error>
Batch PosForce control.
Sourcepub fn enable_all(&mut self) -> Result<(), Error>
pub fn enable_all(&mut self) -> Result<(), Error>
Enable every motor in insertion order.
Sourcepub fn disable_all(&mut self) -> Result<(), Error>
pub fn disable_all(&mut self) -> Result<(), Error>
Disable every motor in reverse insertion order.
Sourcepub fn set_zero_all(&mut self) -> Result<(), Error>
pub fn set_zero_all(&mut self) -> Result<(), Error>
Set every motor’s current position as zero.
Sourcepub fn refresh(&mut self) -> Result<(), Error>
pub fn refresh(&mut self) -> Result<(), Error>
Send a state-refresh query to every motor (no motion). Pair with tick
to receive the replies.
Sourcepub fn set_mode(&mut self, mode: CommandKind) -> Result<(), Error>
pub fn set_mode(&mut self, mode: CommandKind) -> Result<(), Error>
Set the persistent control mode on every motor (no motion). Call once at startup, before the matching control commands.
Sourcepub fn inner(&self) -> &MotorGroup
pub fn inner(&self) -> &MotorGroup
Borrow the underlying MotorGroup.
Sourcepub fn inner_mut(&mut self) -> &mut MotorGroup
pub fn inner_mut(&mut self) -> &mut MotorGroup
Borrow the underlying MotorGroup mutably.
Auto Trait Implementations§
impl Freeze for Arm
impl RefUnwindSafe for Arm
impl Send for Arm
impl Sync for Arm
impl Unpin for Arm
impl UnsafeUnpin for Arm
impl UnwindSafe for Arm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more