Relative rotation between quaternions












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?










share|cite|improve this question









$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$


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?










share|cite|improve this question









$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












0








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?










share|cite|improve this question









$endgroup$




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?







quaternions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 22 '13 at 21:31









user113514user113514

13




13












  • $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




















  • $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


















$begingroup$
What does 'frame' mean here in this context?
$endgroup$
– Berci
Dec 22 '13 at 21:57




$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$
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$
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$
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






$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












1 Answer
1






active

oldest

votes


















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:0rightarrow 1$ and $r:0rightarrow 2$ and my guess is you are looking for some third quaternion $p:1rightarrow 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.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f615891%2frelative-rotation-between-quaternions%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    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:0rightarrow 1$ and $r:0rightarrow 2$ and my guess is you are looking for some third quaternion $p:1rightarrow 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.






    share|cite|improve this answer









    $endgroup$


















      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:0rightarrow 1$ and $r:0rightarrow 2$ and my guess is you are looking for some third quaternion $p:1rightarrow 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.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        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:0rightarrow 1$ and $r:0rightarrow 2$ and my guess is you are looking for some third quaternion $p:1rightarrow 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.






        share|cite|improve this answer









        $endgroup$



        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:0rightarrow 1$ and $r:0rightarrow 2$ and my guess is you are looking for some third quaternion $p:1rightarrow 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.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jun 4 '16 at 1:27









        SZNSZN

        2,708720




        2,708720






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f615891%2frelative-rotation-between-quaternions%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            File:DeusFollowingSea.jpg