Sample program

This tutorial shows example program that uses ItemPick Module. Programs with similar structure can also be downloaded for SilhouetteMatch and BoxPick Modules.

This program will only work properly for externally mounted sensor. In case of sensor mounted on the robot the computation should be triggered when the robot is stationary, so the movement has to be stopped in the observe position with Wait is_steady() command.


Fig. 64 Program structure

Before we start

This tutorials assumes that the tutorial Getting started with ItemPick has been completed, and the valid hand eye calibration has been stored on the rc_visard as described in Hand-Eye Calibration.

Load the program

The roboception picking sample programs can be downloaded from here. The programs can be then used and loaded as every standard program.

Setting up the program

Setting up ItemPick module

To ensure proper working of the detection module it is necessary to setup and test the parameters in ComputeGrasp node. For details on how to do this see ItemPick

Depending on the application it also might be necessary to change the pose orientation in GetNextGrasp node. The variable name for the pose should not be changed, since it is used later in the program.

Setting up gripper actions

If the program is left as it is, the robot will just go to computed poses, but no grasping action will be performed. Therefore it is necessary to specify how the gripper is working. Parts of the programs that should be filled are marked with a comment.

Teaching poses

Two waypoints have to be taught before the application can be run: observe_pose and drop_pose. Their position in the workspace depends on the cell layout and ItemPick settings used to compute grasps.

When the rc_visard is mounted externally, depending on the scenario, there are different requirements for the robot pose at the waypoints and during movement between them:

  • If no load carrier or region of interest is being used, the robot must be completely outside the field of view of the camera
  • If a load carrier is used during the detection, the robot must not occlude the load carrier and the items to be grasped
  • If the region of interest is used during the detection, the robot must be completely outside the region of interest and must not occlude the items that should be grasped

For the robot mounted sensor in the observe_pose all objects of interest has to be in the field of view of the sensor.

Additionally the pre pick distance can be changed by changing the value of the ‘prepick_offset’ variable in ‘BeforeStart’ tab.