mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-06 04:57:45 +08:00
Fix issue #44
This commit is contained in:
@@ -199,8 +199,8 @@ tf2::Quaternion rotationMatrixToQuaternion(const float rotation[9]) {
|
||||
Eigen::Matrix3f m;
|
||||
// We need to be careful about the order, as RS2 rotation matrix is
|
||||
// column-major, while Eigen::Matrix3f expects row-major.
|
||||
m << rotation[0], rotation[3], rotation[6], rotation[1], rotation[4], rotation[7], rotation[2],
|
||||
rotation[5], rotation[8];
|
||||
m << rotation[0], rotation[1], rotation[2], rotation[3], rotation[4], rotation[5], rotation[6],
|
||||
rotation[7], rotation[8];
|
||||
Eigen::Quaternionf q(m);
|
||||
return {q.x(), q.y(), q.z(), q.w()};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user