1 #define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::OrientationConversionTest
2 #define ARMARX_BOOST_TEST
4 #include "../../../../../build/testing/RobotTrajectoryDesigner/Test.h"
6 #include "RobotTrajectoryDesigner/gui-plugins/RobotTrajectoryDesignerGuiPlugin/Interpolation/LinearInterpolation.h"
7 #include "RobotTrajectoryDesigner/gui-plugins/RobotTrajectoryDesignerGuiPlugin/Util/OrientationConversion.h"
12 using namespace boost::test_tools;
17 BOOST_REQUIRE_CLOSE(ori->qw, 0.878, 1);
18 BOOST_REQUIRE_CLOSE(ori->qx, 0.479, 1);
19 BOOST_REQUIRE_CLOSE(ori->qy, -0.0, 1);
20 BOOST_REQUIRE_CLOSE(ori->qz, 0, 1);
27 BOOST_REQUIRE_CLOSE_FRACTION(ori->qw, -0.369, 1);
28 BOOST_REQUIRE_CLOSE(ori->qx, 0.502, 1);
29 BOOST_REQUIRE_CLOSE(ori->qy, -0.718, 1);
30 BOOST_REQUIRE_CLOSE(ori->qz, -0.311, 1);
36 BOOST_REQUIRE_CLOSE(ori->qw, 0.223, 1);
37 BOOST_REQUIRE_CLOSE(ori->qx, 0.581, 1);
38 BOOST_REQUIRE_CLOSE(ori->qy, 0.127, 1);
39 BOOST_REQUIRE_CLOSE(ori->qz, 0.772, 1);
54 BOOST_REQUIRE_CLOSE(euler[0], 1.571, 1);
55 BOOST_REQUIRE_CLOSE(euler[1], 0, 1);
56 BOOST_REQUIRE_CLOSE(euler[2], 1.571, 1);
68 BOOST_REQUIRE_CLOSE(euler[0], -0.288, 1);
69 BOOST_REQUIRE_CLOSE(euler[1], -0.706, 1);
70 BOOST_REQUIRE_CLOSE(euler[2], 1.678, 1);
77 BOOST_REQUIRE_CLOSE(euler[0], 0.1, 1);
78 BOOST_REQUIRE_CLOSE(euler[1], 0.2, 1);
79 BOOST_REQUIRE_CLOSE(euler[2], 0.3, 1);