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).
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);
libudev-dev
is required under Linux environment. Please install it by
$ sudo apt install libudev-dev
It may be required to customize udev rules.
This shell script can be useful for customize (see the file in detail).
- Clone this repository.
- Setup udev rule by using this shell script.
- Connect your sensor.
- Run the example by
cargo run --example demo
MIT
I tested this crate only by WDF-6M200-3 sensor because I have no other dynpick sensor.