1#define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::UserWaypoint
2#define ARMARX_BOOST_TEST
4#include "../../../../../build/testing/RobotTrajectoryDesigner/Test.h"
6#include "../Util/OrientationConversion.h"
14 PoseBasePtr pose1 = PoseBasePtr(
new Pose());
16 std::vector<double> jointAngles = {1.0, 2.0, 3.0};
21 BOOST_CHECK_EQUAL(w1.
getIKSelection(), VirtualRobot::IKSolver::CartesianSelection::All);
26 BOOST_CHECK_EQUAL(w1.
getPose(), pose1);
54 BOOST_CHECK_THROW(w1.
setJointAngles(std::vector<double>()), InvalidArgumentException);
59 Vector3BasePtr pos1 = Vector3BasePtr(
new Vector3(1, 2, 3));
61 PoseBasePtr pose1 = PoseBasePtr(
new Pose(pos1, ori1));
63 Vector3BasePtr pos2 = Vector3BasePtr(
new Vector3(4, 5, 6));
65 PoseBasePtr pose2 = PoseBasePtr(
new Pose(pos2, ori2));
69 std::vector<double> jointAngles1 = {1.0, 2.0, 3.0};
70 std::vector<double> jointAngles2 = {4.0, 5.0, 6.0};
74 double optimalT2 = 10;
102 BOOST_CHECK_EQUAL(w2.
getPose(), pose2);
108 BOOST_CHECK_EQUAL(w1.
getPose(), pose1);
BOOST_AUTO_TEST_CASE(basicTest)
static QuaternionBasePtr toQuaternion(const double roll, const double pitch, const double yaw)
The UserWaypoint class represents a waypoint of the trajectory.
PoseBasePtr getPose()
Returns the PoseBasePtr of the UserWaypoint.
double getTimeOptimalTimestamp() const
Returns the timeOptimalTimestamp of the UserWaypoint which is calculate by the TrajectoryCalculation.
std::vector< double > getJointAngles() const
Returns the jointAngles of the UserWaypoint.
void setUserTimestamp(double value)
Set the new UserDuration and tests if its greater than timeOptimalTimestamp.
double getUserTimestamp() const
Returns the UserTimestamp.
void setJointAngles(const std::vector< double > &value)
Set the new JointAngles of the UserWaypoint.
void setTimeOptimalTimestamp(double value)
Set the time optimal timestamp of the UserWaypoint calculate by TrajectoryCalculation.
void setPose(const PoseBasePtr &value)
Set the new PoseBase of the UserWaypoint.
bool getIsTimeOptimalBreakpoint() const
Returns if the UserWaypoint is breakpoint.
IKSelection getIKSelection() const
Returns the VirtualRobot::IKSolver::CartesianSelection of the UserWaypoint.
void setIsTimeOptimalBreakpoint(bool value)
Set isTimeOptimalBreakpoint.
This file offers overloads of toIce() and fromIce() functions for STL container types.