Simple vision system
A minimal concept of a vision based picking solution.
This examples shows the minimal concept of a vision based picking solution.
Examples are valid for:
CB2 Software version: 1.8.16941
CB3 Software version: 3.3.0.145
e-Series Software version: 5.1
Note that older or newer software versions may behave differently.
These examples can be used for both CB2, CB3 and e-Series.
The example does not cover the method of retrieving the data from the camera, as various cameras have different options.
It is assumed that the camera is able to supply X, Y and rotation data from the common refrence position in respectively millimeters and degrees.
The basic setup is, that the camera and the robot agrees on a common refrence point.
This point can e.g. be taught as a Feature point or simply as a Waypoint in PolyScope.
Move the robot TCP to the refrence potision, and align the coordinate system of the tool to the desired directions.
The coordinate system of the Tool is shown in the TCP Configuration screen.
Setup the same refrence position in the camera.
Thus the systems looks like below.
![]() |
If we placed an item in the cameras field of view, it could look like the illustration below.
Here the camera regognizes that the object, relative to the refrence point, is offset:
X = 100 mm
Y = 50 mm
Rotation = 30 degrees
![]() |
The camera feeds this information to the robot.
For translating the offset, to a position that the robot should move to, we will use the "pose_trans()" script code.
target = pose_trans(refrence_point, offset)
pose_trans() takes two arguments (poses) and performs a position transformation to the resulting position.
Now we can create our UR program.
The recipe is:
RobotProgram
MoveJ
refrence_point
GetCameraData Folder
# Here we should read the data from the camera
x = 100
y = 50
rz = 30
Calculate Folder
# Convert mm to m and deg to rad
offset = p[(x/1000),(y/1000), 0, 0, 0, d2r(rz)]
target = pose_trans(refrence_point, offset)
MoveToCamPose
MoveL
target (variable pose)
See program below: