#[non_exhaustive]pub struct TuningUpdate {
pub joint_stiffness: Option<[f64; 7]>,
pub joint_damping: Option<[f64; 7]>,
pub cartesian_stiffness: Option<f64>,
pub ik_damping: Option<f64>,
pub ik_nullspace_gain: Option<f64>,
pub velocity_feedforward_gain: Option<f64>,
pub velocity_feedforward_cutoff: Option<f64>,
pub budget: Option<[f64; 3]>,
pub rotation_budget: Option<[f64; 3]>,
}Expand description
A partial change to a LiveTuning: every field left None keeps the value it has.
#[non_exhaustive]: outside this crate there is no struct expression for it at all —
functional update syntax included — so start from Default and assign what the update
carries.
use franka::robot::target_control::TuningUpdate;
let mut update = TuningUpdate::default();
update.ik_damping = Some(0.2);
assert_eq!(update.ik_damping, Some(0.2));
assert_eq!(update.budget, None);The form that reads as though it should work does not, and this is the gate that says so:
ⓘ
use franka::robot::target_control::TuningUpdate;
let update = TuningUpdate {
ik_damping: Some(0.2),
..TuningUpdate::default()
};The attribute buys the freedom to stop reading a field, not the freedom to add one: a new
TuningUpdate field needs the matching LiveTuning field, which moves
WORDS and the signature of to_words, and
that is a major version either way.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.joint_stiffness: Option<[f64; 7]>§joint_damping: Option<[f64; 7]>§cartesian_stiffness: Option<f64>§ik_damping: Option<f64>§ik_nullspace_gain: Option<f64>§velocity_feedforward_gain: Option<f64>§velocity_feedforward_cutoff: Option<f64>§budget: Option<[f64; 3]>See LiveTuning::budget.
rotation_budget: Option<[f64; 3]>Trait Implementations§
Source§impl Clone for TuningUpdate
impl Clone for TuningUpdate
Source§fn clone(&self) -> TuningUpdate
fn clone(&self) -> TuningUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TuningUpdate
Source§impl Debug for TuningUpdate
impl Debug for TuningUpdate
Source§impl Default for TuningUpdate
impl Default for TuningUpdate
Source§fn default() -> TuningUpdate
fn default() -> TuningUpdate
Returns the “default value” for a type. Read more
Source§impl PartialEq for TuningUpdate
impl PartialEq for TuningUpdate
Source§fn eq(&self, other: &TuningUpdate) -> bool
fn eq(&self, other: &TuningUpdate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TuningUpdate
Auto Trait Implementations§
impl Freeze for TuningUpdate
impl RefUnwindSafe for TuningUpdate
impl Send for TuningUpdate
impl Sync for TuningUpdate
impl Unpin for TuningUpdate
impl UnsafeUnpin for TuningUpdate
impl UnwindSafe for TuningUpdate
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
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.