pub struct RobotState {Show 49 fields
pub O_T_EE: [f64; 16],
pub O_T_EE_d: [f64; 16],
pub F_T_EE: [f64; 16],
pub F_T_NE: [f64; 16],
pub NE_T_EE: [f64; 16],
pub EE_T_K: [f64; 16],
pub m_ee: f64,
pub I_ee: [f64; 9],
pub F_x_Cee: [f64; 3],
pub m_load: f64,
pub I_load: [f64; 9],
pub F_x_Cload: [f64; 3],
pub m_total: f64,
pub I_total: [f64; 9],
pub F_x_Ctotal: [f64; 3],
pub elbow: [f64; 2],
pub elbow_d: [f64; 2],
pub elbow_c: [f64; 2],
pub delbow_c: [f64; 2],
pub ddelbow_c: [f64; 2],
pub tau_J: [f64; 7],
pub tau_J_d: [f64; 7],
pub dtau_J: [f64; 7],
pub q: [f64; 7],
pub q_d: [f64; 7],
pub dq: [f64; 7],
pub dq_d: [f64; 7],
pub ddq_d: [f64; 7],
pub joint_contact: [f64; 7],
pub cartesian_contact: [f64; 6],
pub joint_collision: [f64; 7],
pub cartesian_collision: [f64; 6],
pub tau_ext_hat_filtered: [f64; 7],
pub O_F_ext_hat_K: [f64; 6],
pub K_F_ext_hat_K: [f64; 6],
pub O_dP_EE_d: [f64; 6],
pub O_ddP_O: [f64; 3],
pub O_T_EE_c: [f64; 16],
pub O_dP_EE_c: [f64; 6],
pub O_ddP_EE_c: [f64; 6],
pub theta: [f64; 7],
pub dtheta: [f64; 7],
pub accelerometer_top: [[f64; 3]; 6],
pub accelerometer_bottom: [[f64; 3]; 6],
pub current_errors: Errors,
pub last_motion_errors: Errors,
pub control_command_success_rate: f64,
pub robot_mode: RobotMode,
pub time: Duration,
}Expand description
Describes the robot state (field names and semantics identical to franka::RobotState;
see libfranka’s robot_state.h for the documentation of every field).
With the serde feature the state serialises field by field under these names, the
arrays as arrays, time as milliseconds and the two Errors as lists of names.
Fields§
§O_T_EE: [f64; 16]Measured end-effector pose in base frame, column-major 4x4 homogeneous transform (translation in m).
O_T_EE_d: [f64; 16]Last desired end-effector pose in base frame, column-major 4x4 (m). Not for motion control – see libfranka’s warning.
F_T_EE: [f64; 16]Flange-to-end-effector transform, column-major 4x4 (m); the product of F_T_NE and NE_T_EE.
F_T_NE: [f64; 16]Flange-to-nominal-end-effector transform as configured in Desk, column-major 4x4 (m).
NE_T_EE: [f64; 16]Nominal-end-effector-to-end-effector transform set with crate::Robot::set_ee, column-major 4x4 (m).
EE_T_K: [f64; 16]End-effector-to-stiffness-frame transform set with crate::Robot::set_k, column-major 4x4 (m).
m_ee: f64Mass of the end effector, in kg.
I_ee: [f64; 9]Inertia matrix of the end effector about its centre of mass, column-major 3x3, in kg*m^2.
F_x_Cee: [f64; 3]Centre of mass of the end effector in flange frame, in m.
m_load: f64Mass of the external load, in kg.
I_load: [f64; 9]Inertia matrix of the external load about its centre of mass, column-major 3x3, in kg*m^2.
F_x_Cload: [f64; 3]Centre of mass of the external load in flange frame, in m.
m_total: f64Combined mass of end effector and load, in kg.
I_total: [f64; 9]Combined inertia matrix of end effector and load, column-major 3x3, in kg*m^2.
F_x_Ctotal: [f64; 3]Combined centre of mass of end effector and load in flange frame, in m.
elbow: [f64; 2]Measured elbow configuration: joint-3 position in rad and the sign (+1/-1) of joint 4.
elbow_d: [f64; 2]Desired elbow configuration, same layout as RobotState::elbow.
elbow_c: [f64; 2]Commanded elbow configuration, same layout as RobotState::elbow.
delbow_c: [f64; 2]Commanded elbow velocity: joint-3 velocity in rad/s and 0 for the joint-4 sign.
ddelbow_c: [f64; 2]Commanded elbow acceleration: joint-3 acceleration in rad/s^2 and 0 for the joint-4 sign.
tau_J: [f64; 7]Measured link-side joint torques, in Nm.
tau_J_d: [f64; 7]Desired link-side joint torques without gravity, in Nm. Rate-limit torque commands against this.
dtau_J: [f64; 7]Derivative of the measured joint torques, in Nm/s.
q: [f64; 7]Measured joint positions, in rad.
q_d: [f64; 7]Desired joint positions, in rad.
dq: [f64; 7]Measured joint velocities, in rad/s.
dq_d: [f64; 7]Desired joint velocities, in rad/s.
ddq_d: [f64; 7]Desired joint accelerations, in rad/s^2.
joint_contact: [f64; 7]Per-joint contact indicator: 1.0 where a contact was detected, else 0.0.
cartesian_contact: [f64; 6]Cartesian contact indicator in the stiffness frame (x, y, z, roll, pitch, yaw): 1.0 or 0.0.
joint_collision: [f64; 7]Per-joint collision indicator: 1.0 where a collision was detected, else 0.0.
cartesian_collision: [f64; 6]Cartesian collision indicator in the stiffness frame (x, y, z, roll, pitch, yaw): 1.0 or 0.0.
tau_ext_hat_filtered: [f64; 7]Filtered external torque estimate, in Nm.
O_F_ext_hat_K: [f64; 6]Estimated external wrench on the stiffness frame, expressed in base frame: forces in N, torques in Nm.
K_F_ext_hat_K: [f64; 6]Estimated external wrench on the stiffness frame, expressed in the stiffness frame: forces in N, torques in Nm.
O_dP_EE_d: [f64; 6]Desired end-effector twist in base frame: linear m/s then angular rad/s.
O_ddP_O: [f64; 3]Gravity vector in base frame, in m/s^2 (the robot’s own measurement of which way is down).
O_T_EE_c: [f64; 16]Last commanded end-effector pose in base frame, column-major 4x4 (m).
O_dP_EE_c: [f64; 6]Last commanded end-effector twist in base frame: linear m/s then angular rad/s.
O_ddP_EE_c: [f64; 6]Last commanded end-effector acceleration in base frame: linear m/s^2 then angular rad/s^2.
theta: [f64; 7]Motor-side joint positions, in rad.
dtheta: [f64; 7]Motor-side joint velocities, in rad/s.
accelerometer_top: [[f64; 3]; 6]Raw readings of the six top accelerometers, in m/s^2 (FCI v10 only; zero on an FER).
accelerometer_bottom: [[f64; 3]; 6]Raw readings of the six bottom accelerometers, in m/s^2 (FCI v10 only; zero on an FER).
current_errors: ErrorsErrors currently active on the robot.
last_motion_errors: ErrorsErrors that aborted the last motion (reflex_reason).
control_command_success_rate: f64Fraction of the last 100 cycles whose command the robot accepted, in [0, 1].
robot_mode: RobotModeCurrent robot mode.
time: DurationStrictly monotonic robot timestamp of this state.
Implementations§
Source§impl RobotState
impl RobotState
Sourcepub fn from_wire(w: &RobotState) -> RobotState
pub fn from_wire(w: &RobotState) -> RobotState
Widens a wire state to the public f64 state.
Port of franka::convertRobotState (src/robot_impl.cpp, libfranka 0.21.2): every
float becomes a double, m_total/F_x_Ctotal/I_total are derived from the end
effector and load properties, time is the message_id read as milliseconds, and the
state’s errors/reflex_reason become current_errors/last_motion_errors. An
unknown robot_mode byte maps to RobotMode::Other, matching the C++ switch whose
result is pre-initialised to kOther.
Sourcepub fn from_wire_v5(w: &RobotState) -> RobotState
pub fn from_wire_v5(w: &RobotState) -> RobotState
Widens an FCI v5 wire state to the public state.
Port of franka::convertRobotState (src/robot_impl.cpp, libfranka 0.9.2). The FER
streams double already, so nothing is widened; m_total/F_x_Ctotal/I_total are
combined exactly as on FCI v10, and time is the message_id read as milliseconds.
FCI v5 has no accelerometer arrays in its state (rbk_types.h:38-85, libfranka 0.9.2),
so accelerometer_top and accelerometer_bottom are zero. An unknown robot_mode byte
maps to RobotMode::Other, matching the C++ switch whose result is pre-initialised to
kOther.
Trait Implementations§
Source§impl Clone for RobotState
impl Clone for RobotState
Source§fn clone(&self) -> RobotState
fn clone(&self) -> RobotState
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 RobotState
Source§impl Debug for RobotState
impl Debug for RobotState
Source§impl Default for RobotState
impl Default for RobotState
Source§impl PartialEq for RobotState
impl PartialEq for RobotState
Source§fn eq(&self, other: &RobotState) -> bool
fn eq(&self, other: &RobotState) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RobotState
Auto Trait Implementations§
impl Freeze for RobotState
impl RefUnwindSafe for RobotState
impl Send for RobotState
impl Sync for RobotState
impl Unpin for RobotState
impl UnsafeUnpin for RobotState
impl UnwindSafe for RobotState
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.