The code used in this tutorial is available!

Code can be found at industrial_training repository in doc folder. Use kinetic-devel branch.

Motion Planning using RViz

In this exercise, we will (finally) learn how to use the MoveIt! RViz plugin to plan and execute motion on a simulated robot. We will explore the different options and constraints associated with both MoveIt! and the RViz plugin.

Launch the Planning Environment

  1. Source your catkin workspace.

  2. Bring up the planning environment, connected to a ROS-I Simulator node:

    roslaunch myworkcell_moveit_config myworkcell_planning_execution.launch
    

Plugin Display Options

  1. Find and test the following display options in the Displays panel, Motion Planning display

    • Scene Robot -> Show Robot Visual
    • Scene Robot -> Show Robot Collision
    • Planning Request -> Query Start State
    • Planning Request -> Query Goal State
  2. For now, enable display of the Show Robot Visual and Query Goal State, leaving Show Robot Collision and Query Start State disabled

Basic Motion

  1. In the Motion Planning panel, select the Planning tab

  2. Under the Query section, expand the Select Goal State section

    • select <random valid> and press Update
    • observe the goal position in the graphics window
  3. Click Plan to see the robot motion generated by the MoveIt! planning libraries

    • deselect Displays -> Motion Planning -> Planned Path -> Loop Animation to stop the cyclic display
    • select Displays -> Motion Planning -> Planned Path -> Show Trail to show the swept path
  4. Click Execute to run the motion on the Industrial Robot Simulator

    • observe that the multi-colored scene robot display updates to show that the robot has "moved" to the goal position
  5. Repeat steps 2-5 a few more times

    • try using the interactive marker to manually move the robot to a desired position
    • try using a named pose (e.g. "straight up")
    • try enabling Displays -> Motion Planning -> Planned Path -> Show Trail

Beyond the Basics

  1. Experiment with different Planning Algorithms
    • select Context tab, choose a Planning Algorithm (drop-down box next to "OMPL")
    • the RRTkConfigDefault algorithm is often much faster
  2. Environment Obstacles
    • Adjust the Goal State to move the robot into collision with an obstacle (e.g. the table)
      • note the colliding links are colored red
      • since the position is unreachable, you can see the robot search through different positions as it tries to find a solution
      • try disabling the Use Collision-Aware IK setting on the Context tab
      • see that the collisions are still detected, but the solver no longer searches for a collision-free solution
    • Try to plan a path through the obstacle
      • It may help to have "Collision-Aware IK" disabled when moving the Goal State
      • If the robot fails to plan, check the error log and try repeating the plan request
      • Because the default planners are sampling-based, they may produce different results on each execution
      • You can also try increasing the planning time to allow a successful plan to be created
      • Try different planning algorithms in this, more complex, planning task
    • Try adding a new obstacle to the scene:
      • Download the I-Beam.dae model to your VM
      • Under the Scene Objects tab, add the file you just created
      • Move the I-Beam into an interesting position, using the manipulation handles
      • Press Publish Scene, to push the updated position to MoveIt
      • Try to plan around the obstacle

Open Source Feedback

See something that needs improvement? Please open a pull request on this GitHub page