Skip to content

tuto prep part1

GuiHome edited this page Feb 12, 2015 · 26 revisions

Tutorial 1 : Preparing a dexterous planning environment

Pre-request

This tutorial suppose you have ROS Hydro/Indigo + MoveIt! + Shadow Robot packages installed.

Introduction

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.

Part 1 : Setting the environment for the shadow hand

Understanding the robot description (URDF)

  • 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 image
  • 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 image

  • 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.

  • In hydro, collision model can be composed of several primitives

  • Visual, new and old collision model for comparison

    image

Creating the semantic description (SRDF)

  1. 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.

  2. Launch MoveIt! setup assistant

roslaunch moveit_setup_assistant setup_assistant.launch 3. Load the URDF file of the shadow motor hand * The file can be found in /opt/ros/hydro/share/sr_description/robots/shadowhand_motor.urdf.xacro ``` image * You should see the Shadow hand displayed image 4. Generate the self-collision matrix * Set a medium-low density and click Regenerate Default Collision Matrix image * 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. image 5. Virtual Joints * Create one virtual joint for the base image 6. Planning groups * Create a planning group for the whole hand (including all the fingers) with standard IK using the joint method image * Create one group per finger with standard IK using the chain method (palm to xxtip link) image 7. Robot Poses * Add default poses if you like image 8. End-effectors * Create an end-effector for the first finger image * Do the same for the other fingers. You might also create one for the palm. image 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

Testing the planning environment

  1. Sourcing the MoveIt! config
    • In your workspace root
    source devel/setup.bash
    
  2. 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 image
    • 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
  3. 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 ! image
    • 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

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).

Clone this wiki locally