0
$\begingroup$

Say I have a quaternion q which describes how to get from frame 0 to frame 1, and a quaternion r which describes how to get from frame 0 to frame 2. To get the "quaternion difference" between q and r, I do

$$ q_{d} = q^{-1} r $$ This is however in frame 1. How do I get the quaternion difference in frame 0?

$\endgroup$
  • $\begingroup$ What does 'frame' mean here in this context? $\endgroup$ – Berci Dec 22 '13 at 21:57
  • $\begingroup$ say we have a world frame of reference, in this frame q represents a rotation around x of 90 degrees. So the quaternion rotation is frame specific. I guess this is what I meant to say. $\endgroup$ – user113514 Dec 22 '13 at 22:22
  • $\begingroup$ How do you mean '$q^{-1}r$ is in frame $1$ and not in frame 0'? Aren't all quaternions present in each frame? (I still don't clearly get what frames really want to be..) $\endgroup$ – Berci Dec 22 '13 at 22:52
  • $\begingroup$ Yes, but the same rotation looks different in different frames. So the quaternions corresponding to a rotation about world x would look like (w,x,y,z) [cos(t), sin(t), 0, 0]. But in an arbitrary frame the y and z components need not be 0. $\endgroup$ – user113514 Dec 23 '13 at 2:39
  • $\begingroup$ By frame, I meant coordinate frame [a set of three orthogonal axes]. I guess my question is given q and r defined in a coordinate frame, what coordinate frame is $q^{-1} r$ defined in? Is that clear? $\endgroup$ – user113514 Dec 25 '13 at 2:57
0
$\begingroup$

You are confusing quaternions with vectors in physical space. As the comments say, there is no such thing as having a quaternion "in" a certain frame anymore than there is such a thing as having a rotation matrix in a certain frame--both of these transform between frames and their components depend only on the relative rotation of the starting and ending frames. If $q:0\rightarrow 1$ and $r:0\rightarrow 2$ and my guess is you are looking for some third quaternion $p:1\rightarrow 2$ then since $r = pq$ you have $p = q^{-1}r = q^{*}r$ (since all rotations are unit quaternions). Note that for given $q$ and $r$ this is totally unambiguous since $q^{-1}r \neq rq^{-1}$ or any other weird permutation of $q$, $r$ and the inverse map: $q^{-1}r$ and only $q^{-1}r$ delivers the quaternion you are looking for.

Finally, to clarify some terminology, this is not the quaternion difference, which is perfectly well-defined using the Hamilton algebra (though useless for rotational analysis), but rather the relative rotation between frames 1 and 2. The same idea would hold were you to represent the rotations as matrices.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.