Crates.io | leptrino-force-torque-sensor |
lib.rs | leptrino-force-torque-sensor |
version | 0.1.0 |
source | src |
created_at | 2021-02-09 01:20:21.553204 |
updated_at | 2021-02-09 01:20:21.553204 |
description | Device driver for Leptrino force torque sensor written in pure Rust. |
homepage | |
repository | https://github.com/Amelia10007/leptrino-force-torque-sensor-rs |
max_upload_size | |
id | 352568 |
size | 31,441 |
Unofficial device driver for Leptrino force torque sensors.
Line up of Leptrino sensor is available here.
Inspired the works of ROS package (It is written in C/C++ and for ROS).
use leptrino_force_torque_sensor::{LeptrinoSensor, Product};
let mut sensor = LeptrinoSensor::open(Product::Pfs055Ya251U6, "/dev/ttyUSB0").unwrap();
let wrench = sensor.update().unwrap();
println!("{:?}", wrench);
libudev-dev
is required under Linux environment. Please install it by
$ sudo apt install libudev-dev
It may be required to customize udev rules if you use usb-connected sensors.
This shell script can be useful for customize (see the file in detail).
cargo run --example demo
MIT
I tested this crate only by Pfs055Ya251U6 sensor because I have no other Leptrino sensor.