Go to the documentation of this file. 1 #define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::UserWaypoint
2 #define ARMARX_BOOST_TEST
4 #include "../../../../../build/testing/RobotTrajectoryDesigner/Test.h"
5 #include "../UserWaypoint.h"
6 #include "../Util/OrientationConversion.h"
13 PoseBasePtr pose1 = PoseBasePtr(
new Pose());
20 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);
double getUserTimestamp() const
Returns the UserTimestamp.
void setUserTimestamp(double value)
Set the new UserDuration and tests if its greater than timeOptimalTimestamp.
The UserWaypoint class represents a waypoint of the trajectory.
double getTimeOptimalTimestamp() const
Returns the timeOptimalTimestamp of the UserWaypoint which is calculate by the TrajectoryCalculation.
void setTimeOptimalTimestamp(double value)
Set the time optimal timestamp of the UserWaypoint calculate by TrajectoryCalculation.
bool getIsTimeOptimalBreakpoint() const
Returns if the UserWaypoint is breakpoint.
void setIsTimeOptimalBreakpoint(bool value)
Set isTimeOptimalBreakpoint.
BOOST_AUTO_TEST_CASE(basicTest)
std::vector< double > getJointAngles() const
Returns the jointAngles of the UserWaypoint.
void setJointAngles(const std::vector< double > &value)
Set the new JointAngles of the UserWaypoint.
static QuaternionBasePtr toQuaternion(const double roll, const double pitch, const double yaw)
IKSelection getIKSelection() const
Returns the VirtualRobot::IKSolver::CartesianSelection of the UserWaypoint.
const KinematicUnitDatafieldCreator jointAngles("jointAngles")
PoseBasePtr getPose()
Returns the PoseBasePtr of the UserWaypoint.
This file offers overloads of toIce() and fromIce() functions for STL container types.
void setPose(const PoseBasePtr &value)
Set the new PoseBase of the UserWaypoint.