pub struct ImpedanceOptions {Show 13 fields
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 velocity_feedforward_gain: f64,
pub velocity_feedforward_cutoff: f64,
pub leash: Leash,
pub project_joint_gains: bool,
pub joint_velocity_fraction: f64,
pub velocity_barrier_fraction: f64,
pub joint_position_margin: f64,
}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, its own finite difference on both interfaces (of the boxed step on
the joint one, of the IK solution on the Cartesian one), so a goal held at the leash
feeds nothing forward; false damps the absolute velocity, DROID parity,
and a goal moving at v is then tracked Kd v / Kp behind. Default false: on real
arms the full feedforward shook them, since dq_goal is a finite difference (of the IK
solution on the Cartesian interface) and Kd carries its noise into the torque. Try
velocity_feedforward_cutoff against that ripple
when switching it on.
velocity_feedforward_gain: f64Weight of the goal velocity in the damping term when velocity_feedforward is on, in
[0, 1]. At 1 the damping acts on the velocity error dq_goal - dq, so a joint at steady
speed needs no lag; at 0 it acts on -dq alone and holding speed v costs a standing
error of (Kqd / Kq) v, which a leash then caps into a speed limit. Values between trade
that lag against how much of the goal’s own ripple the law forwards. Default 1, so
switching the feedforward on means all of it.
velocity_feedforward_cutoff: f64Cutoff, Hz, of a first-order low-pass on dq_goal before it is fed forward;
MAX_CUTOFF_FREQUENCY switches it off.
The feedforward carries the joint reference’s ripple into the torque, so bounding its
bandwidth keeps the lead without the ripple. Default off.
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.
joint_velocity_fraction: f64The fraction of the arm’s joint velocity limits
(max_joint_velocity, which narrows toward the position
limits on the FR3 and is flat on the FER) the joint goal may move at: a goal
step that would move any joint faster is scaled down as a whole, keeping its direction.
A joint measured faster, or faster than FADE_BAND under
velocity_barrier_fraction if that is lower, keeps
less of the law’s torque along its motion. In (0, 1]. Default 0.7.
velocity_barrier_fraction: f64The fraction of the joint velocity limits above which a measured joint velocity meets
the velocity barrier, VELOCITY_BARRIER_GAIN Nm per
rad/s of the excess opposing it, at most the joint’s torque limit, and none of the law’s
torque along it. In [joint_velocity_fraction, 1]. Default 0.85.
joint_position_margin: f64How far, rad, the joint goal keeps from the joint position limits. Toward a limit the goal
brakes to stop here along a braking profile built on half the FER’s joint acceleration
limit, the FR3’s published ddq_dec on the FR3, under its velocity limit; a joint
measured inside keeps less and less of the law’s torque toward the limit over
POSITION_FADE_BAND, and beyond that meets a spring of
POSITION_BARRIER_STIFFNESS and the velocity barrier
with its onset brought down to the same envelope. Joint targets and postures inside it
are refused. In [0.035, 0.5]. Default 0.05.
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_velocity_feedforward_gain(self, gain: f64) -> Self
pub fn with_velocity_feedforward_gain(self, gain: f64) -> Self
Sourcepub fn with_velocity_feedforward_cutoff(self, hertz: f64) -> Self
pub fn with_velocity_feedforward_cutoff(self, hertz: f64) -> Self
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 with_joint_velocity_fraction(self, fraction: f64) -> Self
pub fn with_joint_velocity_fraction(self, fraction: f64) -> Self
Sets the fraction of the joint velocity limits the goal may move at.
Sourcepub fn with_velocity_barrier_fraction(self, fraction: f64) -> Self
pub fn with_velocity_barrier_fraction(self, fraction: f64) -> Self
Sets the fraction of the joint velocity limits the velocity barrier starts at.
Sourcepub fn with_joint_position_margin(self, margin: f64) -> Self
pub fn with_joint_position_margin(self, margin: f64) -> Self
Sets the distance, rad, the joint goal keeps from the joint position limits.
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, a joint_velocity_fraction outside (0, 1] or a
velocity_barrier_fraction outside [joint_velocity_fraction, 1], a
joint_position_margin outside [0.035, 0.5], 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.