

This is the official release to control Allegro Hand V5 with ROS1(Only V5 supported, V4 is not supported). Mostly, it is based on the old release of Allegro Hand V4 ROS1 package. You can find our old release of Allegro Hand V4 Ros package :(https://github.com/Wonikrobotics-git/allegro_hand_ros_v4) And the interfaces and controllers have been improved and rewritten by Soohoon Yang(Hibo) from Wonik Robotics.
We reduce several unnecessary package/nodes(allegro_hand,allegro_node_pd...) and modify our main driver code due to changes of the motors.
Also we now provide some new actions:
- 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 ...).
- Official Allegro Hand Website : https://www.allegrohand.com/
- Community Forum : https://www.allegrohand.com/forum
From V5, the hand is fully based on torque controller. So we reduce some packages/nodes related with position controller.
- allegro_hand_controllers : Contain two main nodes for control the hand.
- node : Receive encoder data and compute torque using
computeDesiredTorque
. - grasp : Apply various pre-defined grasps or customized poses.
- node : Receive encoder data and compute torque using
- allegro_hand_description : Urdf,xacro descriptions for the kinematics of the hand, rviz configuration and meshes.
- allegro_hand_driver : Main driver for sending and receiving data with the Allegro Hand.
- 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.
- 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.
Before using the hand, you must install the pcan drivers. This assumes you have a peak-systems pcan to usb adapter.
- Install these packages
- Ubuntu 18.04(melodic)
sudo apt-get install libpopt-dev ros-melodic-libpcan
- Ubuntu 20.04(noetic)
sudo apt-get install libpopt-dev ros-noetic-libpcan
- Download latest drivers: PEAK_driver
- Install the drivers:
make clean; make NET=NO_NETDEV_SUPPORT
sudo make install
sudo modprobe pcan
- Check if drivers successfully installed:
pcaninfo
- When the hand is connected, you should see pcanusb0 or pcanusb1 in the list of available interfaces.
- Make your own Workspace.
mkdir ~/allegro_ws
- Install necessary packages.
sudo apt-get update
sudo apt-get install ros-<distro>-visualization-msgs
sudo apt-get install ros-<distro>-jsk-rviz-plugins
- Clone or Download Allegro Hand V5 ROS package.(https://github.com/Wonikrobotics-git/allegro_hand_ros_v5.git)
git clone https://github.com/Wonikrobotics-git/allegro_hand_ros_v5.git
- Install BHand library
cd allegro_hand_ros_v5-master-4finger/src/bhand
sudo make install
sudo ldconfig
- Build Allegro Hand V5 ROS package.
cd ~/allegro_ws/allegro_hand_ros_v5-master-4finger
catkin_make
source devel/setup.bash
- Connect PCAN-USB and Allegro Hand (make sure to power on Allegro Hand)
- Start the ROS package.
source devel/setup.bash
roslaunch allegro_hand_controllers allegro_hand.launch HAND:=right TYPE:=A KEYBOARD:=true
(Melodic) If you get 'Permission denied' error, please chmod +x detect_pcan.py in allegro_hand_description/scripts folder
- Use keyboard command to move Allegro Hand.
Please check 'Launch file instructions' below.
Same as the previous version of the ROS package, you can simply control Allegro Hand V5 by launching allegro_hand.launch
. It has many arguments, but at a minimum you must specify the handedness and the hand type:
roslaunch allegro_hand_controllers allegro_hand.launch HAND=right|left TYPE:=A|B (A: non-geared, B: geared)
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)
- If you want to visualize Allegro Hand on Rviz:
roslaunch allegro_hand_controllers allegro_hand.launch HAND=right TYPE:=A VISUALIZE:=true
- If you want to control Allegro Hand with Keyboard:
roslaunch allegro_hand_controllers allegro_hand.launch HAND=right TYPE:=A KEYBOARD:=true
- If you want to make pose or simulate Allegro Hand with MOVEIT:
roslaunch allegro_hand_controllers allegro_hand.launch HAND=right TYPE:=A MOVEIT:=true
- If you want to control Allegro Hand with Keyboard and GUI:
roslaunch allegro_hand_controllers allegro_hand.launch HAND=right TYPE:=A KEYBOARD:=true GUI:=true
- Note on
AUTO_CAN
: There is a nice scriptdetect_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 specifyAUTO_CAN:=false
. Obviously, automatic detection cannot work with two hands.
- Specify the can device:
pcaninfo
-
Open two terminals and source the allegro hand workspace.
-
Launch Allegro Hand packages using command below.
Terminal 1:
roslaunch allegro_hand_controllers allegro_hand.launch HAND:=right TYPE:=A NUM:=0 CAN_DEVICE:=/dev/pcanusb32 AUTO_CAN:=false KEYBOARD:=true
Terminal 2:
roslaunch allegro_hand_controllers allegro_hand.launch HAND:=left TYPE:=A NUM:=1 CAN_DEVICE:=/dev/pcanusb33 AUTO_CAN:=false KEYBOARD:=true
- Start Moveit
roslaunch allegro_hand_controllers allegro_hand.launch HAND:=right TYPE:=A MOVEIT:=true KEYBOARD:=true
-
Select Planning menu and set Start State:
<current>
. -
Click
Plan
button andExecute
button. -
Execution completed: SUCCEEDED
andjoint states save complete
will be print on terminal.NOTE : After the log is printed, hand will move to goal joint position.
-
Use Keyboard
spacebar + Num(0~9)
to save current pose.NOTE : Pose will be saved with named '(pose + Num). yaml'.
-
Use Keyboard
Num(0~9)
(same as above num) to move hand to saved pose.
- Launch main program with GUI arguments.
roslaunch allegro_hand_controllers allegro_hand.launch HAND:=right TYPE:=A GUI:=true
- Clear log button : Clear log.
- Exit button: Torque off and kill GUI program.
- Change button: Change hand motion time (default: 1, range: 0.8~1.5)
- Apply: Apply force when grasp (default: 2.0, range: 0.0~6.0)
- Vertical bar: Change & Apply real-time grasp force by moving vertical bar.
- Home: Home pose
- Grasp: 4finger Grap pose
- GravityComp: Gravity Compensate each link.
- Off: Torqueoff
- Save
- Select pose number or type pose fiel name to save.
- Save current joint of Moveit in yaml.
- Move
- Select Pose number or pose file.
- Move Allegro Hand to saved pose.
- Refresh : the pose file list will be reloaded.
- Custom Hand Pose Repeat
- Select number of poses you want to repeat.
- Select poses by paying attention to the order in proportion to the number of poses selected.
- Choose how many times to repeat.
- Start.
- Reset : Fingertip sensor value reset.
NOTE : When saving a pose, the name of pose file must not overlap with predefined pose name.