| 8 | #define FLOAT_EPS 1.0e-6 |
| 9 | |
| 10 | TEST(GeometryUtilsDouble, Rotation) { |
| 11 | Vector3d v(0.1, 0.2, 0.3); |
| 12 | ASSERT_TRUE(v.isApprox(R_to_ypr(ypr_to_R(v)), DOUBLE_EPS)); |
| 13 | ASSERT_TRUE(v.isApprox(quaternion_to_ypr(ypr_to_quaternion(v)), DOUBLE_EPS)); |
| 14 | ASSERT_TRUE(v.isApprox(R_to_ypr(rotz(v(0)) * roty(v(1)) * rotx(v(2))), DOUBLE_EPS)); |
| 15 | |
| 16 | double yaw = 30.0; |
| 17 | ASSERT_DOUBLE_EQ(30.0, toDeg(get_yaw_from_quaternion(yaw_to_quaternion(toRad(yaw))))); |
| 18 | } |
| 19 | |
| 20 | TEST(GeometryUtilsFloat, Rotation) { |
| 21 | Vector3f v(0.1, 0.2, 0.3); |
nothing calls this directly
no test coverage detected