Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Sort Boxes by Color

Dear RoboDK Support and Community,

i just started to use your software for college. 

I already have done the tutorials for pick and place of boxes from a table to a pallet.
Now i would like to sort my boxes (white and blue) to 2 pallets. On one pallet all white on the other all blue boxes.
Is there any sensor/camera i can use to detect the actual color to get my target position?
Is that possible? Can you suggest me any step-by-step solution? Maybe another tutorial?

Best wishes
"maybe not so smart student"
Yes, you can retrieve the color of an object or a tool using the Color command:

In Python, assuming you have your tool item it would be something like this:

# Get all the items attached to a tool
picked_objects = tool.Childs()

# Iterate through all objects
for object in picked_objects:
   rgba_color = object.Color()
   print("Color: " + str(rgba_color))

This question is related to the API so I'm moving it to the RoboDK API section.

Users browsing this thread:
1 Guest(s)