TimedTrajectoryFactoryTest.cpp
Go to the documentation of this file.
1 #define BOOST_TEST_MODULE ArmarX::RobotTrajectoryDesigner::TimedTrajectoryFactory
2 #define ARMARX_BOOST_TEST
3 
4 #include "../../../../../build/testing/RobotTrajectoryDesigner/Test.h"
5 #include "../Environment.h"
6 #include "../TimedTrajectoryFactory.h"
7 #include "../PathFactory.h"
8 using namespace armarx;
9 
10 //Check if the trajectory contained in the returned timedtrajectory is correct
11 BOOST_AUTO_TEST_CASE(CorrectTrajectoryTest)
12 {
13  BOOST_CHECK_EQUAL(1, 1);/*
14  VirtualRobot::RobotNodeSetPtr rns = Environment::getRobot()->getRobotNodeSets()[0];
15  std::vector<std::vector<double>> data;
16  for(unsigned int i = 0; i < 10; i++){
17  std::vector<double> nodeData;
18  for(unsigned int j = 0; j < rns->getAllRobotNodes().size(); j++){
19  nodeData.push_back(i);
20  }
21  data.push_back(nodeData);
22  }
23  VirtualRobot::Path p = PathFactory::createPath(data, 0.0);
24  Eigen::VectorXd maxVelocity;
25  Eigen::VectorXd maxAcceleration;
26  VirtualRobot::TimeOptimalTrajectory t = VirtualRobot::TimeOptimalTrajectory(p, maxVelocity, maxAcceleration, 0.001);
27  TimedTrajectory trajectory = TimedTrajectoryFactory::createTimedTrajectory(t, data, rns, 0.0);*/
28 }
29 /*
30 //Check if the userPoints contained in the returned timedtrajectory are correct
31 BOOST_AUTO_TEST_CASE(CorrectUserPointsTest){
32 
33 }
34 
35 //Check if the userPoints contained in the returned timedtrajectory fit to the trajectory itself
36 BOOST_AUTO_TEST_CASE(CorrectMappingTest){
37 
38 }
39 */
40 //Check if an incorrect rns leads to the correct exception
41 /*
42 BOOST_AUTO_TEST_CASE(IncorrectRobotNodeSetTest)
43 {
44  //Set robot for testing purposes.
45  if (Environment::getRobot() == NULL)
46  {
47  return;
48  }
49  std::vector<VirtualRobot::RobotNodePtr> nodes = Environment::getRobot()->getRobotNodes();
50  VirtualRobot::RobotNodeSetPtr rns = VirtualRobot::RobotNodeSet::createRobotNodeSet(
51  Environment::getRobot(), "Incorrect RobotNodeSet", nodes,
52  VirtualRobot::RobotNodePtr(), VirtualRobot::RobotNodePtr(), false);
53  std::vector<std::vector<double>> data;
54  /*
55  for(unsigned int i = 0; i < 10; i++){
56  std::vector<double> nodeData;
57  for(unsigned int j = 0; j < rns->getAllRobotNodes().size(); j++){
58  nodeData.push_back(i);
59  }
60  data.push_back(nodeData);
61  }*/
62 /*
63  VirtualRobot::Path p = PathFactory::createPath(data, 0.0);
64  Eigen::VectorXd maxVelocity;
65  Eigen::VectorXd maxAcceleration;
66  VirtualRobot::TimeOptimalTrajectory t = VirtualRobot::TimeOptimalTrajectory(p, maxVelocity, maxAcceleration, 0.001);
67  BOOST_CHECK_THROW(TimedTrajectoryFactory::createTimedTrajectory(t, data, rns, 0.0), NotImplementedYetException);
68 
69 }
70 */
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(CorrectTrajectoryTest)
Definition: TimedTrajectoryFactoryTest.cpp:11
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28