Here is the program I used for the demo:
Program
Robot Program
'MoveJ'
If parts<2
MoveJ
Waypoint_1
Gripper Move 25%
Camera Locate
MoveL
Waypoint_2
Waypoint_3
Gripper Close
Waypoint_4
Set parts=parts+1
ElseIf 2≤parts and parts≤4
MoveJ
Waypoint_8
Gripper Move 25%
Camera Locate
MoveL
Waypoint_5
Waypoint_6
Gripper Close
Waypoint_7
Set parts=parts+1
ElseIf 4≤parts and parts≤6
MoveJ
Waypoint_9
Gripper Move 25%
Camera Locate
MoveL
Waypoint_11
Waypoint_10
Gripper Close
Waypoint_12
Set parts=parts+1
ElseIf parts≥6
parts≔0
If rq_is_object_detected()
MoveJ
Approach_Tray
parts≔parts-1
MoveL
Waypoint_13
Gripper Move 25%
Hi guys,
Since the Robotiq camera is mounted on the robot's wrist, the field of view is limited by the reach of the robot. This means that the camera's field of view is often limited to an area of about 18"x18" on a UR5. This can be problematic if you plan on using the camera to identify parts on a large table and utilizing the UR5's longer reach. However, by using multiple camera locate nodes you can increase the camera's workspace.
In this demonstration, I used 3 camera locate nodes to utilize the entire surface surrounding the UR5. These 3 camera locate nodes are looking for the exact same part. In the program, I am incrementing the variable "part" everytime time the program goes through the camera locate node. When the vision system identifies an object that matches the image template, the robot approaches the part to pick it up. If the gripper detects that there is an object in its fingertips, the robot jumps to another section of the program. This IF statement instructs the robot on where to place the part, and it removes one count from the variable "part". This is because I only want to increment the variable "part" when the vision system fails to identify a part in its field of view since I am using this variable to change snapshot positions. When the robot fails to identify a part in the 3rd and last snapshot position, the variable "part" is reset to 0 and the robot returns to the 1st snapshot position.
Here is a video of the demonstration :
https://www.youtube.com/watch?v=JyzNq4X5clI&feature=youtu.be