Struct dynpick_force_torque_sensor::DynpickSensor [−][src]
Dynpick 6-axis force-torque sensor.
Implementations
impl DynpickSensor
[src]
pub fn last_wrench(&self) -> Wrench
[src]
Returns the latest wrench that is stored in this instance without communicaing the sensor.
Use Self::update
instead to obtain a new wrench from the sensor.
Returns
Ok(sensor)
if successfully connected, Err(reason)
if failed.
pub fn sensitivity(&self) -> Sensitivity
[src]
Returns the sensitivity of this sensor.
pub fn update(&mut self) -> Result<Wrench, Error>
[src]
Communicating to the sensor, updates the latest wrench.
Returns
Ok(wrench)
if succeeds, Err(reason)
if failed.
pub fn zeroed_next(&mut self) -> Result<(), Error>
[src]
If this method succeeds, the next wrench acquired by Self::update
will be zeroed.
This methos is useful for zero-point calibration.
Examples
use dynpick_force_torque_sensor::{DynpickSensorBuilder, Triplet}; let mut sensor = DynpickSensorBuilder::open("/dev/ttyUSB0") .and_then(|b| b.set_sensitivity_by_builtin_data()) .and_then(|b| b.build()) .unwrap(); sensor.zeroed_next().unwrap(); let wrench = sensor.update().unwrap(); assert_eq!(wrench.force, Triplet::new(0.0, 0.0, 0.0)); assert_eq!(wrench.torque, Triplet::new(0.0, 0.0, 0.0));
pub fn receive_product_info(&mut self) -> Result<String, Error>
[src]
Reads the product info from the sensor.
Returns
Ok(product_info)
if succeeds, Err(reason)
if failed.
pub fn inner_port(&self) -> &Box<dyn SerialPort>
[src]
Returns the reference to the serial port for the sensor.
Auto Trait Implementations
impl !RefUnwindSafe for DynpickSensor
[src]
impl Send for DynpickSensor
[src]
impl !Sync for DynpickSensor
[src]
impl Unpin for DynpickSensor
[src]
impl !UnwindSafe for DynpickSensor
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,