ABB Pickit interface

This article documents the interface of the ABB Pickit integration. For installation instructions, please refer to the ABB installation and setup article.

Pickit functions

Below you find an overview of the functions for communicating with Pickit. For more details on these functions, refer to Pickit interface.

Note

When there is an unexpected failure while calling any of the Pickit functions, the program is terminated and a descriptive message is displayed in the robot pendant.

System functions

The following functions send system-level commands to Pickit.

pickit_is_running()

Check if Pickit is set to Robot mode.

Returns

(bool) – True if Pickit is in Robot mode.

pickit_shutdown()

Cleanly shut down the Pickit processor.

Detection functions

These functions are used to trigger detections and collect the results.

pickit_capture_image()

Trigger Pickit to capture a camera image to be used by a following pickit_process_image() command. This command blocks the robot movements. If the camera moves during image capture, a warning will be shown in the web interface. This function is suitable if the camera is robot-mounted.

pickit_process_image()

Trigger an object detection on the camera image that was previously captured via pickit_capture_image() command. This command is non-blocking. The robot can move while Pickit is processing the image that was already captured by the pickit_capture_image() command. This function is suitable if the camera is robot-mounted.

pickit_look_for_object()

Trigger a Pickit object detection (capture image and process image combined) using the currently active setup and product Configuration. This command is non-blocking. The robot can move while Pickit is detecting objects. This function is suitable if the camera is fixed.

pickit_next_object()

Request the next detected object.

pickit_get_pick_point_data()

Request the pick point ID and pick point offset of the last requested object. Some Pickit detection results are updated in the background.

pickit_detection_with_retries()

Repeatedly trigger a Pickit object detection as long as nothing is found and the ROI is not empty, up to a number of attempts.

Parameters

retries (num) – Max number of attempts.

pickit_has_response()

Returns true and updates results, if the Pickit detection is finished. Usually used inside a Wait command. It should always be the next Pickit function after a pickit_look_for_object(), pickit_next_object(), pickit_detection_with_retries() or pickit_process_image() request. Some Pickit detection results are updated in the background.

Returns

(bool) – True if the detection completed.

pickit_get_results()

Calls pickit_has_response() and, if at least one object was detected, also calls pickit_get_pick_point_data(). This is the most compact and therefore recommended way for retrieving the detection results. All Pickit detection results are updated in the background.

Configuration functions

These functions are used to change the active product and setup configuration.

pickit_configure()

Load the specified setup and product Configuration.

Parameters
  • setup (num) – ID of the desired setup configuration.

  • product (num) – ID of the desired product configuration.

pickit_save_setup()

Save the currently active setup file.

pickit_save_product()

Save the currently active product file.

pickit_set_cylinder_dim()

Set the dimensions of a Teach Cylinder model, in millimeters. This will cause the product file to have unsaved changes, and you can save it by calling pickit_save_product().

Parameters
  • diameter (num) – Cylinder diameter [mm].

  • length (num) – Cylinder length [mm].

pickit_build_background()

Build the background cloud used by one of the Advanced filters.

Calibration functions

These functions are used to perform the robot-camera calibration.

pickit_configure_calibration()

Configure the next robot-camera calibration. If called with no arguments, the currently defined settings are used.

Parameters
  • method (\num) – Learn more about the argument here.

  • camera_mount (\num) – Learn more about the argument here.

  • translation (\pos) – Learn more about the argument here.

  • rotation (\orient) – Learn more about the argument here.

pickit_find_calib_plate()

Trigger a detection of the robot-camera calibration plate.

pickit_calculate_calibration()

Calculate the robot-camera calibration.

pickit_validate_calibration()

Validate the current robot-camera calibration.

Parameters
  • distance_threshold (num) – Distance threshold [mm].

  • angle_threshold (num) – Angle threshold [deg].

Returns

(bool) – True if the measured distance and angle errors are below the specified thresholds.

Monitoring functions

This function is used to save data about a running application. This is specially useful when ramping up in production, as the stored data allows detecting eventual issues in the application.

pickit_save_snapshot()

Save a snapshot with the latest detection results.

Parameters

subfolder_id (\num) – Number of the subfolder where to save the snapshot (0 to 255). If 0 or not specified, the snapshot is saved directly in the robot folder.

Pickit helper functions

The following functions don’t communicate with Pickit. They use the information received in the most recent detection results, and are intended to make your robot program more readable. The return values of these functions get updated when calling pickit_has_response() or pickit_get_results(). See ABB example simple pick and place on how they are typically implemented in a robot program.

pickit_object_found()

Check if detection results are available.

Returns

(bool) – True if a valid object was detected.

pickit_is_pose_reachable()

Check whether or not the pose is reachable with the specified tool.

Parameters
  • pose (robtarget) – Pose to be checked.

  • tool (tooldata) – Tool to be reach the pose.

Returns

(bool) – True if the pose is reachable.

pickit_no_objects()

Check if no pickable objects were detected (while the ROI was not empty).

Returns

(bool) – True if no valid object were detected and the ROI is not empty.

pickit_roi_empty()
Returns

(bool) – True if the ROI is empty.

pickit_no_image_captured()

Check if no image was captured by Pickit. If so, verify your camera connection.

Returns

(bool) – True, if no image could be captured by the camera.

Pickit output functions

The following functions are used to get the output values of Pickit. The output values are updated after using the Pickit function pickit_has_response or pickit_get_results.

pickit_get_pose()
Returns

(robtarget) – Pick pose of the detected object expressed with respect to the robot base frame.

pickit_pick_id()
Returns

(num) – ID of the pick point that was selected for the detected object.

pickit_pick_reference_id()
Returns

(num) – ID of the selected pick point’s reference pick point.

pickit_pick_offset()
Returns

(pose) – Pick point offset of the last requested object.

pickit_object_type()
  • For a Teach detection, ID type of the detected object.

  • For a Flex/Pattern detection, the object type of the detected object.

  • In a Bags detection, a value holding information about the bag pattern and the detected layer orientation.

Returns

(num) – Object type.

pickit_object_dimensions()

[0]: Length or diameter (mm). [1]: Width or diameter (mm). [2]: Height (mm).

Returns

(pose) – Object dimensions.

pickit_object_age()

Get the amount of time that has passed between the capturing of the camera image and the moment the object information is sent to the robot, in seconds.

Returns

(num) – object age [s].

pickit_remaining_objects()
Returns

(num) – Number of remaining objects that can be sent to the robot using pickit_next_object().

More detailed information about these outputs can be found here.

Using pick offset in a robot program

When using multiple pick points or flexible pick orientations, it can be useful to compensate the pick offset from a reference/nominal pick point in order to correct a drop-off point. For this, an additional function is provided, pickit_apply_offset(robtarget ..). In the example below the robot will move to the offset point relative to the fixed point DropOff.

MoveJ pickit_apply_offset(DropOff), v500, fine, tool0;