In Chapter 4, Using the ROS MoveIt! and Navigation Stack, we discussed about how to interact with a robot arm and how to plan its path using 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 package seven_dof_arm_test
from chapter_10_codes/
. We can create this same package using the following command:
$ catkin_create_pkg seven_dof_arm_test catkin cmake_modules interactive_markers moveit_core moveit_ros_perception moveit_ros_planning_interface pluginlib roscpp std_msgs