MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/RACER / TEST

Function TEST

uav_simulator/Utils/uav_utils/src/uav_utils_test.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#define FLOAT_EPS 1.0e-6
9
10TEST(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
20TEST(GeometryUtilsFloat, Rotation) {
21 Vector3f v(0.1, 0.2, 0.3);

Callers

nothing calls this directly

Calls 15

quaternion_to_yprFunction · 0.85
ypr_to_quaternionFunction · 0.85
rotzFunction · 0.85
rotyFunction · 0.85
rotxFunction · 0.85
toDegFunction · 0.85
get_yaw_from_quaternionFunction · 0.85
yaw_to_quaternionFunction · 0.85
toRadFunction · 0.85
get_skew_symmetricFunction · 0.85
from_skew_symmetricFunction · 0.85
angle_addFunction · 0.85

Tested by

no test coverage detected