20 #include <boost/test/unit_test.hpp>
21 #include <boost/utility/binary.hpp>
27 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
31 using namespace trajectories;
34 using namespace Eigen;
40 VectorXd zero = VectorXd::Zero(6);
42 TrajectoryBase *
traj =
new TrajectorySE3Constant(
"traj_se3",
M_ref);
43 BOOST_CHECK(
traj->has_trajectory_ended());
44 BOOST_CHECK(
traj->computeNext().getValue().isApprox(
M_vec));
50 BOOST_CHECK(
sample.getDerivative().isApprox(zero));
51 BOOST_CHECK(
sample.getSecondDerivative().isApprox(zero));
56 using namespace trajectories;
58 using namespace Eigen;
60 const unsigned int n = 5;
61 VectorXd
q_ref = VectorXd::Ones(
n);
62 VectorXd zero = VectorXd::Zero(
n);
63 TrajectoryBase *
traj =
new TrajectoryEuclidianConstant(
"traj_eucl",
q_ref);
65 BOOST_CHECK(
traj->has_trajectory_ended());
66 BOOST_CHECK(
traj->computeNext().getValue().isApprox(
q_ref));
72 BOOST_CHECK(
sample.getDerivative().isApprox(zero));
73 BOOST_CHECK(
sample.getSecondDerivative().isApprox(zero));
76 BOOST_AUTO_TEST_SUITE_END()