Roll pitch and yaw from Rotation matrix with Eigen Library

前端 未结 2 1349
南笙
南笙 2021-02-15 11:47

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:30

    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.

提交回复
热议问题