quaternion
Standard
NED To ENU
// Intrinsic rotations (Body-fixed, Local frame).
// Each rotation happens about the moving axes after the previous rotation.
// http://docs.ros.org/en/noetic/api/tf2/html/classtf2_1_1Quaternion.html#a668c459d4d837dda4169fc7320afe
tf2::Quaternion qRotFromEulerZYX;
qRotFromEulerZYX.setEuler(0, M_PI, -0.5 * M_PI); // params(x, y, z) Z-90 -> Y180 -> X0
// Extrinsic rotations (Fixed-axis, Global frame)
// Each rotation is applied around the original (absolute) coordinate system axes, which do not change.
// Set the quaternion using fixed axis RPY.
// http://docs.ros.org/en/noetic/api/tf2/html/classtf2_1_1Quaternion.html#a2ffba08e3fb4c10f9d5cbd6fc43399de
tf2::Quaternion qRotFromEulerRPY;
qRotFromEulerRPY.setRPY(0, M_PI, -0.5 * M_PI); // params(r, p, y) R0 -> P180 -> Y-90
0 comments:
張貼留言
留言