The goals of this lab are

  • Introduction to the ROS’ motion planning framework MoveIt
  • Learning about different planning algorithms in the Open Motion Planning Library (OMPL)
  • Experimentally evaluate the performance of sampling-based path planners
  • Use a model of Baxter for testing motion plans


  • Design of a challenging motion-planning environment
  • Experimental evaluation of planning time and trajectory length using 3 different algorithms


  • 2 weeks
Deliverables are due on Monday after the last lab.
  1. Make sure your ROS environment is setup correctly and you have in your ~/.bashrc file this command:
    • source /opt/ros/indigo/setup.bash
      If you are confused by the “bashrc” part, Google it.
    • Make sure your software is up to date (if you use your own computer):
      sudo apt-get update && sudo apt-get dist-upgrade
    • Start a ros master in the background:
      roscore &
  2. Setup the Baxter packages on your computer following the README at the bottom of the Baxter Github page.
    • Skip the section titled ‘Install MoveIt From Source’ unless you are really motivated
    • Follow ‘Baxter Installation’
  3. Using the following tips below, run the MoveIt Setup Assistant for the Baxter by following the PR2 Setup Assistant Quick Start tutorial. This is to familiarize yourself with some of the components of MoveIt!
    • Skip the “Pre-requisites” for the PR2 because we will be running the Setup Assistant for the Baxter.
    • When it asks you to navigate to the “pr2.urdf” file, instead find the baxter.urdf file located in:
    • In general adapt the instructions for our robot instead of the PR2 and try to understand the robot semantics required for motion planning…
      • For the Virtual Joints screen, use these settings: Virtual Joint Name: “vjoint1”, Child Link: “base”, Parent Frame Name: “vframe1”, Joint Type: “fixed”
      • For the Planning Groups screen, create a group named “left_arm” and use the KDL solver and default Kin values. Add “Joints” for left_* – s0, s1, e0, e1, w0, w1, and w2.
      • Also add a group named “left_hand” that has the three gripper links named “left_hand” and “left_gripper*”
      • For the End Effectors screen, make up a name, choose “left_wrist” for parent link, “left_hand” for group and set the parent group as “left_arm”
      • There are no passive joints
    • On the “Configuration Files” screen save the package path to
    • Exit the Setup Assistant. Before continuing you should build your catkin workspace again:
      cd ~/ros/ws_baxter
    • Manually edit the move_group.launch file so that MoveIt doesn’t look for actual robot hardware:
      • Open to edit the XML file ~/ros/baxter_ws/src/baxter_moveit_config_new/launch/move_group.launch
      • Change allow_trajectory_execution to false
      • Change moveit_manage_controllers to false
    • Test the new MoveIt configuration files you have created for Baxter:
      roslaunch baxter_moveit_config_new demo.launch
    • You should now see a screen similar to:
    • If you have issues with Rviz segfaulting or not running, make sure the command glxinfo does not return any errors. If it does, your computer doesn’t have its video cards / 3d hardware acceleration setup correctly. You should look into this on your own. Other wise see Rviz Troubleshooting or ROS Answers
    • Play with the interactive marker on Baxter’s hand and watch the arm move
    • Close Rviz and all the terminal code you have running before starting the next step
    • If you have problems with the files you have created, feel free to download a
    • You should see a screen similar to Step 3. Find the large panel at the bottom left of the screen – this is the MoveIt Rviz Motion Planning Plugin that allows you to test different motion plans. It should have the words OMPL in green – indicated you are connected to a planning library. You should see something like this:
  4. Explore the MoveIt Rviz Motion Planning Plugin by doing the following. If you get stuck or need more documentation at one point, take a look at the similar instructions for the PR2
    • Choose an algorithm from the drop down box to the right of the green “OMPL” text to specify what type of algorithm you want to use.
    • Start configuring the plugin for the Baxter. Expand the “MotionPlanning” section in “Displays” – see Figure 3
      Figure 3

      Figure 3

      • Under the Planning Request section, change the Planning Group to different groups to see how you can control different parts of the robot
  5. Play with visualized robots
    • There are four different visualizations of the robot available:
      1. The Query Start State for motion planning (the planned group is represented in green).
      2. The Query Goal State for motion planning (the planned group is represented in orange).
      3. The Sceen Robot showing the robot’s configuration in the planning scene/ planning environment
      4. The Planned Path Robot Visual that shows the planned path for the robot
    • The display states for each of these visualizations can be toggled on and off using check boxes.
      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.
  6. Interact with Baxter
    • Press Interact in the top menu of rviz. You should see different interactive markers appear for the arm

      • 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.
    • Note what happens when you try to move the arm into collision with itself or the workspace. The two links that are in collision will turn red.
    • The “Use Collision-Aware IK” checkbox in the Motion Planning box on the Context tab 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.
    • Note also what happens when you try to move the end-effector out of its reachable workspace (sometimes the access denied sign will not appear).
  7. Use motion planning
    • You can start motion planning with the Baxter in the MoveIt! Rviz Plugin.
      • Move the Start State to a desired location.
      • Move the Goal State to another desired location.
      • Make sure both states are not in collision with the robot itself.
      • Make sure the Planned Path is being visualized. Also check the “Show Trail” checkbox in the Planned Path tab.
    • In the Planning tab (in the bottom left box), press the Plan button. You should be able to see a visualization of the arm moving and a trail.
    • Try changing the algorithm being used to solve the motion planning problem (Context tab)
    • In the Planning tab, under the Query section, click on “Select Goal State:” and choose “<random>” from the drop down box and click Update to move the arm to random poses. Press Plan to move to that random pose.
  8. Work with obstacles
    • Save this file to your computer. In the Scene Objects tab of Rviz click Import from Text and load the saved file. It should be a scene that contains a potted plant. Adjust the plant’s location if necessary by adjusting the pose and scale values. Try XYZ (0.7,-0.4,-9.7)
    • Position the start goal of the arm to be on one side of the plant, and the end goal to be on the other side.
      Screenshot from 2013-09-27 17:58:46
    • Plan the arm to move around the plant
  9. Benchmark results (the deliverables): Record the path length and planning time distributions for three different algorithms in OMPL for the same exact start goal, end goal and planning scene.
    • Planning time – this can be easily recorded from the console output of the MoveIt launch files
    • Path length – listen to the /tf frame for the end effector wrist and once MoveIt publishes to the trajectory controllers and record the 3 dimensional euclidean distance of the followed path that is executed.
      Here is some useful Matlab code to add up the Euclidian distance between two consecutive coordinates. We assume that the matrix A has three columns for x, y and z, and that the total distance is returned in D.

      for I=2:length(A),


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Set your Twitter account name in your settings to use the TwitterBar Section.