https://github.com/hesic73/allegro_pybind
https://github.com/hesic73/allegro_pybind
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hesic73/allegro_pybind
- Owner: hesic73
- License: lgpl-3.0
- Created: 2024-11-04T02:14:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-15T02:54:29.000Z (5 months ago)
- Last Synced: 2025-03-17T20:44:43.108Z (about 2 months ago)
- Language: C++
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://wiki.wonikrobotics.com/AllegroHandWiki/index.php/Allegro_Hand_v4.0)
2. [PCAN-USB interface](https://www.peak-system.com/PCAN-USB.199.0.html?&L=1)## Setup instructions
### Prerequisites
#### 1. PCAN-USB driver
Download, build, and install PCAN-USB driver for Linux "libpcan"
```bash
tar -xzvf peak-linux-driver-x.x.tar.gz
cd peak-linux-driver-x.x
make NET=NO
sudo make install
```
##### Troubleshooting
* If encounter
```bash
src/pcan-settings.c:47:10: fatal error: popt.h: No such file or directory
47 | #include
| ^~~~~~~~
compilation terminated.
```
Run
```bash
sudo apt install libpopt-dev
```#### 2. `libpcanbasic`
Download, build, and install PCAN-Basic API for Linux: libpcanbasic
```bash
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
```bash
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
- Eigen3After installing the dependencies, you can build and install the package with:
```
pip install .
```## Usage
See `example.py`
## TODO
- thread-safety