test_simpleseqplay.cc
Go to the documentation of this file.
1 #define BOOST_TEST_MODULE simpleseqplay
2 #include <boost/test/output_test_stream.hpp>
3 #include <boost/test/unit_test.hpp>
4 #include <boost/utility/binary.hpp>
5 
7 
8 namespace dg = dynamicgraph;
9 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
10 
11 BOOST_AUTO_TEST_CASE(test_simpleseqplay) {
12  dg::sot::tools::SimpleSeqPlay aSimpleSeqPlay("simpleseqplay");
13 
14  dg::Vector initial(32);
15  initial << 0.0, 0.0, -0.411354, 0.859395, -0.448041, -0.001708, 0.0, 0.0,
16  -0.411354, 0.859395, -0.448041, -0.001708, 0.0, 0.006761, 0.25847,
17  0.173046, -0.0002, -0.525366, 0.0, -0.0, 0.1, -0.005, -0.25847, -0.173046,
18  0.0002, -0.525366, 0.0, 0.0, 0.1, -0.005, 0.0, 0.0;
19  aSimpleSeqPlay.currentPostureSIN_.setConstant(initial);
20 
21  BOOST_CHECK(aSimpleSeqPlay.waiting());
22 
23  aSimpleSeqPlay.load(DATA_DIRECTORY "/test");
24  aSimpleSeqPlay.start();
25  BOOST_CHECK(aSimpleSeqPlay.initializing());
26 
27  for (int i = 0; i < 6200; i++) {
28  aSimpleSeqPlay.currentPostureSIN_.setTime(i);
29 
31  aSimpleSeqPlay.postureSOUT_.recompute(i);
32  pos = aSimpleSeqPlay.postureSOUT_.accessCopy();
33  BOOST_CHECK_EQUAL(initial.size(), pos.size());
34 
35  BOOST_CHECK(i == 6199 || aSimpleSeqPlay.executing());
36  }
37  BOOST_CHECK(aSimpleSeqPlay.finished());
38 }
39 
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END() MatrixHomogeneous randomM()
dynamicgraph
i
int i
BOOST_TEST_MODULE
#define BOOST_TEST_MODULE
Definition: test_simpleseqplay.cc:1
simpleseqplay.hh
pos
pos
dynamicgraph::Vector
Eigen::VectorXd Vector
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(test_simpleseqplay)
Definition: test_simpleseqplay.cc:11


sot-tools
Author(s): Mehdi Benallegue, Francois Keith, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Jorrit T'Hooft
autogenerated on Wed Aug 2 2023 02:35:13