{"id":25236781,"url":"https://github.com/wonikrobotics-git/allegro_hand_linux_v4","last_synced_at":"2025-04-05T18:13:25.434Z","repository":{"id":276922600,"uuid":"930712773","full_name":"Wonikrobotics-git/allegro_hand_linux_v4","owner":"Wonikrobotics-git","description":"Official Code Repository for controlling the Allegro Hand V4 on Linux System","archived":false,"fork":false,"pushed_at":"2025-04-01T07:27:38.000Z","size":3535,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T07:37:36.603Z","etag":null,"topics":["allegro-hand","cpp","python","ros1-noetic"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wonikrobotics-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-11T04:46:07.000Z","updated_at":"2025-04-01T07:27:41.000Z","dependencies_parsed_at":"2025-04-01T07:31:13.166Z","dependency_job_id":"85e878ff-d54b-425b-b83c-2837ce09db64","html_url":"https://github.com/Wonikrobotics-git/allegro_hand_linux_v4","commit_stats":null,"previous_names":["wonikrobotics-git/allegro_hand_linux_v4"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonikrobotics-git%2Fallegro_hand_linux_v4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonikrobotics-git%2Fallegro_hand_linux_v4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonikrobotics-git%2Fallegro_hand_linux_v4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonikrobotics-git%2Fallegro_hand_linux_v4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wonikrobotics-git","download_url":"https://codeload.github.com/Wonikrobotics-git/allegro_hand_linux_v4/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378145,"owners_count":20929297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allegro-hand","cpp","python","ros1-noetic"],"created_at":"2025-02-11T15:31:50.479Z","updated_at":"2025-04-05T18:13:25.424Z","avatar_url":"https://github.com/Wonikrobotics-git.png","language":"C++","readme":"\u003cimg align=\"right\" width=\"20%\" height=\"20%\" src=\"./asset/allegrohand_v4.png\"\u003e\n\n# allegro_hand_linux_v4\n\u003e Official Code Repository for controlling the Allegro Hand V4 on Linux System\n\nThis repository is the official release for controlling the **Allegro Hand V4**.\n\nThere are [ROS1 API](./ros_source/), [ROS2 API](./ros2_source) and [C++ API](./cpp/) for [Allegro Hand V4](https://www.allegrohand.com/ah-v4-main)\n\n# Setup\n\nThis section provides instructions on setting up your PC and installing the PCAN driver to connect the **Allegro Hand V4** to your system.\n\n\u003e [!IMPORTANT]\n\u003e Make sure to choose the correct version for your setup. The **Setup Manual** and **Source Code** differ depending on the project you are working on.\n\n|  | **C++ API** | **ROS1 API** | **ROS2 API** |\n|---|------------|-------------|-------------|\n| **System** | Ubuntu 20.04 | Ubuntu 20.04 | Ubuntu 22.04 |\n| **Source** | [cpp/](./cpp/) | [ros_source/](./ros_source/) | [ros2_source/](./ros2_source/) |\n| **Setup Manual** | 🔵 Type 1 | 🔵 Type 1 | 🟣 Type 2 |\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔵 Type 1\u003c/b\u003e\u003c/summary\u003e\n\n## Project Setup of Type 1\n\n### 1. Install Ubuntu 20.04\n\n- **Download \u0026 Create Bootable USB**\n   - Get the [Ubuntu 20.04 LTS ISO](https://releases.ubuntu.com/focal/).\n   - Use [Rufus](https://rufus.ie/) (Windows) or [Etcher](https://www.balena.io/etcher/) (macOS/Linux) to create a bootable USB.\n- **Install Ubuntu**\n   - Boot from the USB and follow the installation steps (language, keyboard, disk setup, user info).\n   - Reboot after installation.\n\n\n### 2. `libBHand` Installation\n\n- Check your system architecture:\n  ```bash\n  getconf LONG_BIT\n  ```\n  This will determine whether you need the 32-bit or 64-bit version.\n\n- Navigate to the `libBHand/libBHand_{32|64}` directory and install `libBHand`:\n  ```bash\n  cd libBHand/libBHand_{32|64}\n  sudo make install\n  sudo ldconfig\n  ```\n\n- If you need to **uninstall** `libBHand`, navigate to the `libBHand_{32|64}` directory and run:\n  ```bash\n  sudo make uninstall\n  sudo ldconfig\n  ```\n\n- The library source can also be downloaded from the [Grasping Library for Linux](https://www.allegrohand.com/ah-v4-grasping-library-for-linux).\n  - Click the button to download.\n  - Locate `LibBHand_32.zip` or `LibBHand_64.zip` (found in the `/Allegro Hand V4 | File` folder).\n  - Unzip the source file and install it according to the instructions above.\n\n### 3. Install the PCAN Driver\n\n\u003e Before using the hand, you must install the **PCAN drivers**. These instructions assume you are using a **Peak Systems PCAN-USB adapter**.\n\n- **Install dependencies:**\n  ```bash\n  sudo apt-get install libpopt-dev ros-noetic-libpcan\n  ```\n\n- **Download the latest drivers:**\n  [Peak-System Linux Driver](http://www.peak-system.com/fileadmin/media/linux/index.htm#download)\n\n- **Install the drivers:**\n  ```bash\n  make clean; make NET=NO_NETDEV_SUPPORT\n  sudo make install\n  sudo /sbin/modprobe pcan\n  ```\n\n- **Verify installation:**\n  Run the following command to check if the interface is installed correctly. You should see streaming output.\n  ```bash\n  cat /proc/pcan\n  ```\n\n- **Check for available interfaces:**\n  When the hand is connected, you should see `pcanusb0` or `pcanusbN` (`N` can be any number).\n  ```bash\n  ls -l /dev/pcan*\n  ```\n\n  - If no files are listed, try running the following command from the **downloaded PCAN driver folder**. It manually creates the device files if the system has not done so automatically.\n    ```bash\n    sudo ./driver/pcan_make_devices 2\n    ```\n\n- **(Optional) CAN Communication Tutorial**\n  - If you are not familiar with PCAN, refer to the [CAN Communication Tutorial](https://www.allegrohand.com/ah-v4-can-communication).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🟣 Type 2\u003c/b\u003e\u003c/summary\u003e\n\n## Project Setup of Type 2\n\n### 1. Install Ubuntu 22.04\n\n- **Download \u0026 Create Bootable USB**\n   - Get the [Ubuntu 22.04 LTS ISO](https://releases.ubuntu.com/jammy/).\n   - Use [Rufus](https://rufus.ie/) (Windows) or [Etcher](https://www.balena.io/etcher/) (macOS/Linux) to create a bootable USB.\n- **Install Ubuntu**\n   - Boot from the USB and follow the installation steps (language, keyboard, disk setup, user info).\n   - Reboot after installation.\n\n### 2. `libBHand` Installation\n\n- `BHandLib` is located in `/src/bhand/lib/libBHand.so`.\n- By default, the library is compiled for **64-bit** systems. If your system is **32-bit**, replace the `/lib` folder with the appropriate version.\n\n- Library Structure:\n  ```bash\n  src/\n  └── bhand/\n      ├── include/bhand/\n      ├── lib/\n      │   └── libBHand.so  # Default (64-bit) used when building the source\n      ├── libBHand_32/lib/\n      │   └── libBHand.so  # Replace with this if using a 32-bit system\n      └── libBHand_64/lib/\n          └── libBHand.so  # Replace with this if using a 64-bit system\n  ```\n\n### 3. ROS 2 and PCAN Support\n\n- ROS 2 no longer supports **PCAN**. Instead, use `can-utils` for **SocketCAN**:\n  ```bash\n  sudo apt install can-utils\n  ```\n\n\u003c/details\u003e\n\n\n# File Structure\n\nThis repository is structured into three main sections:\n- `cpp/`: Contains the standalone C++ API for the Allegro Hand V4.\n- `ros_source/`: Includes the ROS1 package for controlling the Allegro Hand.\n- `ros2_source/`: Includes the ROS2 package for controlling the Allegro Hand.\n\nEach section has its own **README.md** with setup and build instructions.\n\n```\n.\n├── libBHand\n│   ├── libBHand_64\n│   └── libBHand_32\n├── cpp\n│   ├── 📃 README.md   # Instructions for building the C++ library\n│   └── grasp\n├── ros_source\n│   ├── 📃 README.md   # Instructions for building the ROS1 package\n│   └── src\n│       ├── allegro_hand_controllers\n│       │   ├── launch\n│       │   │   ├── allegro_hand.launch\n│       │   │   └── allegro_viz.launch\n│       │   ├── package.xml\n│       │   ├── CMakeLists.txt\n│       │   └── src\n│       ├── allegro_hand_description\n│       ├── allegro_hand_driver\n│       ├── allegro_hand_keyboard\n│       ├── allegro_hand_parameters\n│       ├── allegro_hand_python\n│       └── bhand\n├── ros2_source\n│   ├── 📃 README.md   # Instructions for building the ROS2 package\n│   └── src\n│       ├── allegro_hand_controllers\n│       ... (Similar to the `ros_source` structure)\n│       └── bhand\n└── 📃 README.md       # Instructions for setting up the Allegro Hand V4\n```\n\n# C++ API\n\nStep-by-step instructions are provided for running the motion demo of the **Allegro Hand V4** using the **C++ API** on **Ubuntu 20.04** (independent of ROS).\nFor more details, see 📃 [cpp/README.md](./cpp/README.md).\n\n# ROS1 API\n\nThe **ROS1 API** allows you to control the **Allegro Hand V4** using **ROS1 Noetic** on **Ubuntu 20.04**.\nFor more details, see 📃 [ros_source/README.md](./ros_source/README.md).\n\n# ROS2 API\n\nThe **ROS2 API** enables control of the **Allegro Hand V4** using **ROS2 Humble** on **Ubuntu 22.04**.\nFor more details, see 📃 [ros2_source/README.md](./ros2_source/README.md).\n\n\n# User Manual\n\n- For more information about Allegro Hand V4, see [User Manual 1.1](./asset/Allegro%20Hand%20V4_Users%20Manual_1.1.pdf).\n- Note: The wiki page at wiki.wonikrobotics.com/AllegroHandWiki is **no longer available!**\n- In the \"Using Allegro Hand Sample Program\" section, the source code has been replaced with the following GitHub repositories:\n  - **Linux System:** [allegro_hand_linux_v4](https://github.com/Wonikrobotics-git/allegro_hand_linux_v4)\n  - **Windows System:** [allegro_hand_windows_v4](https://github.com/Wonikrobotics-git/allegro_hand_windows_v4)\n\n\n# Discussion \u0026 Issues\n\nIf you encounter any issues or would like to discuss improvements, you can use the following channels:\n\n- [**GitHub Issues**](https://github.com/Wonikrobotics-git/allegro_hand_linux_v4/issues)\n- [**Allegro Hand Forum**](https://allegrohand.com/forum)\n\n\n# Contribution\n\nWe welcome contributions! 🚀\nIf you'd like to contribute, feel free to submit a **pull request** with a **clear and concise explanation** of its purpose.\n\n### **Special Thanks to Contributors**\n\nWe sincerely appreciate the contributions that have helped improve this repository:\n\n- **Interfaces and controllers** by [@felixduvallet](https://github.com/felixduvallet)\n- **New torque controller** by [@nisommer](https://github.com/nisommer)\n\nThank you for your valuable contributions! 🙌\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonikrobotics-git%2Fallegro_hand_linux_v4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwonikrobotics-git%2Fallegro_hand_linux_v4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonikrobotics-git%2Fallegro_hand_linux_v4/lists"}