1 #define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::Transition
2 #define ARMARX_BOOST_TEST
4 #include "../../../../../build/testing/RobotTrajectoryDesigner/Test.h"
5 #include "../Transition.h"
6 #include "../Util/OrientationConversion.h"
12 Vector3BasePtr pos1 = Vector3BasePtr(
new Vector3(1, 2, 3));
14 PoseBasePtr pose1 = PoseBasePtr(
new Pose(pos1, ori1));
16 Vector3BasePtr pos2 = Vector3BasePtr(
new Vector3(4, 5, 6));
18 PoseBasePtr pose2 = PoseBasePtr(
new Pose(pos2, ori2));
26 BOOST_CHECK_EQUAL(t1.
getStart(), w1);
27 BOOST_CHECK_EQUAL(t1.
getEnd(), w2);
50 Vector3BasePtr pos1 = Vector3BasePtr(
new Vector3(1, 2, 3));
52 PoseBasePtr pose1 = PoseBasePtr(
new Pose(pos1, ori1));
54 Vector3BasePtr pos2 = Vector3BasePtr(
new Vector3(4, 5, 6));
56 PoseBasePtr pose2 = PoseBasePtr(
new Pose(pos2, ori2));
61 Vector3BasePtr pos3 = Vector3BasePtr(
new Vector3(7, 8, 9));
63 PoseBasePtr pose3 = PoseBasePtr(
new Pose(pos3, ori3));
65 Vector3BasePtr pos4 = Vector3BasePtr(
new Vector3(10, 11, 12));
67 PoseBasePtr pose4 = PoseBasePtr(
new Pose(pos4, ori4));
77 t1.
getStart()->setTimeOptimalTimestamp(1);
79 t1.
getEnd()->setTimeOptimalTimestamp(10);
80 t1.
getEnd()->setUserTimestamp(20);
86 BOOST_CHECK_EQUAL(t2.
getStart()->getUserTimestamp(), 2);
87 BOOST_CHECK_EQUAL(t2.
getStart()->getTimeOptimalTimestamp(), 1);
88 BOOST_CHECK_EQUAL(t2.
getEnd()->getUserTimestamp(), 20);
89 BOOST_CHECK_EQUAL(t2.
getEnd()->getTimeOptimalTimestamp(), 10);
94 t1.
getStart()->setTimeOptimalTimestamp(3);
96 t1.
getEnd()->setTimeOptimalTimestamp(30);
97 t1.
getEnd()->setUserTimestamp(40);
101 BOOST_CHECK_EQUAL(t2.
getStart()->getUserTimestamp(), 2);
102 BOOST_CHECK_EQUAL(t2.
getStart()->getTimeOptimalTimestamp(), 1);
103 BOOST_CHECK_EQUAL(t2.
getEnd()->getUserTimestamp(), 20);
104 BOOST_CHECK_EQUAL(t2.
getEnd()->getTimeOptimalTimestamp(), 10);
109 BOOST_CHECK_EQUAL(t1.
getStart()->getUserTimestamp(), 4);
110 BOOST_CHECK_EQUAL(t1.
getStart()->getTimeOptimalTimestamp(), 3);
111 BOOST_CHECK_EQUAL(t1.
getEnd()->getUserTimestamp(), 40);
112 BOOST_CHECK_EQUAL(t1.
getEnd()->getTimeOptimalTimestamp(), 30);