Integration into Gazebo or a real robotic arm

The MoveIt! integration into Gazebo is a relatively straightforward process, which can be divided into two different steps: first of all, we need to provide all of the sensors required by MoveIt!, such as the RGB-D sensor, so that motion planning can take the environment into account, and secondly, we also need to provide a controller as well as the current joint states periodically.

When a sensor is created in Gazebo, it interacts with the system as a normal sensor would, by simply producing the required data. This data is then used by MoveIt! in exactly the same way that data produced by a real sensor would in order to generate collision artifacts in the planning scene. The process of making MoveIt! aware of those sensors will be explained later in this chapter.

As regards the manipulator's (arm and gripper) definition, a URDF description is provided using Xacro files as with any robot in ROS. In MoveIt!, we need to configure the controllers for the manipulator joints as JointTrajectoryController because the motion plans provide the output with messages for that type of controller. For the manipulator used in this chapter, we need two controllers of this type: one for the arm and another for the gripper. The controller configuration is organized in the rosbook_arm_controller_configuration and rosbook_arm_controller_configuration_gazebo packages with the launch and config YAML files, respectively.

This type of controller is provided by the ROS control. Consequently, we need a RobotHardware interface for our arm to actually move in Gazebo or in the real hardware. The implementation for Gazebo and the real arm is different, and here we only provide the first. The rosbook_arm_hardware_gazebo package has the C++ implementation of RobotHardware for the manipulator used in this chapter. This is done by implementing the interface, so we create a new class that inherits from it.

Then, the joints are properly handled by writing the desired target positions (using position control) and reading the actual ones, along with the effort and velocity for each joint. For the sake of simplicity, we omit the explanation of the details of this implementation, which is not needed to understand MoveIt! However, if the number manipulator is drastically changed, the implementation must be changed although it is generic enough to detect the number of joints automatically from the robot description.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.108.22