Example Quaternion to Euler angles and the order. I can not proceed without understanding it completely. Otherwise further development becomes a pain / nearly impossible.
TEST(quaterion_euler, yaw_to_quat) {
Pose p({0,0,0}, Vector3f{1,0,0});
Quaternionf expected(0.8775826, 0, 0, 0.4794255);
Quaternionf actual = p.rotation;
EXPECT_NEAR(expected.w(), actual.w(), 0.01);
cout << actual.w() << endl;
cout << actual.x() << endl;
cout << actual.y() << endl;
cout << actual.z() << endl;
// expect_eq({0,0,0}, p.rotationAsEuler());
}
Comments
Post a Comment