Open imrasp opened 6 years ago
Beside Eigens eulerAngles() method, you can also use the matrixToYawPitchRoll() method:
float yaw,pitch,roll; boost::tie(yaw,pitch,roll) = matrixToYawPitchRoll(R);
All available conversions are:
Yaw,Pitch,Roll --> Quaterion: Eigen::Quaternionf q = quaternionFromYawPitchRoll(yaw,pitch,roll); Quaterion --> Yaw,Pitch,Roll: boost::tie(yaw,pitch,roll) = quaternionToYawPitchRoll(q); Yaw,Pitch,Roll --> Rotation matrix: Eigen::Matrix3f R = matrixFromYawPitchRoll(yaw,pitch,roll); Rotation matrix --> Yaw,Pitch,Roll: boost::tie(yaw,pitch,roll) = matrixToYawPitchRoll(R);
http://www.mira-project.org/osqa/questions/50/how-do-i-extract-yawpitch-and-roll-out-of-a-rotation-matrix
Beside Eigens eulerAngles() method, you can also use the matrixToYawPitchRoll() method:
include <math/YawPitchRoll.h>
float yaw,pitch,roll; boost::tie(yaw,pitch,roll) = matrixToYawPitchRoll(R);
All available conversions are:
http://www.mira-project.org/osqa/questions/50/how-do-i-extract-yawpitch-and-roll-out-of-a-rotation-matrix