Roll pitch and yaw from Rotation matrix with Eigen Library

前端 未结 2 519
不知归路
不知归路 2021-02-15 11:57

I need to extract the roll pitch yaw angles from a rotation matrix and I want to be sure that what I do is correct.

    Eigen::Matrix< simFloat, 3, 1> rpy         


        
2条回答
  •  梦如初夏
    2021-02-15 12:35

    The answer by Shawn Le is correct but I think the line should be

    Vector3f ea = m.eulerAngles(2, 1, 0);
    

    Then ea will hold the yaw pitch and roll value in that order. ZYX euler angle rotation is equivalent to XYZ fixed axis rotation which is nothing but roll pitch and yaw.

提交回复
热议问题