Inconsistent return value for TCP rotations

This is for eSeries, Polyscope 5.11.8.

When using the “getTCPModel()” method to access the TCPs listed in the CAP, the value returned for rotations is NOT the same as the value returned by the script command get_tcp_offset().

Below is a screenshot of what is happening.

image

In this picture, I have typed 1 into the RX box, 2 into the RY box, and 3 into the RZ box. Immediately after pressing OK when typing 3 into RZ, all the numbers change to what you see in the picture. Not sure what it’s doing but this is the crux of the problem.

The script function “get_tcp_offset()” returns -0.6793 for the RX, but the method “getOffset().getRotation().getRX(Angle.Unit.RAD)” on a TCP object in Java returns what I originally typed: 1.

If I switch the units to just RPY in radians, both values match. So whatever is happening to convert it to a rotation vector is not being picked up by the .getRX() method.

The problem could be that a rotation vector is not unique, aka that there always is more then one rotation vector resulting in the same rotation.

So UR might simply decide which one of those it finds the prettiest and/or easiest to work with.