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

Rotation Vectors Not Matching UR's Rotation Vectors

#1
I am using the C# API, and am stopped dead in my tracks right now because the Cartesian positions I pull from the API do not match what I see in the GUI. I am currently using a UR20, and can get the correct joint positions, X, Y, and Z positions, but I can't get the right RX, RY, and RZ positions. I see Cartesian values of (190.4mm, -959.2mm, 531.5mm, 0.974deg, 180deg, 0deg) in the "Tool Frame with respect to Reference Frame" section in the GUI when set to UR Degrees, but when I try to pull them I get the Staubli/Mecademic values of (190.4mm, -959.2mm, 531.5mm, -180deg, 0deg, -179.38deg) both in my code I wrote and the RoboDK C# API example.

I tried using the functions .ToUR() (190.4mm, -959.2mm, 531.5mm, -19.76deg, 182.60deg, 0deg)
and .ToXYZRPW() (190.4mm, -959.2mm, 531.5mm, 180deg, 0deg, 179.38deg)
on the Staubli/Mecademic pose I pull off to no avail.

Is there something I'm doing wrong in either the setup in my RoboDK file, or missing a command in the API?

Thanks for the help, and let me know if I need to send anything else.
#2
Good point, the math used to calculate poses from/to XYZUVW in UR format was not correct in the C# API as it was using Euler angles instead of the UVW rotation vector. We just updated the C# API to have the correct math (matching the Python API math).

It should work now, let us know if you still have issues.
#3
(03-05-2024, 05:45 PM)Albert Wrote: Good point, the math used to calculate poses from/to XYZUVW in UR format was not correct in the C# API as it was using Euler angles instead of the UVW rotation vector. We just updated the C# API to have the correct math (matching the Python API math).

It should work now, let us know if you still have issues.

Thanks a bunch! I'm very new to robotics, so I want to make sure I have this correct - I called the ToUR() function on the given pose and converted the radians to degrees, but they still weren't right as I got .618deg (RX, actual=0.974deg) and 114.586deg (RY, actual=179.997deg). Out of curiosity I checked them against the expected answers and got they were both off by a factor of PI/2, so I "corrected" them and got the right rotation vectors. Is this how the function is intended to perform?
#4
Thank you for your feedback. Those functions use or require the angle data to be in radians. The C# functions should match the result you obtain from the Python API.

Did you convert them to degrees by multiplying by 180 and dividing by pi/2 ?
If not, how did you convert them to degrees?
  




Users browsing this thread:
1 Guest(s)