MoveGroup Interface tutorial

Overview
The MoveGroup Interface is a C++ library that offers simplified access to the capabilities provided by the move_group node. Complete [/classmoveit_1_1planning__interface_1_1MoveGroup.html C++ API] of the class.

Walk Through
The example above is pretty straightforward, but lets walk through it.

First we set up the ROS node:

Next we create an instance of the MoveGroup interface. It is created for a particular Group which we want to move (in this case the "right_arm" group). This will talk to the MoveGroup node and tell it what to plan and how to move the robot arm.

We set a target (goal) position. This is where we want the robot to move to. There are numerous ways to set a goal and provide constraints for the motion, but here we just tell it to choose a random pose.

All that is left is to say go! The move method tells MoveIt! to plan a collision free path to the Target pose and (if it finds one) execute it.

At the end we just wait for the user to hit CTRL-C:

MoveGroup interface
For more details on the MoveGroup interface see MoveGroup doxygen