18 #include <dynamic-graph/entity.h> 19 #include <dynamic-graph/factory.h> 27 #define BOOST_TEST_MODULE debug - control - pd 29 #include <boost/test/output_test_stream.hpp> 30 #include <boost/test/unit_test.hpp> 34 aControlPD->
init(0.001);
35 std::istringstream Kpiss(
"[5](10.0,20.0,30.0,40.0,50.0)");
36 std::istringstream Kdiss(
"[5](0.10,0.20,0.30,0.40,0.50)");
39 std::istringstream posiss(
"[5](1.0,1.0,1.0,1.0,1.0)");
41 std::istringstream dposiss(
"[5](3.0,3.1,3.2,3.3,3.4)");
43 std::istringstream veliss(
"[5](0.0,0.0,0.0,0.0,0.0)");
45 std::istringstream dveliss(
"[5](1.5,1.4,1.3,1.2,1.1)");
52 boost::test_tools::output_test_stream output;
54 BOOST_CHECK(output.is_equal(
"20.15 42.28 66.39 92.48 120.55"));
57 boost::test_tools::output_test_stream output;
59 BOOST_CHECK(output.is_equal(
"2 2.1 2.2 2.3 2.4"));
62 boost::test_tools::output_test_stream output;
64 BOOST_CHECK(output.is_equal(
"1.5 1.4 1.3 1.2 1.1"));
SignalTimeDependent< dynamicgraph::Vector, int > velocityErrorSOUT
virtual void set(std::istringstream &value)
SignalPtr< dynamicgraph::Vector, int > KpSIN
BOOST_AUTO_TEST_CASE(control_pd)
SignalPtr< dynamicgraph::Vector, int > desiredvelocitySIN
SignalPtr< dynamicgraph::Vector, int > desiredpositionSIN
virtual void recompute(const Time &t)
void init(const double &step)
SignalPtr< dynamicgraph::Vector, int > velocitySIN
SignalPtr< dynamicgraph::Vector, int > KdSIN
SignalTimeDependent< dynamicgraph::Vector, int > controlSOUT
SignalTimeDependent< dynamicgraph::Vector, int > positionErrorSOUT
virtual void get(std::ostream &value) const
SignalPtr< dynamicgraph::Vector, int > positionSIN