Skip to main content

ImpedanceOptions

Struct ImpedanceOptions 

Source
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: ImpedanceGains

The 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: f64

Cutoff, 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: IkOptions

The Cartesian interface’s inverse kinematics. Ignored by the joint interface.

§velocity_feedforward: bool

Whether 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: Leash

How far the desired state may run ahead of the measured one; see Leash.

§project_joint_gains: bool

Whether 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

Source

pub fn cartesian() -> Self

The defaults of the Cartesian interface: ImpedanceGains::CARTESIAN.

Source

pub fn joint() -> Self

The defaults of the joint interface: ImpedanceGains::JOINT.

Source

pub fn with_gains(self, gains: ImpedanceGains) -> Self

Sets the gains.

Source

pub fn with_torque_limits(self, limits: [f64; 7]) -> Self

Sets the per-joint torque clamp, Nm.

Source

pub fn with_cutoff_frequency(self, hertz: f64) -> Self

Sets the torque low-pass cutoff, Hz.

Source

pub fn with_posture(self, posture: Option<[f64; 7]>) -> Self

Sets the IK’s posture (None: the start configuration).

Source

pub fn with_ik(self, ik: IkOptions) -> Self

Sets the IK options.

Source

pub fn with_velocity_feedforward(self, on: bool) -> Self

Switches the damping between the velocity error (true) and the absolute velocity.

Source

pub fn with_leash(self, leash: Leash) -> Self

Sets the leash.

Source

pub fn with_project_joint_gains(self, on: bool) -> Self

Switches the projection of the joint gains into the Jacobian’s nullspace.

Source

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

Source§

fn clone(&self) -> ImpedanceOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ImpedanceOptions

Source§

impl Debug for ImpedanceOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ImpedanceOptions

Source§

fn eq(&self, other: &ImpedanceOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ImpedanceOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.