Getting started with CollisionCheck

The CollisionCheck module is integrated with the ItemPick and BoxPick modules, but can also be used as standalone product. In this tutorial we focus on setting the parameters and checking collisions with the ItemPick module.

Warning

Collisions are checked only between the load carrier and the gripper, not the robot itself, the flange, other objects or the item located in the robot gripper.

Before we start

In order to go through this tutorial, the following prerequisites should be met:

The rc_visard is properly configured:

  1. The rc_visard’s image version is at least 20.04 and the rc_visard’s license includes the CollisionCheck and ItemPick components. This can be verified on the Web GUI’s System tab.

The previous tutorial Setting up the gripper has been completed.

Note

The detection in the tutorial is done with the ItemPick module. To fully recreate it, it is necessary to have the ItemPick module available on the sensor and be able to run the detection as described in Configuring ItemPick for Bin-Picking. However, reading it will give useful insights also for people who use it with BoxPick or as a standalone module.

Checking collisions

Note

To show the results of the CollisionCheck module, we will use the Try Out section of the ItemPick module’s Web GUI. More details on how to use CollisionCheck with ItemPick and BoxPick are available in the tutorials and the manual for the respective modules. For using CollisionCheck as a standalone product check the CollisionCheck manual.

After the gripper and parameters are configured, filtering out the colliding grasps is quite straight forward. In the Try Out section of the Web GUI’s ItemPick tab, we choose “Grasp Point Detection” as detection type. Then we define the suction surface width and height corresponding to the real dimensions of the gripper’s suction cup. After that, we choose the load carrier and gripper as shown on Fig. 59.

After clicking on the “Detect Grasp Points” button, only the collision-free grasps are returned.

../_images/try_out_ip_collision.png

Fig. 59 ItemPick tryout section

In the visualization images the colliding grasps are drawn as red points and black ellipses as shown in Fig. 60, but will not be listed in the ‘Result of Grasp Point Detection’ section. To get all detected grasps it is necessary to run the detection without the collision check, i.e. without selecting a gripper.

../_images/grasp_points_collision_check.jpg

Fig. 60 Grasps on the tilted objects close to the load carrier walls are marked as colliding

Setting a pre-grasp offset

The pre_grasp_offset argument on the Web GUI’s ItemPick and BoxPick tabs can be used for additionally checking if the gripper is in collision with the load carrier at any point during a linear motion from the pre-grasp position to the grasp position. The pre-grasp offset is the offset from the grasp position to the pre-grasp position in the grasp’s coordinate frame. If this value is set to (0,0,0), collisions will only be checked at the grasp points.

../_images/pre_grasp_offset.png

Fig. 61 This grasp would be marked as colliding. The gripper collides with the load carrier during movement from the pre-grasp position to the grasp position.

Configuring parameters

The parameters for collision checking are set in the Web GUI’s CollisionCheck tab or via the REST-API interface, no matter if the module is used as a standalone product or as a part of the ItemPick or BoxPick modules. Details are given in the manual in Parameter overview.

Collision Distance

The collision_distance parameter is the minimal distance in meters between any part of the gripper geometry and any of the load carrier’s walls for a grasp to be considered collision free. Fig. 62 visualizes this distance. This parameter should be increased if the module returns valid grasps too close to the load carrier’s walls. If, on the other hand, valid grasps near the load carrier’s walls are rejected, this value should be decreased.

../_images/collision_distance.png

Fig. 62 The minimal distance between the gripper geometry and the load carrier’s walls is \(d\).

Check Flange

The check_flange parameter is used to activate an additional safety check to prevent collisions between the load carrier and the robot body. If this check is active, grasps where any part of robot flange is inside the load carrier are marked as colliding. For this functionality to work properly it is necessary to correctly set the flange radius during the gripper creation (see Flange radius).

../_images/check_flange.png

Fig. 63 Case A would be marked as collision only if check_flange is true. Case B is collision free.

Check Bottom

When this check is enabled, the collisions will be checked not only with the side walls of the load carrier but also with its bottom.

If the TCP of the gripper is inside the collision geometry (e.g. for suction cups), it might happen that the grasp points close to the load carrier bottom are marked as colliding. To prevent this from happening, collisions with the load carrier bottom can be disabled by setting the check_bottom parameter to false. This parameter should only be disabled if it is safe to assume that such collisions will not happen. We do not recommend to switch it off for large grippers that might collide with the bottom of the load carrier when they are tilted.