Skip to content

hesic73/allegro_pybind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

allegro_pybind

A Python binding for controlling the Allegro Hand, heavily based on https://github.com/simlabrobotics/allegro_hand_linux_v4. The setup instructions are also borrowed from the original project.

Tested on:

  • Ubuntu 20.04
  • g++ 9.4.0
  • cmake 3.16.3
  • python 3.8.20

Required hardware

  1. Allegro hand v4
  2. PCAN-USB interface

Setup instructions

Prerequisites

1. PCAN-USB driver

Download, build, and install PCAN-USB driver for Linux "libpcan"

tar -xzvf peak-linux-driver-x.x.tar.gz
cd peak-linux-driver-x.x
make NET=NO
sudo make install
Troubleshooting
  • If encounter
    src/pcan-settings.c:47:10: fatal error: popt.h: No such file or directory
       47 | #include <popt.h>
        |      	^~~~~~~~
    compilation terminated.
    Run
    sudo apt install libpopt-dev

2. libpcanbasic

Download, build, and install PCAN-Basic API for Linux: libpcanbasic

tar -xzvf PCAN_Basic_Linux-x.x.x.tar.gz
cd PCAN_Basic_Linux-x.x.x/pcanbasic
make
sudo make install

3. libBHand grasping library

Download, build, and install Grasping Library for Linux, "libBHand": Grasping_Library_for_Linux

unzip LibBHand_{32|64}.zip
cd libBHand_{32|64}
sudo make install
sudo ldconfig

Installation

Besides the dependencies mentioned above, ensure the following dependencies are installed before building the package:

  • pybind11
  • Eigen3

After installing the dependencies, you can build and install the package with:

pip install .

Usage

See example.py

TODO

  • thread-safety