Orientation of robot hand in Quaternion

Discussion in 'Support requests' started by Isaac, Sep 10, 2019.

  1. Hi,
    I have a robot and do FK and then use the Eigen library and convert the rotation matrix to quaternion. Here are the results:
    x-axis: red
    y-axis: green
    z-axis: up

    Screenshot from 2019-09-10 10-32-12.png

    the quaternion is [1,0,0,0] in this state.
    Then I rotate the hand to the following state:

    Screenshot from 2019-09-10 10-32-28.png

    and the quaternion is [0.7, 0.7, 0, 0]. The Z-direction of the world frame is toward up. Is it correct? I thought that I have to have some value in Z-direction. Maybe I'm wrong.
     
  2. I checked euler angles and quaternion for these two states and it was correct. The quaternion of rotation around z would be multiplied by initial quaternion in c++&eigen and the result would be the quaternion in the second state. So it seems that the current values are correct.
     
  3. Emo Todorov

    Emo Todorov Administrator Staff Member

    It is great when problems solves themselves :) Yes the world coordinate system has the Z axis pointing up - which is why default gravity is (0, 0, -9,81) You can also see it in the rendering of the world frame (and all other frames): red is X, green is Y, blue is Z.