Struct GripperStatus

Source
pub struct GripperStatus {
    pub act: bool,
    pub gto: bool,
    pub sta: ActivationStatus,
    pub obj: ObjDetectStatus,
    pub fault: GripperFault,
    pub k_flt: u8,
    pub pos_req: u8,
    pub pos: u8,
    pub current: u8,
}
Expand description

Robot Input / Status of the gripper

Read from register starting at 2000, 6 bytes of data. Detailing the status of gripper, e.g. current position, speed, force …

Fields§

§act: bool

Activation status, echo of the rACT bit (activation bit).

§gto: bool

Action status, echo of the rGTO bit (go to bit).

§sta: ActivationStatus

gripper status, returns the current status and motion of the gripper fingers

§obj: ObjDetectStatus

Objected detection status, is a built-in feature that provides information on possible object pick-up. Ignore if gto == 0

§fault: GripperFault

Fault status returns general error messages that are useful for troubleshooting.

§k_flt: u8

Other fault status, the masked higher 4 bits of register FAULT STATUS, (mask 0xF0).

§pos_req: u8

Echo of the requested position for the gripper, value between 0x00 and 0xFF.

§pos: u8

Actual position of the gripper obtained via the encoders, value between 0x00 and 0xFF.

§current: u8

The current is read instantaneously form the motor drive, value between 0x00 and 0xFF, approximate current equivalent is 10 * current in mA.

Implementations§

Source§

impl GripperStatus

Source

pub fn parse(bytes: Vec<u8>) -> Self

parse the gripper status from the registers.

Trait Implementations§

Source§

impl Clone for GripperStatus

Source§

fn clone(&self) -> GripperStatus

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GripperStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GripperStatus

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Vec<u8>> for GripperStatus

Source§

fn from(value: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl Serialize for GripperStatus

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,