Skip to main content
Skip table of contents

pickit_next_object(offset_z)

Features

This function returns pick_prepos and pick_pos detected next to the input model.

Parameters

Parameter NameData TypeDefault ValueDescription

offset_z

int

-

The offset_z sets to 'pick_prepos' distance.

Return

ValueData Type Description
data_dictionary = {'pick_pos':pick_pos, 'pick_prepos':pick_prepos,                 'object_age':data['object_age'], 'object_type':data['object_type'],               'object_dimensions':data['object_dimensions'],           'object_remaining':data['objects_remaining'], 'status':data['status']}

{'pick_pos': posx,

'pick_prepos': posx,               

'object_age': int, 'object_type': int ,               'object_dimensions': int ,

'object_remaining': int ,

'status': int}
 

'pick_pos': Model recognition position,

'pick_prepos': Offset value of model recognition position,                

'object_age': The amount of time that has passed between the capturing of the camera data and the moment the object information is sent to the robot. This value has to be divided by the  MULT factor.,

'object_type': The type of object detected at object_pose ,              

'object_dimensions': When reading array elements, each value has to be divided by the  MULT factor. ,

'object_remaining': Only one object per pickit_to_robot_data message can be communicated. If this field is non-zero, it contains the number of remaining objects that can be sent in next messages to the robot. ,

'status': Contains the Pickit status or a response to previously received robot commands.

Example

PY
pickit_connect("192.168.137.90")
pickit_change_configuration(7, 10) # These numbers are defined in Pickit
 
set_singular_handling(DR_AVOID)
set_velj(60.0)
set_accj(100.0)
set_velx(250.0, 80.625)
set_accx(1000.0, 322.5)
home_pos = posx(122.09, 35.28, 303.63, 140.45, 158.9, 134.39)
while True:
   # Detection
   data = pickit_detection(100)
   if data['status'] == ResponseStatus.OBJECTS_FOUND:
# Picking motion
       movel(data['pick_prepos'])       
       movel(data['pick_pos'])
       movel(data['pick_prepos'])
        
       remaining = data['object_remaining']   
       while remaining > 0:
           data = pickit_next_object(100)
           remaining = data['object_remaining']
            
           # Picking motion
           movel(data['pick_prepos'])
           movel(data['pick_pos'])
           movel(data['pick_prepos'])
 
pickit_disconnect()
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.