Go to the documentation of this file. 1 #define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::UserWaypoint
2 #define ARMARX_BOOST_TEST
5 #include <RobotComponents/Test.h>
7 #include "../UserWaypoint.h"
8 #include "../Util/OrientationConversion.h"
15 PoseBasePtr pose1 = PoseBasePtr(
new Pose());
22 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);
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.