#[non_exhaustive]pub enum Command {
Mit {
kp: f64,
kd: f64,
q: f64,
dq: f64,
tau: f64,
},
PosVel {
q: f64,
dq: f64,
},
Vel {
dq: f64,
},
PosForce {
q: f64,
dq: f64,
i_pu: f64,
},
}Expand description
A control command directed at a single motor.
Vendor-specific commands (e.g. Damiao’s 0x7FF parameter sub-protocol) do
not appear here; reach them via vendor-extension traits exposed by the
vendor’s codec crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mit
MIT impedance control: kp, kd gains plus q (position), dq (velocity), tau (feed-forward torque) setpoints.
Fields
PosVel
Position + velocity setpoint control.
Vel
Pure velocity control.
PosForce
Position + velocity + current-percent-units control.
Implementations§
Trait Implementations§
impl Copy for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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