pub struct PdController {
pub kp: Fix128,
pub kd: Fix128,
pub max_force: Fix128,
pub target_position: Fix128,
pub target_velocity: Fix128,
pub mode: MotorMode,
}Expand description
PD controller for a single joint axis
Fields§
§kp: Fix128Proportional gain (stiffness)
kd: Fix128Derivative gain (damping)
max_force: Fix128Maximum output force/torque
target_position: Fix128Target position (for Position mode)
target_velocity: Fix128Target velocity (for Velocity mode)
mode: MotorModeMotor mode
Implementations§
Source§impl PdController
impl PdController
Sourcepub fn set_position_target(&mut self, target: Fix128)
pub fn set_position_target(&mut self, target: Fix128)
Set position target
Sourcepub fn set_velocity_target(&mut self, target: Fix128)
pub fn set_velocity_target(&mut self, target: Fix128)
Set velocity target
Trait Implementations§
Source§impl Clone for PdController
impl Clone for PdController
impl Copy for PdController
Source§impl Debug for PdController
impl Debug for PdController
Source§impl Default for PdController
impl Default for PdController
impl Eq for PdController
Source§impl PartialEq for PdController
impl PartialEq for PdController
impl StructuralPartialEq for PdController
Auto Trait Implementations§
impl Freeze for PdController
impl RefUnwindSafe for PdController
impl Send for PdController
impl Sync for PdController
impl Unpin for PdController
impl UnsafeUnpin for PdController
impl UnwindSafe for PdController
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more