Code Monkey home page Code Monkey logo

digit-interface's Introduction

DIGIT-INTERFACE

License: CC BY-NC 4.0 PyPI DIGIT-logo

Python interface for the DIGIT tactile sensor.

Installation

The preferred way of installation is through PyPi:

pip install digit-interface

Alternatively, you can manually clone the repository and install the package using:

git clone https://github.com/facebookresearch/digit-interface.git 
cd digit-interface
pip install -r requirements.txt
python setup.py install

If you cannot access the device by serial number on your system follow adding DIGIT udev Rule

Usage

The default connection method to the DIGIT tactile sensor is through the unique device serial number. The serial number is found on the back of each DIGIT. See List all connected DIGIT's to find device serial numbers which are connected to the host.

Once you have the device serial number, reading data from the sensor should be as easy as

from digit_interface.digit import Digit
 
d = Digit("D12345") # Unique serial number
d.connect()
d.show_view()
d.disconnect()

Upon connection each DIGIT device initializes with a default stream resolution of VGA: 640x480 at 30fps

Further Usage

List all connected DIGIT's:

To list all connected DIGIT's and display sensor information:

from digit_interface.digit_handler import DigitHandler

digits = DigitHandler.list_digits()
Obtain a single frame:
from digit_interface.digit import Digit

d = Digit("D12345") # Unique serial number
d.connect()
frame = d.get_frame()
List supported stream formats:

Additional streams are supported, these streams vary in resolution and frames per second.

To list the available stream formats:

from digit_interface.digit_handler import DigitHandler

print("Supported streams: \n {}".format(DigitHandler.STREAMS))
Change resolution:
d.set_resolution(DigitHandler.STREAMS["QVGA"])
Change FPS,

Based on supported fps for each respective resolution. All streams support pre-defined resolutions which can be found in DigitHandler.STREAMS

d.set_fps(DigitHandler.STREAMS["QVGA"]["fps"]["15fps"])

Adding DIGIT udev Rule

Add your user to the plugdev group,

adduser username plugdev

Copy udev rule,

sudo cp ./udev/50-DIGIT.rules /lib/udev/rules.d/

Reload rules,

sudo udevadm control --reload
sudo udevadm trigger

Replug the DIGIT device into host.

License

This code is licensed under CC-by-NC, as found in the LICENSE file.

Citing

If you use this project in your research, please cite:

@Article{Lambeta2020DIGIT,
  author  = {Lambeta, Mike and Chou, Po-Wei and Tian, Stephen and Yang, Brian and Maloon, Benjamin and Victoria Rose Most and Stroud, Dave and Santos, Raymond and Byagowi, Ahmad and Kammerer, Gregg and Jayaraman, Dinesh and Calandra, Roberto},
  title   = {{DIGIT}: A Novel Design for a Low-Cost Compact High-Resolution Tactile Sensor with Application to In-Hand Manipulation},
  journal = {IEEE Robotics and Automation Letters (RA-L)},
  year    = {2020},
  volume  = {5},
  number  = {3},
  pages   = {3838--3845},
  doi     = {10.1109/LRA.2020.2977257},
}

digit-interface's People

Contributors

alphabetaphi avatar robertocalandra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.