pub struct CartesianTargetControl { /* private fields */ }Expand description
The handle of a running Cartesian target control; see the module documentation.
The target is a pose; orientations are unit quaternions in [x, y, z, w] order (the
scalar part last) or the rotation block of a column-major pose as in O_T_EE.
Implementations§
Source§impl CartesianTargetControl
impl CartesianTargetControl
Sourcepub fn set_position(&self, position_in_base: [f64; 3]) -> FrankaResult<()>
pub fn set_position(&self, position_in_base: [f64; 3]) -> FrankaResult<()>
Sets the target position, absolute, in the base frame, m; the target orientation stays what it is. Callable from any thread at any rate; only the latest target counts.
§Errors
crate::error::FrankaError::InvalidArgument if a coordinate is not finite,
crate::error::FrankaError::InvalidOperation with super::ENDED_MESSAGE once the
loop has ended for any reason.
Sourcepub fn set_orientation(&self, orientation_xyzw: [f64; 4]) -> FrankaResult<()>
pub fn set_orientation(&self, orientation_xyzw: [f64; 4]) -> FrankaResult<()>
Sets the target orientation, absolute, in the base frame, as a unit quaternion in
[x, y, z, w] order; the target position stays what it is.
§Errors
crate::error::FrankaError::InvalidArgument if a component is not finite or the norm
is further than super::UNIT_QUATERNION_TOLERANCE from one (within it, the
quaternion is normalised), crate::error::FrankaError::InvalidOperation with
super::ENDED_MESSAGE once the loop has ended.
Sourcepub fn set_target(
&self,
position_in_base: [f64; 3],
orientation_xyzw: [f64; 4],
) -> FrankaResult<()>
pub fn set_target( &self, position_in_base: [f64; 3], orientation_xyzw: [f64; 4], ) -> FrankaResult<()>
Sets the target position, m, and orientation, a unit quaternion in [x, y, z, w]
order (the scalar part w last), both absolute in the base frame.
§Errors
As set_position and set_orientation.
Sourcepub fn set_pose(&self, pose: &[f64; 16]) -> FrankaResult<()>
pub fn set_pose(&self, pose: &[f64; 16]) -> FrankaResult<()>
Sets the target pose, a column-major 4x4 transform in the base frame as O_T_EE.
§Errors
crate::error::FrankaError::InvalidArgument if an entry is not finite, the last row
is not [0, 0, 0, 1] or the rotation block is further than
super::ORTHONORMAL_TOLERANCE from orthonormal (within it, it is
re-orthonormalised), crate::error::FrankaError::InvalidOperation with
super::ENDED_MESSAGE once the loop has ended.
Sourcepub fn target(&self) -> [f64; 3]
pub fn target(&self) -> [f64; 3]
The latest target position (the start until something sets it).
Sourcepub fn target_orientation(&self) -> [f64; 4]
pub fn target_orientation(&self) -> [f64; 4]
The latest target orientation, [x, y, z, w].
Sourcepub fn target_pose(&self) -> [f64; 16]
pub fn target_pose(&self) -> [f64; 16]
The latest target pose, column-major as O_T_EE.
Sourcepub fn state(&self) -> RobotState
pub fn state(&self) -> RobotState
The latest robot state the loop received, copied out.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Whether the loop is still running; false after it ended for any reason.
Sourcepub fn stop(self) -> FrankaResult<()>
pub fn stop(self) -> FrankaResult<()>
Settles at the current target, finishes the motion, joins the thread and returns the
loop’s result: Ok for a regular end, crate::error::FrankaError::Control if the
robot aborted the motion or a deviation guard fired.
Auto Trait Implementations§
impl !RefUnwindSafe for CartesianTargetControl
impl !UnwindSafe for CartesianTargetControl
impl Freeze for CartesianTargetControl
impl Send for CartesianTargetControl
impl Sync for CartesianTargetControl
impl Unpin for CartesianTargetControl
impl UnsafeUnpin for CartesianTargetControl
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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.