Hi all, I’m using a plc to comunicate with ur16 but I obtain some differences between angle read on ur16 panel and on plc
for example when on panel I read tool position
rx = 0.289 rad
ry = 2.101 rad
rz = -3.293 rad
on plc I receive
rx = -0.1748 rad
ry = 1.2689 rad
rz = 1.9895 rad
I would ask where i wrong to read correct angle.
Secondly I would like set from plc the unique end position of robot with x y z rx ry rz but I obtain same posizion of tool respect to base in different way for example robot reach the same position in different way rotating the last wrist (or better the head where the tool is installed) how can I avoid this behaviour?
many thanks in advance
The rotation does not have one unique rotation vectors, so there might be multiple rotation vectors representing the same rotation. One way to check wether they represent the same rotation is to calculate the rotation matrix.
In your case, the different solutions represents the same rotation.
I don’t want inxist if it is not possible but is not possible impose last wrist angle to obtain just one position of robot to reach a certain position?
many many thanks in advance
You are seeing that any particular (x, y, z, rx, ry, rz) pose has more than one possible set of joint angles which achieve that pose. To select which set of joint angles is used, you probably need to give the robot a hint about the joint angles that you want. If you are writing URScript, you can specify a “qnear” argument to get_inverse_kin() which takes a set of joint angles that you want the result to be close to. If you are programming with the teach pendant, you can still make use of this command, you just need to use an Assignment line that calls the function. See this article for an example of that. You may need to figure out approximate joint angles for more than just the final wrist angle, but hopefully that’s possible for you.
The get_inverse_kin() function is described more fully in the URScript manual. It will give you a set of joint angles that you can supply to movej, movel, or movep.
I should add to this (as of a problem that came up yesterday), that there are situations where even when you specify the qnear parameter, if the pose is not reachable in the desired orientation, get_inverse_kin() will still return a result but it will be different than the orientation you specified as a reference with qnear.