Rotation Matrices - omega phi kappa vs yaw pitch roll
Mostrar comentarios más antiguos
Hello,
I have omega phi kappa and corresponding yaw (Z) pitch (Y) roll (X) measurements from a sensor.
Both are in degrees but I convert them to rads.
I try to do some tranformations for a photogrammetry project.
While using the yaw, pitch, roll values and the Robotics Toolbox function:
R_euler = eul2r(yaw_rad, pitch_rad, roll_rad)
the result of the transformation is as expected (visually)
However, I need to calculate the rotation matrix also based on the omega, phi, kappa values.
I use my own rotation matrix for (w,f,k) = (omega, phi, kappa) that I have used successfuly in the past for similar transformation problems:
R=[ cos(f)*cos(k) cos(w)*sin(k)+sin(w)*sin(f)*cos(k) sin(w)*sin(k)-cos(w)*sin(f)*cos(k)
-cos(f)*sin(k) cos(w)*cos(k)-sin(w)*sin(f)*sin(k) sin(w)*cos(k)+cos(w)*sin(f)*sin(k)
sin(f) -sin(w)*cos(f) cos(w)*cos(f)];
but I do not get the same result, and indeed it looks not as good. I tried various transformations, also using the inverted
R = R'
but it doesn't work.
I am wondering which transformation matrix is used in the Robotics Toolbox function, as I could not find anything in the documentation.
Just in case, I give you my exaple values in degrees:
omega phi kappa = 3.927820353,4.052795303,44.806238302
and corresponding
roll pitch yaw = -174.358491845,0.100258014,44.950203063
Any help? Thanks!
4 comentarios
Cris LaPierre
el 27 de Oct. de 2021
What robotics toolbox are you using? I don't believe MathWorks has a eul2r function. Perhaps you are using Peter Corke's robotics toolbox?
Bjorn Gustavsson
el 27 de Oct. de 2021
Typically when I implement 3-rotation-matrices the errors I make is messing up the order of rotations, or even the handeness of the rotation-angles (embarassing, I know.). Have you checked that those are definitely right?
Elisavet Konstantina Stathopoulou
el 27 de Oct. de 2021
Elisavet Konstantina Stathopoulou
el 27 de Oct. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Coordinate Transformations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!