BoxPick

This tutorial shows how to use the BoxPick module with Basler’s partner Roboception’s URCap.

Before we start

This tutorial assumes that you are familiar with the Generic rc_visard node and that a valid hand-eye calibration has been stored on the rc_visard as described in Hand-Eye Calibration.

Overview

The BoxPick functionality is available in the generic rc_visard node. Please see Generic rc_visard node in order to learn how to work with generic rc_visard nodes.

The following functions are available for BoxPick:

  • ComputeGrasps: Triggers detection of boxes
  • GetNextGrasp: Gets the next grasp and size of a detected item after detection has been triggered
  • GetLCPose: Returns the pose of the detected load carrier.

ComputeGrasps

../_images/bp_detect_items.png

It is mandatory to set the minimum and maximum length and width of the item model. If necessary, enter a load carrier ID and/or a region of interest ID.

If the CollisionCheck license is available on the sensor, it is also possible to set the gripper and pre-grasp offset for the collision check.

GetNextGrasp

../_images/bp_get_next_item.png

This function requires that ComputeGrasps has been triggered before. It returns the next available item/box that was detected and stores the pose in PolyScope’s variable format (e.g. p[-0.300517, -0.367119, -0.007997, -0.001221, 3.116277, 0.038892]). If no box is detected, the call will return a zero pose (p[0,0,0,0,0,0]). It also returns the size of the detected object in vector format (e.g. [0.04, 0.02] for a box with 4 x 2 centimeters).

If no reachable object is detected and the Stop program when pose is not available checkbox is checked, a popup will appear and the program will be terminated. If the checkbox is not checked, a zero pose (p[0,0,0,0,0,0]) will be returned.

Note

When the Stop program when pose is not available checkbox is unchecked, the user has to catch the case when nothing is detected (the zero pose (p[0,0,0,0,0,0]) is returned). If this situation is not handled, it might lead to collision or undefined robot behavior.

With the ‘Pose orientation’ drop-down menu it is possible to change the strategy of calculating the angle of the returned pose. There are four different options to choose from:

  • Last waypoint orientation The detected orientation is ignored, instead the orientation of the last waypoint is used.
  • Only RZ from detected pose For RZ the detected orientation is used, RX and RY are based on the last waypoint orientation.
  • Only RX, RY from detected pose For RX and RY the detected orientation is used, RZ is based on the last waypoint orientation.
  • Detected pose orientation The complete detected orientation is used.

GetBpLcPose

../_images/bp_get_lc_pose.png

This function requires that ComputeGrasps has been triggered with a load carrier ID. It returns the pose of the detected load carrier. If no load carrier is detected, a zero pose will be (p[0,0,0,0,0,0]) is returned.

Note

When the Stop program when pose is not available checkbox is unchecked, the user has to catch the case when nothing is detected (the zero pose (p[0,0,0,0,0,0]) is returned). If this situation is not handled, it might lead to collision or undefined robot behavior.