pub struct JointTargetControl { /* private fields */ }Expand description
The handle of a running joint target control; see the module documentation.
Implementations§
Source§impl JointTargetControl
impl JointTargetControl
Sourcepub fn set_joints(&self, q: [f64; 7]) -> FrankaResult<()>
pub fn set_joints(&self, q: [f64; 7]) -> FrankaResult<()>
Sets the target joint positions, rad. Callable from any thread at any rate; only the latest target counts.
§Errors
crate::error::FrankaError::InvalidArgument if a value is not finite or outside the
arm’s joint position limits inset by JOINT_LIMIT_INSET,
crate::error::FrankaError::InvalidOperation with super::ENDED_MESSAGE once the
loop has ended for any reason.
Sourcepub fn target(&self) -> [f64; 7]
pub fn target(&self) -> [f64; 7]
The latest target set (the start configuration until the first set_joints).
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 the deviation guard fired.
Auto Trait Implementations§
impl !RefUnwindSafe for JointTargetControl
impl !UnwindSafe for JointTargetControl
impl Freeze for JointTargetControl
impl Send for JointTargetControl
impl Sync for JointTargetControl
impl Unpin for JointTargetControl
impl UnsafeUnpin for JointTargetControl
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.