13 #include <CTraitsTest.h>
14 #include <gtest/gtest.h>
22 template class mrpt::CTraitsTest<CPose3DRotVec>;
43 <<
"pRVT : " << poseRVT << endl
44 <<
"newPoseRVT : " << newPoseRVT_1 << endl;
57 <<
"pRVT : " << poseRVT << endl
58 <<
"newPoseRVT : " << newPoseRVT_2 << endl;
73 for (
size_t i=0;i<4;i++)
74 for (
size_t j=0;j<4;j++)
75 EXPECT_NEAR(HM(i,j), i==j ? 1.0 : 0.0, 1e-8 )
76 <<
"Failed for (i,j)=" << i <<
"," << j << endl
77 <<
"Matrix is: " << endl << HM << endl
78 <<
"case was: " << label << endl;
83 double x1,
double y1,
double z1,
double yaw1,
double pitch1,
84 double roll1,
double x2,
double y2,
double z2,
double yaw2,
85 double pitch2,
double roll2)
109 p1.getHomogeneousMatrix(M1);
110 p2.getHomogeneousMatrix(M2);
122 <<
"p1 : " << p1 << endl
123 <<
"p2 : " << p2 << endl
124 <<
"p1_c_p2_i_p2: " << p1_c_p2_i_p2 << endl;
132 <<
"p1 : " << p1 << endl
133 <<
"p2 : " << p2 << endl
134 <<
"p2 matrix : " << endl
136 <<
"p1_i_p2 : " << p1_i_p2 << endl
137 <<
"p1_i_p2 matrix: " << endl
139 <<
"p2_c_p1_i_p2: " << p2_c_p1_i_p2 << endl;
147 <<
"p3 : " << p3 << endl
148 <<
"p1_c_p2 : " << p1_c_p2 << endl;
157 test_default_values(
p,
"Default");
165 EXPECT_NEAR(
p.m_coords[0], 1, 1e-7);
166 EXPECT_NEAR(
p.m_coords[1], 2, 1e-7);
167 EXPECT_NEAR(
p.m_coords[2], 3, 1e-7);
168 EXPECT_NEAR(
p.m_rotvec[0], 0.2, 1e-7);
169 EXPECT_NEAR(
p.m_rotvec[1], 0.3, 1e-7);
170 EXPECT_NEAR(
p.m_rotvec[2], 0.4, 1e-7);