Robonaut/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 nasa_r2_robot. You can install it by executing:

* sudo apt-get install ros-groovy-nasa-r2-simulator

The above line install also a couple of packages as dependencies, one of these are the nasa-r2-common wich contains the "robot description".


 * Setup the correct environment by sourcing the appropriate setup.bash file.

URDF

 * To start using the MoveIt! Setup Assistant, you will first need to have a URDF for your robot. The URDF is the native robot description format in ROS and allows you to describe the kinematics, inertial, visual and sensing properties of your robot.

For the Robonaut you can execute:

* rosrun xacro xacro.py /opt/ros/groovy/stacks/nasa_r2_common/r2_description/robots/r2.urdf.xacro > r2.urdf

This line will generate the URDF for Robonaut in your home's directory. for further information about URDF generation, you can see the URDF specific documentation

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 r2.urdf file you already created. Choose that file and 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. Based on that idea we will select the world as our only virtual joint, and we'll call it virtual_joint. Since Robonaut can not move his base, we will select fixed joint type. Remember that the "Parent Frame" is whatever name you want to use, and on the other hand, the "Child Link" is always the "root link" of your URDF.


 * Click on the Virtual Joints panel selector. Click on Add Virtual Joint
 * Set the joint name as "virtual_joint"
 * Set the child link as "world" and the parent frame name as "reference_frame".
 * Set the Joint Type as "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 left arms

 * We will first add the Robonaut left 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 left 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 left/j0, hold down the Shift button on your keyboard and then click on the left/j6. 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:


 * Now what we will do is to add the right_arm but generating a Chain Group. You have to define a root or base link of the chain, which we will define for the right arm is the chest_base as the base_link, and the right_wrist_yaw as the tip_link taking into account the URDF file information.
 * Click on the Add Group button.
 * Enter Group Name as right_arm
 * Choose kdl_kinematics_plugin/KDLKinematicsPlugin as the kinematics solver.
 * Let Kin. Search Resolution and Kin. Search Timeout stay at their default values.
 * Click on the Save and Add Chain button.
 * Clck on Expand All to see the full list of links and chains.
 * Find and select the chest_base. This is, as we said, root or base link of the chain that we would like to add. Click on the Choose Selected button next to the Base Link to choose this link as the base link.
 * Now, find and select the right_wrist_yaw for the tip of the chain that we would like to add. Click on the Choose Selected button next to the Tip Link to choose this link as the tip link.

You can repeat the process for both hands too, but now adding these as Links because these are end effectors which means they are at the end of the arm chain, and they take the roll of the actuators that, in fact, will interact with the environment.

To do so, select the joints between left_wrist_yaw and the left_little_tip and the same for the right hand.



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_hand_eef as the end-effector name for the right hand.
 * Select right_hand as the End Effector Group.
 * Select right_wrist_pitch as the parent link for this end-effector.


 * Click Save.
 * Add the left_hand_eef 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 Robonaut.

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 "r2_moveit_config" 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 MoveIt! Rviz Plugin.