Motion planning using the move_group ROS 2 wrapper
In this section, we will see how to program the robot’s motion using the move_group
wrapper implemented in C++. The first step is to create another ROS package that has the MoveIt packages as dependencies. You can get an existing panda_moveit_control
package from the code provided with this book, or you can download it from the following repository: https://github.com/PacktPublishing/Mastering-ROS-2/tree/main/Chapter09.
To create the package from scratch instead, use the following command:
ros2 pkg create panda_moveit_control --dependencies moveit_ros_planning_interface rclcpp
In the first example, we will use the move group wrapper to execute a motion in the joint space. This means the desired robot configuration is set, specifying the value of each single joint of the robot. This motion has the advantage of being simpler to implement and more computationally efficient because it directly plans in the robot’...