-
Notifications
You must be signed in to change notification settings - Fork 13
tuto prep part1
This tutorial suppose you have ROS Indigo + MoveIt! + Shadow Robot packages installed.
ros-indigo-desktop-full
ros-indigo-moveit-full
ros-indigo-sr-description
This tutorial shows how to setup a planning environment for a multi-fingered hand or an advanced gripper. Since fingers are mini-serial manipulator, MoveIt! can be used to plan their movements. Specific settings are needed to generate a MoveIt! config for such complex robots and will be detailed.
- The Shadow robot hand exist in various versions.
- Motor or Muscle driven
- Equipped with standard, biotac or ellipsoid fingertips
- With 1 to 5 fingers
- Left or right handed
- To keep the description modular, the URDF files are generated through XACRO, an XML macro language.
- Each element of the hand is in a different xacro file
- Parameters are used in the xacro macros to set the various possibility
- The macros are called by wrappers in a hierarchical manner; finger phalanxes compose a finger which compose the hand along with a palm, a wrist and a forearm.
-
To provide IK for the fingers, tip links must exist where the tip is located in each finger.
-
URDF structure of the motor variation of the shadow hand

-
A collision model for the hand is required for planning to handle self-collision or collision with external objects.
-
Collision elements should preferably be composed of primitives to accelerate collision checking, if mesh must be used, they should remain with the least possible amount of vertices.
-
Collision elements should not be separated by large spaces. Fingers might intersect at these spaces.
-
Starting with ROS hydro, collision model can be composed of several primitives
-
Visual, new and old collision model for comparison

-
Note: MoveIt! can read xacro files but if you need to create a urdf from a xacro.urdf manually use the following command (choose a version of shadow hand)
`rospack find xacro`/xacro.py `rospack find sr_description`/robots/<replace-me>.urdf.xacro > <replace-me>.urdf
-
In your workspace, create a new folder called moveit_hand_config (do not call it moveit alone, because moveit package exists) in src. Packages files (package.xml and CMakeLists.txt) will be generated by the setup assistant.
-
Launch MoveIt! setup assistant
roslaunch moveit_setup_assistant setup_assistant.launch
3. Click the **Create New Moveit Configuration Package** button and load the URDF file of the shadow motor hand * The file can be found in
/opt/ros/indigo/share/sr_description/robots/shadowhand_motor.urdf.xacro
```
* You should see the Shadow hand displayed
4. Generate the self-collision matrix
* Set a medium-low density and click Regenerate Default Collision Matrix
* The automatic checking is usually not sufficient, one should re-verify each link pair, especially activating the Show Non-disabled Link Pairs to add more pairs and simplify collision checking.
Be aware that some links appear adjacent but are not, due to intersecting revolute joints (thumb base/hub and finger knuckles). Hence, one usually also disable the collision between these pairs.
5. Virtual Joints
* Create one virtual joint for the base
6. Planning groups
* Create a planning group with Add Group for the whole hand (including all the fingers) using the Add Joint method but with Kinematic Solver set to None
* Create one group per finger using the Add Kin.Chain method (palm to xxtip link) and set Kinematic Solver set to standard solver kdl_kinematics_plugin/KDLKinematicsPlugin
7. Robot Poses
* Add default poses if you like
8. End-effectors
* End-effectors are usually needed when a hand/gripper is at the end of an arm, becoming its end-effector even if the hand/gripper it-self has several other kinematics chains.
* In a multi-fingered hand, having end-effectors is interesting to activate several end-effectors at the same time for interactive control.
* Create an end-effector for the first finger
* Do the same for the other fingers. You might also create one for the palm.

9. Generate the MoveIt! configuration files
- No passive joints are needed
- Indicate the folder moveit_hand_config in your workspace as the output path.
- Click Generate Package
- Sourcing the MoveIt! config
- In your workspace root
source devel/setup.bash - Starting MoveIt! demo
- Launch the MoveIt! demo for the Shadow Hand
roslaunch moveit_hand_config demo.launch- RVIZ should launch and you should get a similar view
- otherwise change the display/plugin settings to get this view
- In the Planning Request panel, change planning group to first_finger
- Activate the Interact tool of RVIZ to see the marker at the fingertip. If the tool is not there, add it using the + button
- Planning a movement of the first finger
- In The Planning Request panel, activate the Query Start State
- Using the mouse, try move the marker at the tip. THE FINGER DOES NOT FOLLOW !
- The generic KDL IK solves 6D IK by default but the fingers only have 3DOF. A not well advertized option permits to handle position only IK (3D IK) by adding an option in config/kinematics.yaml
position_only_ik: True - This option does not solve the coupling issues in the last two finger joints (note: biotac hand has no coupling)
A solution is to write our own IK for the fingers.
This is done in the second part of the tutorial
Next see Part 2 to handle the creation of a special IK plugin to solve kinematics for coupled joints of the Shadow Hand (note: Shadow hands equipped with biotac sensor have no link XFJ1 so no coupling solver needed there).