../_images/tiago-icon.png ../_images/tiagopro-icon.png

Overview of the Advanced Grasping pipeline#

Attention

This page documents a Premium robot feature. It may or may not be available on your robot.

Overview#

../_images/advanced_grasping_overview_image.png

Figure: TIAGo grasping an object using the Advanced Grasping package.#

The Advanced Grasping (AG) software package provides a framework to use the mobile manipulation capabilities of TIAGo and TIAGo++. It can be used with the PAL gripper, the Robotiq 2F-85 and the Robotiq 2F-140.

The package combines behavior trees and MoveIt! to allow the robot to perform complex grasping tasks in a broad range of environments. The package heavily relies on the planning scene of MoveIt! and it recommended to check out the documentation of this MoveIt! planning scene.

The behavior tree structure provides an infrastructure to easily adapt to the needs of the application. This chapter provides documentation on the AG package, and is organized as follows:

First, the software architecture of the package is introduced. Next, an overview is given on how to use the action interface to perform grasping tasks, both in simulation and on the real robot.

Finally, an overview is given of the customization options to adapt the package to the needs of new applications.

Advanced Grasping architecture#

The internal architecture of the AG package is based on the server-client structure. These servers are implemented using ROS Actions. The three servers that are available are:

  • Perception server.

  • Grasp server.

  • Place server.

These servers are available once the principal node of AG is started. A general overview of the internal architecture is shown below.

image/svg+xml Advanced Grasping PerceptionServer GraspServer PlaceServer CustomServers

The AG node loads three default action servers, but with the possibility to add custom action servers. Section Create an action server plugin of the tutorial explains how to create and load an action server step by step.

Each action server executes a behavior tree and returns a result based on the behavior tree. It is possible to change the behavior tree linked to a specific action. This is shown in Section Change a behavior tree of the tutorial. The general structure of the relation between action servers and its linked behavior tree can be seen below.

image/svg+xml Action Server Goal Result Action Server Goal Result Tree 1 Tree 1 Tree 2 Tree 3 Tree 4

Using the Advanced Grasping pipeline#

The Advanced Grasping package can be run either on the real robot or in a simulation environment.

Advanced Grasping in the robot#

To start the AG package on the robot run the following command:

pal-start advanced_grasping

The MoveIt! planning scene as well as the sensor output of the robot can be visualized using RViz. Make sure to export the ROS_MASTER_URI as explained in rviz-visualization. Then run the following command:

rosrun rviz rviz -d `rospack find pal_bt_grasping_tiago`/config/rviz/grasp_demo.rviz

Note

The Advanced Grasping package uses the MoveIt! planning scene to plan movements of the arm. The point cloud of the camera in the head is used to construct an octomap of the environment in the planning scene. If an object or obstacle is not within the field of view of the camera of the robot, it will not be part of this octomap and thus, not part of the planning scene. Only objects that are part of the planning scene are considered for obstacle avoidance when planning motions of the arm. When using the Advanced Grasping package always make sure that the blind spots of the robot are clear of obstacles or walls to avoid collision while moving the arm. The MoveIt! planning scene can be compared to the actual environment with the help of the RViz visualization.

../_images/rviz_visualization.png

Figure: RViz visualizing TIAGo and the MoveIt! planning scene. The planning scene contains the octomap and an object.#

Advanced Grasping in simulation#

To use the package in a simulation environment follow the steps below.

First launch the gazebo simulation of TIAGo with the advanced_grasping argument set to true:

roslaunch tiago_gazebo tiago_gazebo.launch advanced_grasping:=true end_effector:=pal-gripper world:=icra_cylinder

In another terminal, launch the Advanced Grasping servers:

roslaunch pal_bt_grasping_tiago advanced_grasping.launch

in a third terminal launch RViz with the following command:

rosrun rviz rviz -d `rospack find pal_bt_grasping_tiago`/config/rviz/grasp_demo.rviz

Once the servers have been started grasping tasks can be executed by sending ROS action goals. Check Advanced Grasping: step-by-step to see an example.

../_images/tiago_simulation.png

Figure: TIAGo simulated in the world icra_cylinder.#

Demos#

The package provides a demo that can be run out of the box, the clear-table demo. The demo consists of a Python script that uses the ROS action interface to communicate with the Advanced Grasping node. A quick overview is given below.

Clear table demo

../_images/clear_table_demo.svg

Figure: TIAGo placing an object in a basket using the clear_table demo.#

In this demo, the robot has the task to clear all objects on the table. It will look down to find a table and the objects placed there. Once found it will start to remove the objects one by one, by placing them in a basket next to the table. When the table is cleared the robot will continue to watch for objects appearing on the table and remove them again.

To set up the demo the following is required:

  • Table: A table with a height between 20 to 60 cm. Move the robot to a position that is around 25 cm from the table. Ensure the robot is able to see both the surface and the legs of the table when looking down.

  • Basket: The basket should be placed at around 45 cm to the right of TIAGo and around 60 cm in front.

  • Objects: Cubes, cylinders and spheres can be used. Ensure the object is not too large in order to be graspable by the end-effector.

The demo is started with the following command:

rosrun pal_bt_grasping_demos clear_table_demo.py

See also#