In Chapter 6, Using the ROS MoveIt! and Navigation Stack, we discussed how to interact with a robot arm, and how to plan its path using the MoveIt! RViz motion planning plugin. In this section, we will see how to program the robot motion using the move_group C++ APIs. Motion planning using RViz can also be done programmatically through the move_group C++ APIs.
The first step to start working with C++ APIs is to create another ROS package that has the MoveIt! packages as dependencies. You can get an existing seven_dof_arm_test package from the code provided with this book, or you can download it from the following repository:
$ git clone https://github.com/jocacace/seven_dof_arm_test.git
We can create this same package using the following command:
$ catkin_create_pkg seven_dof_arm_test catkin cmake_modules interactive_markers...