leptrino-force-torque-sensor

Crates.ioleptrino-force-torque-sensor
lib.rsleptrino-force-torque-sensor
version0.1.0
sourcesrc
created_at2021-02-09 01:20:21.553204
updated_at2021-02-09 01:20:21.553204
descriptionDevice driver for Leptrino force torque sensor written in pure Rust.
homepage
repositoryhttps://github.com/Amelia10007/leptrino-force-torque-sensor-rs
max_upload_size
id352568
size31,441
Amelia10007 (Amelia10007)

documentation

README

leptrino-force-torque-sensor

crates.io Build Status

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).

Example

use leptrino_force_torque_sensor::{LeptrinoSensor, Product};

let mut sensor = LeptrinoSensor::open(Product::Pfs055Ya251U6, "/dev/ttyUSB0").unwrap();

let wrench = sensor.update().unwrap();
println!("{:?}", wrench);

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 if you use usb-connected sensors.

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 Pfs055Ya251U6 sensor because I have no other Leptrino sensor.

Commit count: 8

cargo fmt