dynpick-force-torque-sensor

Crates.iodynpick-force-torque-sensor
lib.rsdynpick-force-torque-sensor
version0.1.0
sourcesrc
created_at2021-02-01 07:34:42.945006
updated_at2021-02-01 07:34:42.945006
descriptionDevice driver for Wacoh-tech force-torque sensor written in pure Rust.
homepage
repositoryhttps://github.com/Amelia10007/dynpick-force-torque-sensor-rs
max_upload_size
id349169
size29,370
Amelia10007 (Amelia10007)

documentation

README

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.

Commit count: 22

cargo fmt