2 #include <gtest/gtest.h> 7 TEST(RotationTests, rotationsOK)
12 EXPECT_EQ(one_radian_axis_x1.
UnitX(), one_radian_axis_x2.
UnitX());
13 EXPECT_EQ(one_radian_axis_x1.
UnitY(), one_radian_axis_x2.
UnitY());
14 EXPECT_EQ(one_radian_axis_x1.
UnitZ(), one_radian_axis_x2.
UnitZ());
19 EXPECT_EQ(neg_radian_axis_x1.UnitX(), neg_radian_axis_x2.
UnitX());
20 EXPECT_EQ(neg_radian_axis_x1.UnitY(), neg_radian_axis_x2.
UnitY());
21 EXPECT_EQ(neg_radian_axis_x1.UnitZ(), neg_radian_axis_x2.
UnitZ());
26 EXPECT_EQ(one_radian_axis_z1.UnitX(), one_radian_axis_z2.
UnitX());
27 EXPECT_EQ(one_radian_axis_z1.UnitY(), one_radian_axis_z2.
UnitY());
28 EXPECT_EQ(one_radian_axis_z1.UnitZ(), one_radian_axis_z2.
UnitZ());
32 EXPECT_DOUBLE_EQ(1.0, x);
33 EXPECT_DOUBLE_EQ(0.0, y);
34 EXPECT_DOUBLE_EQ(0.0, z);
37 EXPECT_DOUBLE_EQ(-1.0, x);
38 EXPECT_DOUBLE_EQ(0.0, y);
39 EXPECT_DOUBLE_EQ(0.0, z);
42 EXPECT_DOUBLE_EQ(0.0, x);
43 EXPECT_DOUBLE_EQ(0.0, y);
44 EXPECT_DOUBLE_EQ(1.0, z);
47 int main(
int argc,
char** argv)
49 testing::InitGoogleTest(&argc, argv);
50 return RUN_ALL_TESTS();
TEST(RotationTests, rotationsOK)
TFSIMD_FORCE_INLINE const tfScalar & y() const
static Rotation RPY(double roll, double pitch, double yaw)
TFSIMD_FORCE_INLINE const tfScalar & x() const
void axis_magnitude_from_rotation(const KDL::Rotation &r, double &x, double &y, double &z)
Converts from KDL::Rotation to angle-axis-with-integrated-magnitude.
KDL::Rotation rotation_from_axis_magnitude(const double x, const double y, const double z)
Converts our angle-axis-with-integrated-magnitude representation to a KDL::Rotation.
TFSIMD_FORCE_INLINE const tfScalar & z() const
int main(int argc, char **argv)