Skip to content

Wrong Euler angles from quaternions?

Euler angles are always a source of headaches. I've found what I think is a bug in their calculation. I've attached a file that I think shows conclusively the issue - the only thing I'm not 100% sure about is if I'm missing some convention (e.g. active vs. passive rotations), but I've tried fiddling a bit to check and I don't think that's it either.

Here is the testing script. It makes use of Sympy too to reconstruct the correct rotation matrix to make sure there's no errors there: euler_bug.py

Edited by Simone Sturniolo