https://github.com/wonikrobotics-git/allegro_hand_ros_v5-3finger
https://github.com/wonikrobotics-git/allegro_hand_ros_v5-3finger
allegro-hand cpp moveit python ros1-noetic
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wonikrobotics-git/allegro_hand_ros_v5-3finger
- Owner: Wonikrobotics-git
- License: bsd-2-clause
- Created: 2024-11-27T01:35:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-27T05:46:06.000Z (about 1 year ago)
- Last Synced: 2025-05-29T09:02:25.414Z (about 1 year ago)
- Topics: allegro-hand, cpp, moveit, python, ros1-noetic
- Language: C++
- Homepage:
- Size: 3.42 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#

# Allegro Hand V5 3Finger ROS1
> [!IMPORTANT]
> **Date : 25/07/10**
> **We have recently resolved an issue where some fingertip sensor values were delayed. To address this, we have uploaded the updated firmware at the link below. Please update the firmware and download the modified ROS1 package.**
> [allegro_hand_v5_firmware](https://github.com/Wonikrobotics-git/allegro_hand_v5_firmware)
> **Please update the firmware by referring to the "Firmware Update" section in the user manual.**
This is the official release to control Allegro Hand V5-3finger with ROS1(Only V5 supported, V4 is not supported). Mostly, it is based on the latest release of Allegro Hand V5 4finger ROS1 package.
You can find our latest release of Allegro Hand V5 4finger Ros1 package :(https://github.com/Wonikrobotics-git/allegro_hand_ros_v5)
And the interfaces and controllers have been improved and rewritten by Soohoon Yang(Hibo) from Wonik Robotics.
**We support three additional actions just like the Allegro Hand V5 4finger does.**
- Save customize pose using Moveit and move to the saved pose.
- Visualize Allegro Hand V5 changing in real time in Rviz.
- Simply control hand with GUI tool instead of using keyboard.
These packages are tested on ROS Noetic(Ubuntu 20.04) and Melodic(Ubuntu 18.04). It will likely not work with previous versions(Kinetic ...).
The Allegro Hand V5-3finger now can be controlled and communicated via RS-485 in addition to CAN, unlike Allegro Hand V5-4finger.
So, you can directly connect and communicate with a manipulator that supports RS-485 connection.
## Useful Links
- Official Allegro Hand Website : https://www.allegrohand.com/
- Community Forum : https://www.allegrohand.com/forum
## Using Hand directly via RS-485 connection without a PC
If you want to use hand directly via RS-485 connection with manipulator or else, you need to set port configures :
- Baudrate : 115200 bps
- Data bit : 8 bits
- Stop bit : 1 bit
- Parity bit : none
- Timeout : 0
Check out our RS-485 protocol in manual(Soon be updated)
## Packages
**From V5, the hand is fully based on torque controller.**
- allegro_hand_controllers : Contain two main nodes for control the hand.
- node : Receive encoder data and compute torque using `computeDesiredTorque` based on CAN communication.
- grasp : Apply various pre-defined grasps or customized poses based on CAN communication.
- 485 : Apply various pre-defined graps or customized poses based on RS-485 communication.
- allegro_hand_description : Urdf,xacro descriptions for the kinematics of the hand, rviz configuration and meshes.
- allegro_hand_driver : Two main driver for sending and receiving data with the Allegro Hand.
- CANAPI : Drivers for CAN communication.
- rs485 : Drivers for RS-485 communication.
- allegro_hand_gui : Node that control the allegro hand with gui program.
- allegro_hand_keyboard : Node that sends the command to control Allegro Hand. All commands need to be pre-defined.
- allegro_hand_moveit : Provide MOVEIT package for Allegro Hand V5-3finger.
- allegro_hand_parameters : Offset and servo directions for each of the 16 joints, and some meta information about the hand.
- bhand : Library files for the predefined grasps and actions., available on 64 bit versions.
## Install the PCAN driver
**Before using the hand, you must install the pcan drivers. This assumes you have a peak-systems pcan to usb adapter.**
1. Install these packages
- Ubuntu 18.04(melodic)
~~~bash
sudo apt-get install libpopt-dev ros-melodic-libpcan
~~~
- Ubuntu 20.04(noetic)
~~~bash
sudo apt-get install libpopt-dev ros-noetic-libpcan
~~~
2. Download latest drivers: [PEAK_driver](https://www.peak-system.com/fileadmin/media/linux/index.php)
- Install the drivers:
~~~bash
make clean; make NET=NO_NETDEV_SUPPORT
sudo make install
sudo modprobe pcan
~~~
- Check if drivers successfully installed:
~~~bash
pcaninfo
~~~
- When the hand is connected, you should see pcanusb0 or pcanusb1 in the list of available interfaces.
## Run main controller nodes
1. Make your own Workspace.
~~~bash
mkdir ~/allegro_ws
~~~
2. Install necessary packages.
~~~bash
sudo apt-get update
sudo apt-get install ros--visualization-msgs
sudo apt-get install ros--jsk-rviz-plugins
sudo apt install ros--moveit
~~~
3. Clone or Download Allegro Hand V5 ROS package.(https://github.com/Wonikrobotics-git/allegro_hand_ros_v5-3Finger.git)
~~~bash
git clone https://github.com/Wonikrobotics-git/allegro_hand_ros_v5-3Finger.git
~~~
4. Install BHand library
~~~bash
cd allegro_hand_ros_v5-3Finger-master/src/bhand
sudo make install
sudo ldconfig
~~~
5. Build Allegro Hand V5 ROS package.
~~~bash
cd ~/allegro_ws/allegro_hand_ros_v5-3Finger-master
catkin_make
source devel/setup.bash
~~~
6. Connect PCAN-USB and Allegro Hand (**make sure to power on Allegro Hand**)
7. Start the ROS package.
~~~bash
source devel/setup.bash
roslaunch allegro_hand_controllers allegro_hand.launch KEYBOARD:=true
~~~
**(Melodic) If you get 'Permission denied' error, please chmod +x detect_pcan.py in allegro_hand_description/scripts folder**
8. Use keyboard command to move Allegro Hand.
**Please check 'Launch file instructions' below.**
## Launch file instructions
You can simply control Allegro Hand V5 3finger by launching `allegro_hand.launch`.
**CAN Communication**
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch KEYBOARD:=true
~~~
**RS-485**
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch KEYBOARD:=true RS485:=true
~~~
Optional arguments:
~~~
VISUALIZE:=true|false (default is false)
KEYBOARD:=true|false (default is false)
MOVEIT:=true|false (default is false)
GUI:=true|false (default is false)
AUTO_CAN:=true|false (default is false)
RS485:=true|false (default is false)
~~~
- If you want to visualize Allegro Hand on Rviz:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch VISUALIZE:=true
~~~
- If you want to control Allegro Hand with Keyboard:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch KEYBOARD:=true
~~~
- If you want to make pose or simulate Allegro Hand with MOVEIT:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch MOVEIT:=true
~~~
- If you want to control Allegro Hand with Keyboard and GUI:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch KEYBOARD:=true GUI:=true
~~~
- **Note on `AUTO_CAN`: There is a nice script `detect_pcan.py` which automatically finds an open `/dev/pcanusb` file. If instead you specify the can device manually (`CAN_DEVICE:=/dev/pcanusbN`), make sure you _also_ specify `AUTO_CAN:=false`. Obviously, automatic detection cannot work with two hands.**
## Control more than one hand
### CAN Communication
1. Specify the can device:
~~~bash
pcaninfo
~~~
2. Open two terminals and source the allegro hand workspace.
3. Launch Allegro Hand packages using command below.
Terminal 1:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch NUM:=0 CAN_DEVICE:=/dev/pcanusb32 AUTO_CAN:=false KEYBOARD:=true
~~~
Terminal 2:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch NUM:=1 CAN_DEVICE:=/dev/pcanusb33 AUTO_CAN:=false KEYBOARD:=true
~~~
### RS-485 Communication
1. Specify the can device:
~~~bash
ls -l /dev/ttyUSB*
~~~
2. Open two terminals and source the allegro hand workspace.
3. Launch Allegro Hand packages using command below.
Terminal 1:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch RS485:=true NUM:=0 PORT:=/dev/ttyUSB0 KEYBOARD:=true
~~~
Terminal 2:
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch RS485:=true NUM:=1 PORT:=/dev/ttyUSB1 KEYBOARD:=true
~~~
**These are example commands.You may need to change CAN_DEVICE, PORT and NUM arguments accroding to your system.**
## Moveit!(Only for CAN)
1. Start Moveit
~~~bash
roslaunch allegro_hand_controllers allegro_hand.launch MOVEIT:=true KEYBOARD:=true
~~~
2. Select joints menu and setup goal position of each joint.
