DRC/Setup Assistant/Quick Start

MoveIt! and ROS

 * You should have ROS and MoveIt! installed. If you don't, follow the instructions for installing MoveIt! first.


 * You should have the code for the DRC (Darpa Challenge Robot). This code has not been released yet in Groovy but you can install it from source by adding the following line to your rosinstall file:

Then, follow the instructions for installation from source to compile your code.

URDF
rosrun xacro xacro.py drcsim/ros/atlas_description/robots/atlas_irobot_hands.urdf.xacro > atlas_irobot_hands.urdf
 * Generate an atlas_irobot_hands.urdf file. (You can put this wherever you like).

STEP 1: Start
* roslaunch moveit_setup_assistant setup_assistant.launch
 * To start the MoveIt! Setup Assistant:


 * This will bringup the start screen with two choices: Create New MoveIt! Configuration Package or Edit Existing MoveIt! Configuration Package.


 * Click on the Create New MoveIt! Configuration Package button to bring up the following screen:




 * Click on the browse button and navigate to the atlas_irobot_hands.urdf file that you created above. Once you choose it, then click Load Files. The Setup Assistant will load the files (this might take a few seconds) and present you with this screen:



STEP 2: Generate Self-Collision Matrix
The Default Self-Collision Matrix Generator searches for pairs of links on the robot that can safely be disabled from collision checking, decreasing motion planning processing time. These pairs of links are disabled when they are always in collision, never in collision, in collision in the robot's default position or when the links are adjacent to each other on the kinematic chain. The sampling density specifies how many random robot positions to check for self collision. Higher densities require more computation time while lower densities have a higher possibility of disabling pairs that should not be disabled. The default value is 10,000 collision checks. Collision checking is done in parallel to decrease processing time.


 * Click on the Self-Collisions pane selector on the left-hand side and click on the Generate Collision Matrix button. The Setup Assistant will work for a few second before presenting you the results of its computation in the main table.

STEP 3: Add Virtual Joints
Virtual joints are used primarily to attach the robot to the world. For the DRC we will define only one virtual joint attaching the pelvis of the DRC to the world_frame world frame. This virtual joint represents the motion of the pelvis of the robot and allows the base of the robot be floating, i.e. the pelvis frame has full 6 dof.


 * Click on the Virtual Joints pane selector. Click on Add Virtual Joint
 * Set the joint name as "world_joint"
 * Set the child link as "pelvis" and the parent frame name as "world_frame".
 * Set the Joint Type as "floating" due to this virtual joint is not directly connected to the ground, and neither is fixed.
 * Click Save and you should see this screen:



STEP 4: Add Planning Groups
Planning groups are used for semantically describing different parts of your robot, such as defining what an arm is, or an end effector. Click on the Planning Groups pane selector. Click on Add Group and you should see the following screen:



Add the left arm

 * We will first add the DRC right arm as a planning group
 * Enter Group Name as left_arm
 * Choose kdl_kinematics_plugin/KDLKinematicsPlugin as the kinematics solver.
 * Let Kin. Search Resolution and Kin. Search Timeout stay at their default values.


 * Now, click on the Save and Add Joints button. You will see a list of joints on the left hand side. You need to choose all the joints that belong to the right arm and add them to the right hand side. The joints are arranged in the order that they are stored in an internal tree structure. This makes it easy to select a serial chain of joints.


 * Click on l_arm_usy, hold down the Shift button on your keyboard and then click on the l_arm_mwx. Now click on the > button to add these joints into the list of selected joints on the right.


 * Click Save, what should see is something like the first item of the following screen:

Add the right arm

 * Now add the right arm in the same way, except using all the joints that have prefix r_arm.

Add the grippers

 * We will also add two groups for the right and left end effectors. NOTE that you will do this using a different procedure than adding the arms.
 * Click on the Add Group button.
 * Enter Group Name as right_end_effector
 * Let Kin. Search Resolution and Kin. Search Timeout stay at their default values.
 * Click on the Save and Add Links button.
 * Choose all links starting with right_base_link until right_finger_2/distal_link and add them to the list of Selected Links on the right hand side.
 * Click Save
 * Repeat the same procedure for the left arm of the PR2, choosing links starting with left_base_link all the way to left_finger_2/distal_link.

STEP 5: Add Robot Poses
The Setup Assistant allows you to add certain fixed poses into the configuration. This helps if, for example, you want to define a certain position of the robot as a Home position. * IMPORTANT TIP: Try to move all the joints around. If there is something wrong with the joint limits in your URDF, you should be able to see it immediately here.
 * Click on the Robot Poses pane.
 * Click Add Pose. Choose a name for the pose. The robot will be in its Default position where the joint values are set to the mid-range of the allowed joint value range. Move the individual joints around until you are happy and then Save the pose. Note how poses are associated with particular groups. You can save individual poses for each group.



STEP 6: Label End Effectors
Having the hands already added, we now going to let them be part of the special group called End Effectors. Designating these groups as end effector allows some special operations to happen on them internally.


 * Click on the End Effectors pane.
 * Click Add End-Effectors.
 * Choose right_gripper as the end-effector name for the right hand.
 * Select right_end_effector as the End Effector Group.
 * Select r_hand as the parent link for this end-effector.


 * Click Save.
 * Add the left_gripper in a similar manner.



STEP 7: Add Passive Joints
The passive joints tab is meant to allow specification of any passive joints that might exist in a robot. This tells the planners that they cannot (kinematically) plan for these joints. Examples of passive joints include passive casters. we will skip this optional step for DRC.

STEP 8: Generate Configuration Files
You are almost there. One last step - generating all the configuration files that you will need to start using MoveIt!
 * Click on the Configuration Files pane. Choose a location and name for the ROS package that will be generated containing your new set of configuration files (e.g. choose "drc_moveit_generated" as the directory to put generated files in - that's the location used in the rest of the documentation on this wiki). This does not have to be within your ROS package path. All generated files will go directly into the directory you have chosen.
 * Click on the Generate Package button. The Setup Assistant will now generate and write a set of launch and config files into the directory of your choosing. All the generated files will appear in the Generated Files/Folders tab and you can click on each of them for a description of what they contain.




 * Congratulations!! - You are now done generating the configuration files you need for MoveIt!

The MoveIt! Rviz plugin

 * Start looking at how you can use the generated configuration files to play with MoveIt! using the  The MoveIt! Rviz Plugin.