DRC

In this section, you will explore using MoveIt! with the DRC Robot. Have a look at the video to see what you can do with MoveIt! and a visualized version of the DRC robot.



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.

Pre-configured example
We have provided a pre-configured example file for you to use in the drcsim source code that you had downloaded. It is in the atlas_irobot_hands_moveit_generated package. We will use this package here for illustration.

MoveIt! Configuration
If you would like to generate the configuration files yourself or work with a different configuration, have a look at the setup assistant tutorial to see how you can configure MoveIt! for the DRC robot.

STEP 1: Launch the demo and Configure the Plugin

 * Launch the demo


 * If you are doing this for the first time, you will have to add the Motion Planning Plugin.
 * In the Rviz Displays Tab, press Add
 * From the moveit_ros_visualization folder, choose "MotionPlanning" as the DisplayType. Press "Ok".


 * In the "Global Options" tab of the "Displays" subwindow, set the Fixed Frame field to "/pelvis"


 * Now, you can start configuring the Plugin for your robot (the DRC robot in this case). Click on "MotionPlanning" in "Displays".
 * Make sure the Robot Description field is set to "robot_description"
 * Make sure the Planning Scene Topic field is set to "planning_scene".
 * In Planning Request, change the Planning Group to "right_arm".
 * Set the Trajectory Topic in the Planned Path tab to "/move_group/display_planned_path".

STEP 2: Play with the visualized robots
There are four different visualizations active here currently:


 * 1) The start state for motion planning (the planned group is represented in green).
 * 2) The goal state for motion planning (the planned group is represented in orange).
 * 3) The robot's configuration in the planning scene/ planning environment
 * 4) The planned path for the robot,

The display states for each of these visualizations can be toggled on and off using checkboxes.


 * 1) The start state using the "Query Start State" checkbox in the "Planning Request" tab.
 * 2) The goal state using the "Query Goal State" checkbox in the "Planning Request" tab.
 * 3) The planning scene robot using the "Show Scene Robot" checkbox in the "Scene Robot" tab.
 * 4) The planned path using the "Show Robot Visual" checkbox in the "Planned Path" tab.
 * Play with all these checkboxes to switch on and off different visualizations.

STEP 3: Interact with the DRC robot

 * Press Interact in the top menu of rviz. You should see a couple of interactive markers appear for the right arm of the robot.
 * One marker (corresponding to the orange colored right arm) will be used to set the "Goal State" for motion planning. Another marker corresponding to a green colored representation of the right arm will be used to set the "Start State" for motion planning.
 * You will be able to use these markers (which are attached to the tip link of each arm) to drag the arm around and change its orientation.

Moving into collision
Note what happens when you try to move one of the arms into collision with the other. The two links that are in collision will turn red.



The "Use Collision-Aware IK" checkbox allows you to toggle the behavior of the IK solver. When the checkbox is ticked, the solver will keep attempting to find a collision-free solution for the desired end-effector pose. When it is unticked, the solver will allow collisions to happen in the solution. The links in collision will always still be visualized in red, regardless of the state of the checkbox.

Moving out of reachable workspace
Note also what happens when you try to move an end-effector out of its reachable workspace. You can always use "Ctrl-R" to move the interactive markers back to their last reachable pose.



STEP 4: Use Motion Planning with the DRC robot

 * Now, you can start motion planning with the DRC robot in the MoveIt! Rviz Plugin.
 * Move the Start State to a desired location.
 * Move the Goal State to another desired location.
 * You can use the "Select Start State" and "Select Goal State" tabs to move the
 * Make sure both states are not in collision with the robot itself.
 * Make sure the Planned Path is being visualized. Also check the "Loop Animation" checkbox.
 * In the Planning tab (at the bottom), press the Plan button. You should be able to see a visualization of the arm moving.

STEP 5: Move the Base of the Robot
You can use the world joint that you defined to move the base of the robot around. In the "Planning Request", set the "Planning Group" to "base". You will now get a (giant) interactive marker corresponding to the world joint that you can use to move the pelvis (and the whole robot) around.



Additional Reading

 * The MoveIt! Setup Assistant - The Setup Assistant will help you setup the DRC robot with MoveIt! Note that we have provided a pre-configured set of files for the DRC robot to handle simple manipulation scenarios and you can use the Setup Assistant for more advanced configuration.
 * Detailed documentation - The detailed documentation provides details about how the launch files for the Rviz Plugin are configured, advanced capabilities and options, etc.
 * Importing CAD files and Scenes - Learn how to import CAD files or scenes from a database.

Links

 * Back to Robots