Conjugate of quaternion doesn’t give expected result

orientationquaternionsrotations

I'm using this site to play with quaternions.
All of my quaternions are unit quaternions.

I find quaternion of some Euler Angles(x, y, z) by using the website -inputs are degree and ZYX order Euler- and then by inputting the conjugate of the founded quaternion, I expect to see Conjugate of my Euler Angles (-x, -y, -z)

My flow is:

Euler(Input) => Quaternion(Result) => Conjugate of the Quaternion(Input) 
=> Euler Conjugate (Which is original Euler multiplied by -1)(Result)

In Degree and ZYX format, I input values

x = 70
y = 30
z = 0

And resulting quaternion is

[x, y, z, w(scalar)]
[ 0.5540323, 0.2120121, -0.1484525, 0.7912401 ]

When I input conjugate of this quaternion, which is vector parts multiplied by -1:

[ -0.5540323, -0.2120121, 0.1484525, 0.7912401 ]

Resulting Euler angles as (Z Y X) are:

[ x: -72.5047593, y: -9.8465479, z: 28.4812339 ]

Which is not related to my first angles (70, 30, 0). Shouldn't the conjugate of a quaternion give results of Euler angles multiplied by -1, (-70, -30, 0)

I tested the result of (-70, -30, 0) degrees and the resulting quaternion is

[ -0.5540323, -0.2120121, -0.1484525, 0.7912401 ]

Which has x and y components multiplied by -1, but z component is preserved. What is the point I'm missing in this problem?

Best Answer

You're missing two things. First, the conjugate quaternion should give you the inverse rotation, that is, a rotation that undoes your original Euler-angle rotation. The inverse rotation is not obtained just by changing the signs of the Euler angles. You can invert a rotation by reversing the rotation around each individual axis, but only if you apply it to the axes in reverse order. Merely changing the three angles in your set of Euler angles, you are claiming you can apply the rotations to the axes in the same order as before, which does not work in general.

Second, Euler-angle representations are not unique. You could input a set of angles, get a quaternion, and then try converting that quaternion back to Euler angles; you are not guaranteed to get the same Euler angles back even in that case, where you are dealing with only one rotation. For example, this answer deals with one particular interpretation of Euler angles and one particular set of conversion functions to and from quaternions, where the second set of Euler angles will be different from the first if the $y$-axis rotation in the original Euler angles was greater than a right angle.