pub struct ImpedanceOptions {
pub gains: ImpedanceGains,
pub torque_limits: [f64; 7],
pub cutoff_frequency: f64,
pub posture: Option<[f64; 7]>,
pub ik: IkOptions,
pub velocity_feedforward: bool,
pub leash: Leash,
pub project_joint_gains: bool,
}Expand description
Options of Backend::Impedance; cartesian and
joint are the documented starting points and the with_* methods change
one field each.
Fields§
§gains: ImpedanceGainsThe gains of the law.
torque_limits: [f64; 7]Per-joint clamp on the commanded torque, Nm, at most RATED_TORQUES. Default 86 on
joints 1-4, 11.5 on 5-7.
cutoff_frequency: f64Cutoff, Hz, of the crate’s first-order low-pass on the commanded torque;
MAX_CUTOFF_FREQUENCY switches it off.
Default 100.
posture: Option<[f64; 7]>The configuration the Cartesian IK’s nullspace bias pulls toward; None, the default,
is the configuration the loop starts in. Ignored by the joint interface.
ik: IkOptionsThe Cartesian interface’s inverse kinematics. Ignored by the joint interface.
velocity_feedforward: boolWhether the damping acts on the velocity error, Kd (dq_goal - dq), with dq_goal
the goal’s velocity (the generator’s on the joint interface, the IK solution’s finite
difference on the Cartesian one); false damps the absolute velocity, DROID parity,
and a goal moving at v is then tracked Kd v / Kp behind. Default true.
leash: LeashHow far the desired state may run ahead of the measured one; see Leash.
project_joint_gains: boolWhether the joint gains are projected into the nullspace of the Jacobian (N Kq N,
N Kqd N, N = I - J⁺ J with the damped pseudoinverse of IkOptions::damping), so
that the Cartesian gains alone are felt at the end effector; false leaves them
unprojected, DROID parity. For the Cartesian interface: projected joint gains hold the
nullspace only, so with zero Cartesian gains the end effector would be free. Default
false.
Implementations§
Source§impl ImpedanceOptions
impl ImpedanceOptions
Sourcepub fn cartesian() -> Self
pub fn cartesian() -> Self
The defaults of the Cartesian interface: ImpedanceGains::CARTESIAN.
Sourcepub fn joint() -> Self
pub fn joint() -> Self
The defaults of the joint interface: ImpedanceGains::JOINT.
Sourcepub fn with_gains(self, gains: ImpedanceGains) -> Self
pub fn with_gains(self, gains: ImpedanceGains) -> Self
Sets the gains.
Sourcepub fn with_torque_limits(self, limits: [f64; 7]) -> Self
pub fn with_torque_limits(self, limits: [f64; 7]) -> Self
Sets the per-joint torque clamp, Nm.
Sourcepub fn with_cutoff_frequency(self, hertz: f64) -> Self
pub fn with_cutoff_frequency(self, hertz: f64) -> Self
Sets the torque low-pass cutoff, Hz.
Sourcepub fn with_posture(self, posture: Option<[f64; 7]>) -> Self
pub fn with_posture(self, posture: Option<[f64; 7]>) -> Self
Sets the IK’s posture (None: the start configuration).
Sourcepub fn with_velocity_feedforward(self, on: bool) -> Self
pub fn with_velocity_feedforward(self, on: bool) -> Self
Switches the damping between the velocity error (true) and the absolute velocity.
Sourcepub fn with_leash(self, leash: Leash) -> Self
pub fn with_leash(self, leash: Leash) -> Self
Sets the leash.
Sourcepub fn with_project_joint_gains(self, on: bool) -> Self
pub fn with_project_joint_gains(self, on: bool) -> Self
Switches the projection of the joint gains into the Jacobian’s nullspace.
Sourcepub fn validate(&self) -> FrankaResult<()>
pub fn validate(&self) -> FrankaResult<()>
Checks the options without starting anything.
§Errors
FrankaError::InvalidArgument naming the field: a gain that is not finite or
negative, a torque limit, cutoff frequency or leash that is not finite and positive, a
posture that is not finite, or invalid IkOptions.
Trait Implementations§
Source§impl Clone for ImpedanceOptions
impl Clone for ImpedanceOptions
Source§fn clone(&self) -> ImpedanceOptions
fn clone(&self) -> ImpedanceOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ImpedanceOptions
Source§impl Debug for ImpedanceOptions
impl Debug for ImpedanceOptions
Source§impl PartialEq for ImpedanceOptions
impl PartialEq for ImpedanceOptions
Source§fn eq(&self, other: &ImpedanceOptions) -> bool
fn eq(&self, other: &ImpedanceOptions) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImpedanceOptions
Auto Trait Implementations§
impl Freeze for ImpedanceOptions
impl RefUnwindSafe for ImpedanceOptions
impl Send for ImpedanceOptions
impl Sync for ImpedanceOptions
impl Unpin for ImpedanceOptions
impl UnsafeUnpin for ImpedanceOptions
impl UnwindSafe for ImpedanceOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.