Warning
You are reading the documentation for an older Pickit release (3.0). Documentation for the latest release (3.4) can be found here.
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 The 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_look_for_object()
Trigger a Pickit object detection using the currently active setup and product Configuration.
- pickit_next_object()
Request the next detected object.
- pickit_capture_image()
Trigger Pickit to capture a camera image to be used by a following
pickit_process_image()
call. If the camera moves during image capture, a warning will be shown in the web interface.
- pickit_process_image()
Trigger an object detection on the camera image that was previously captured via
pickit_capture_image()
(or another command triggering a detection).
- 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()
orpickit_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 callspickit_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.
- 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 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 picking program 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;