#sensor #force #driver #dynpick #wacohtech

dynpick-force-torque-sensor

Device driver for Wacoh-tech force-torque sensor written in pure Rust

1 unstable release

0.1.0 Feb 1, 2021

#1611 in Hardware support

MIT license

19KB
227 lines

dynpick-force-torque-sensor

crates.io Build Status

Unofficial device driver for Wacoh-tech force-torque sensor written in pure Rust.

Inspired the works of Tokyo Opensource Robotics Kyokai Association (It is written in C/C++ and for ROS).

Example

use dynpick_force_torque_sensor::DynpickSensorBuilder;

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(); // Calibration

let wrench = sensor.update_wrench().unwrap();
println!("Force: {}, Torque: {}", wrench.force, wrench.torque);

Dependency under Linux environment

libudev-dev is required under Linux environment. Please install it by
$ sudo apt install libudev-dev

Setup

It may be required to customize udev rules.

This shell script can be useful for customize (see the file in detail).

Run a demo for an usb-connected sensor

  1. Clone this repository.
  2. Setup udev rule by using this shell script.
  3. Connect your sensor.
  4. Run the example by cargo run --example demo

License

MIT

Note

I tested this crate only by WDF-6M200-3 sensor because I have no other dynpick sensor.

Dependencies

~2–3MB
~60K SLoC