Motion planning using the move_group C++ interface
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! ROS Visualization (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. 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
Let's start using the move_group
API to execute planned trajectories.
Motion planning a random path using MoveIt! C++ APIs
The first example that we are going to see is a random motion plan...