Skip to main content

CartesianTargetControl

Struct CartesianTargetControl 

Source
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

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn target(&self) -> [f64; 3]

The latest target position (the start until something sets it).

Source

pub fn target_orientation(&self) -> [f64; 4]

The latest target orientation, [x, y, z, w].

Source

pub fn target_pose(&self) -> [f64; 16]

The latest target pose, column-major as O_T_EE.

Source

pub fn state(&self) -> RobotState

The latest robot state the loop received, copied out.

Source

pub fn is_running(&self) -> bool

Whether the loop is still running; false after it ended for any reason.

Source

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§

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> 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
§

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, 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.