Move Group Interface/C++ API ================================== In MoveIt!, the primary user interface is through the :move_group_interface:`MoveGroup` class. It provides easy to use functionality for most operations that a user may want to carry out, specifically setting joint or pose goals, creating motion plans, moving the robot, adding objects into the environment and attaching/detaching objects from the robot. .. tutorial-formatter:: ../move_group_interface_tutorial.cpp The entire code ^^^^^^^^^^^^^^^ The entire code can be seen :codedir:`here in the moveit_pr2 github project`. Compiling the code ^^^^^^^^^^^^^^^^^^ Follow the `instructions for compiling code from source `_. The launch file ^^^^^^^^^^^^^^^ The entire launch file is `here `_ on github. All the code in this tutorial can be compiled and run from the pr2_moveit_tutorials package that you have as part of your MoveIt! setup. Running the code ^^^^^^^^^^^^^^^^ Roslaunch the launch file to run the code directly from pr2_moveit_tutorials:: roslaunch pr2_moveit_tutorials move_group_interface_tutorial.launch Expected Output ^^^^^^^^^^^^^^^ In Rviz, we should be able to see the following (there will be a delay of 5-10 seconds between each step): 1. The robot moves its right arm to the pose goal to its right front. 2. The robot repeats the same motion from 1. 3. The robot moves its right arm to the joint goal at its right side. 4. The robot moves its right arm back to a new pose goal while maintaining the end-effector level. 5. The robot moves its right arm along the desired cartesian path (a triangle up+forward, left, down+back). 6. A box object is added into the environment to the right of the right arm. 7. The robot moves its right arm to the pose goal, avoiding collision with the box. 8. The object is attached to the wrist (its color will change to purple/orange/green). 9. The object is detached from the wrist (its color will change back to green). 10. The object is removed from the environment. Links ===== * Back to :moveit_website:`Moveit Tutorials `