Does anyone know how the quaternions are calculated in robotstudio ?
Because if I use the code below to add the quaternions (to make a new target), the values that I gave (0,0.86,0) aren’t the same of the quaternions of my new target.
I just have to give the quaternions a value that I can choose.
Where can I find functions that calculate euler angles to quaternions ? (C#)
RX/RY/RZ aren’t quaternions, they are Euler angles. The Matrix4 class contains methods and properties for setting and getting the orientation in various formats.
Ok I can use this function, cause I have to use euler angles.
Can you give me an example how I should convert this euler angles to correct quaternions, cause I’m not very familiar with these functions.
If I use the code below the euler angles are incorrect converted to quaternions.
(As you can see in the convertor and in the new targets in robotstudio.)
How can I solve this problem ?
RobotStudio uses the ZYX convention for Euler angles (in the GUI; the API also supports XYZ). So I think you need to change the “Rotation Order” in the converter (to 321 probably).
My only problem now is that my axes configuration as you can see in the image below is incorrect. Target_10 (1) is just the same as My_target_8 (2) but the axes configuration is not the same.
How can I automatically change these axes configuration in C# ?
Can you give me an example ?