Quaternions
Hello everybody!
I need to write a little special program that will work offline and modify robtargets directly in program modules. To do this I need to convert Euler to quaternions and back. It would be good to look at some source code example about it in any programming language. If you have more quaternion operation examples: multiplication, normalization, etc  I will be very grateful for it too. May be you have some documentation about it as well.
I have seen some algorithms on Internet and I have tried a couple of them but I'm not sure that it works correctly.
My email is sergej.saibel@swerob.com
Thank you!
Sergej Saibel
Comments

Hello Saibel,
You can do this offline using QuickTeach. Create a routine that uses the EulerXYZ function to convert quaternions to Euler. Then convert Euler back to quaternions using the OrientXYZ function. Check Rapid Reference Manual for use.
Jim Proulx Rimrock Automation
0 
Hi Jim!
Thank you for your answer! The problem is that I should write a small separate program and I don't want to install QuickTeach at client machine.
I have found the way to convert this stuff and it works. Thanks to my university math teacher, she teached us multiply matrixes.
But now I try to find a way to calculate PoseMult RAPID instruction. Does anybody know how to do this? I guess I have to multiply quaternions and it will be my resulting orient. But how shall I multiply coordinates of the two pos? Is (x1*x2,y1*y2,z1*z2) the resulting pose?
Best regards,
Sergej Saibel0 
Hello everybody,
I'm develloping an application that receives Roll, Pitch, Yaw angles from a 3D digitizer, and converts that to Quaternions, then generates one path for the robot. It's a very simple application, but I canA't get to generate the correct values.javascript:AddSmileyIcon('')
When I use a straight tool, everything is perfect. But when I use a tool qith the Zaxis perpendicular to the wrist's Zaxis, everything goes crazy... javascript:AddSmileyIcon('')
Can anyone tell me what code is used in the S4 to calculate Quaternoins? Or if there is anything I should be aware of?
Thanks in advance,
Rui Santos0 
Categories
 All Categories
 5.5K RobotStudio
 389 UpFeed
 16 Tutorials
 12 RobotApps
 295 PowerPacs
 404 RobotStudio S4
 1.8K Developer Tools
 248 ScreenMaker
 2.7K Robot Controller
 295 IRC5
 52 OmniCore
 6 RCS (Realistic Controller Simulation)
 3 RobotStudio AR Viewer
 756 RAPID Programming
 16 Wizard Easy Programming
 105 Collaborative Robots
 3 Job listings