1 #include <gtest/gtest.h> 12 timeval temp_time_struct;
13 gettimeofday(&temp_time_struct,NULL);
14 srand(temp_time_struct.tv_usec);
23 double truex, truey, trueyaw1, trueyaw2;
37 double yaw, pitch, roll;
41 tf::Vector3(1.0330764266905630, 5.2545257423922198, -0.000)),
42 ts0,
"odom",
"other0"), 3);
45 tf::Vector3(1.5766646418987809, 5.1177550046707436, -0.000)),
46 ts1,
"odom",
"other1"), 3);
49 tf::Vector3(2.1029791754869160, 4.9249128183465967, -0.000)),
50 ts2,
"odom",
"other2"), 3);
57 res.
getBasis().getEulerZYX(yaw,pitch,roll);
61 EXPECT_NEAR(yaw, trueyaw1, epsilon);
65 res.
getBasis().getEulerZYX(yaw,pitch,roll);
69 EXPECT_NEAR(yaw, trueyaw2, epsilon);
73 res.
getBasis().getEulerZYX(yaw,pitch,roll);
77 EXPECT_NEAR(yaw, trueyaw2, epsilon);
84 int main(
int argc,
char **argv){
85 testing::InitGoogleTest(&argc, argv);
86 return RUN_ALL_TESTS();
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
void interpolate(const TransformStorage &one, const TransformStorage &two, ros::Time time, TransformStorage &output)
A class to keep a sorted linked list in time This builds and maintains a list of timestamped data...
TFSIMD_FORCE_INLINE const tfScalar & x() const
Return the x value.
TEST(tf, SignFlipExtrapolate)
TFSIMD_FORCE_INLINE const tfScalar & y() const
Return the y value.
int main(int argc, char **argv)
Vector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-byte...