Calculate quaternions
Stijn
✭
in RobotStudio
Hi,
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#)
Can someone help me with this problem ?
myTarget.Transform.RX = 0;
myTarget.Transform.RY = 0.86;
myTarget.Transform.RZ = 0;
0
Comments
-
Hi,
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.
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
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 ?
myTarget.Transform.RX = 50;
myTarget.Transform.RY = 60;
myTarget.Transform.RZ = 110;
0 -
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).
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
Hi,Thanks for your help! It works like you said.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 ?Regards,0
-
HiThis may give you some hints regarding how to modify configuration data
Per Svensson
Robotics and Vision Specialist
Consat Engineering0 -
alternatively you can turn confl or confj off in the robot. But you then have to be carefull that you dont force the robot to a strange configuration.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings