1 #include <gtest/gtest.h> 11 q.
setRPY(roll, pitch, yaw);
25 ASSERT_GT(out_tv.transform.getOrigin().x(), 0);
26 ASSERT_LT(out_tv.transform.getOrigin().x(), 0.1);
29 ASSERT_LT(out_tv.variance, 0.3);
30 ASSERT_GT(out_tv.variance, 0);
43 ASSERT_GT(out_tv.transform.getRotation().getAngle(), 0);
44 ASSERT_LT(out_tv.transform.getRotation().getAngle(), 0.1);
47 ASSERT_LT(out_tv.variance, 0.3);
48 ASSERT_GT(out_tv.variance, 0);
61 ASSERT_DOUBLE_EQ(out_tv.transform.getOrigin().x(), 0);
64 ASSERT_LT(out_tv.variance, 0.3);
65 ASSERT_GT(out_tv.variance, 0);
68 for (
int i = 0; i < 10000; ++i) {
71 ASSERT_DOUBLE_EQ(out_tv.transform.getOrigin().x(), 0);
74 ASSERT_LT(out_tv.variance, 0.3);
75 ASSERT_GT(out_tv.variance, 1e-9);
95 ASSERT_GT(out_tv.transform.getOrigin().x(), 0);
96 ASSERT_LT(out_tv.transform.getOrigin().x(), 1.0);
97 ASSERT_GT(out_tv.transform.getRotation().getAngle(), 0);
98 ASSERT_LT(out_tv.transform.getRotation().getAngle(), 1.0);
101 ASSERT_LT(out_tv.variance, 1.0);
102 ASSERT_GT(out_tv.variance, 0);
105 ASSERT_NEAR(out_tv.transform.getOrigin().x(), 0.1, 0.05);
106 ASSERT_NEAR(out_tv.transform.getRotation().getAngle(), 0, 0.1);
119 ASSERT_GT(out_tv.transform.getOrigin().x(), 0);
120 ASSERT_LT(out_tv.transform.getOrigin().x(), 1.0);
121 ASSERT_GT(out_tv.transform.getRotation().getAngle(), 0);
122 ASSERT_LT(out_tv.transform.getRotation().getAngle(), 1.0);
125 ASSERT_GT(out_tv.variance, 0.2);
129 ::testing::InitGoogleTest(&argc, argv);
130 return RUN_ALL_TESTS();
void setRPY(const tf2Scalar &roll, const tf2Scalar &pitch, const tf2Scalar &yaw)