KUKA Pickit interface
This article documents the interface of the KUKA Pickit integration. For installation instructions, please refer to the KUKA installation and setup article.
Pickit communication functions
Below you find an overview of the functions defined by Pickit that are responsible for communicating with a Pickit system. For more details on these functions, refer to The Pickit interface.
System functions
Function |
Comment |
Input arguments |
Return type |
---|---|---|---|
Pickit_is_running() |
Check if Pickit is set to Robot mode. |
- |
Boolean |
Detection functions
Function |
Comment |
Input arguments |
Return type |
---|---|---|---|
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() function. 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 the Pickit_capture_image() function (or one of the Detection functions). |
- |
- |
Pickit_detect_with_retr (LZ_Retries:IN) |
Repeatedly trigger a Pickit object detection as long as nothing is found and the ROI is not empty, up to a number of attempts. |
max number of retries |
- |
Pickit_get_results() |
Combination of Pickit_has_response() and Pickit_gppd() function. This function is not compatible with Pickit versions prior 2.2. |
- |
Boolean - (All Pickit variables are updated in the background) |
Pickit_has_response() |
Returns true and updates results, if the Pickit detection is finished. Usually used inside a Wait command. Pickit_has_response() should always be the next Pickit function after a Pickit_look_for_object(), Pickit_next_object(), Pickit_detect_with_retr(..) or Pickit_process_image() request. |
- |
Boolean - (Some Pickit variables are updated in the background) |
Pickit_gppd() |
Request the pick point ID and pick point offset of the last requested object. This function is not compatible with Pickit versions prior 2.2. |
- |
- (Some Pickit variables are updated in the background) |
Configuration functions
Function |
Comment |
Input arguments |
Return type |
---|---|---|---|
Pickit_configure (LZ_Setup:IN,LZ_Product:IN) |
Load the specified setup and product Configuration. |
setup id, product id |
- |
Pickit_build_bkg_cloud() |
Build the background cloud used by one of the Advanced filters. |
- |
- |
Calibration functions
Function |
Comment |
Input arguments |
Return type |
---|---|---|---|
Pickit_do_calibration() |
Trigger a detection of the robot-camera calibration plate. |
- |
- |
Monitoring functions
Function |
Comment |
Input arguments |
Return type |
---|---|---|---|
Pickit_save_scene() |
Save a snapshot with the latest detection results. |
- |
- |
Pickit helper functions
The following functions don’t communicate with Pickit, using the results of previous commands, but make your robot program more readable. The return values of these functions get updated after using the Pickit functions Pickit_has_response() or Pickit_get_results(). See KUKA simple pick and place on how they are typically implemented in a robot program.
Function |
Return value |
---|---|
Pickit_object_found() |
True if detection results are available. |
Pickit_roi_empty() |
True if the ROI is empty. |
Pickit_no_image_captured() |
True if no image was captured by Pickit. If so, check the camera connection. |
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().
Function |
Return value |
Return type |
---|---|---|
Pickit_get_pose() |
Pick point expressed with respect to the robot base frame. |
FRAME |
Pickit_object_pick_id() |
ID of the pick point that was selected for the previously sent object. |
INT |
Pickit_object_ref_id() |
ID of the selected pick point’s reference pick point. |
INT |
Pickit_get_offset() |
Pick point offset of the last requested object. |
FRAME |
Pickit_object_type() |
INT |
|
Pickit_object_dim_1() |
Length or diameter (mm). |
REAL |
Pickit_object_dim_2() |
Width or diameter (mm). |
REAL |
Pickit_object_dim_3() |
Height (mm). |
REAL |
Pickit_object_age() |
Amount of time that has passed between the capturing of the camera image and the moment the object information is sent to the robot (s). |
REAL |
Pickit_remaining_objects() |
Number of remaining objects that can be sent to the robot in the next messages. |
INT |
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 use the pick offset from a reference/nominal pick point in order to correct a drop-off point.
The following lines of code show how to correct the fixed point Dropit
in a KUKA robot program:
drop_offset = Pickit_get_offset()
F_drop_correct = Dropit:drop_offset
PTP F_drop_correct