1#define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::UserWaypoint
2#define ARMARX_BOOST_TEST
5#include <RobotComponents/Test.h>
8#include "../Util/OrientationConversion.h"
16 PoseBasePtr pose1 = PoseBasePtr(
new Pose());
18 std::vector<double> jointAngles = {1.0, 2.0, 3.0};
23 BOOST_CHECK_EQUAL(w1.
getIKSelection(), VirtualRobot::IKSolver::CartesianSelection::All);
28 BOOST_CHECK_EQUAL(w1.
getPose(), pose1);
56 BOOST_CHECK_THROW(w1.
setJointAngles(std::vector<double>()), InvalidArgumentException);
61 Vector3BasePtr pos1 = Vector3BasePtr(
new Vector3(1, 2, 3));
63 PoseBasePtr pose1 = PoseBasePtr(
new Pose(pos1, ori1));
65 Vector3BasePtr pos2 = Vector3BasePtr(
new Vector3(4, 5, 6));
67 PoseBasePtr pose2 = PoseBasePtr(
new Pose(pos2, ori2));
71 std::vector<double> jointAngles1 = {1.0, 2.0, 3.0};
72 std::vector<double> jointAngles2 = {4.0, 5.0, 6.0};
76 double optimalT2 = 10;
104 BOOST_CHECK_EQUAL(w2.
getPose(), pose2);
110 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.