17 #include <dynamic-graph/entity.h> 18 #include <dynamic-graph/factory.h> 26 #define BOOST_TEST_MODULE debug - control - admittance 28 #include <boost/test/output_test_stream.hpp> 29 #include <boost/test/unit_test.hpp> 35 std::istringstream Kp(
"[6](10.0,10.0,10.0,10.0,10.0,10.0)");
36 std::istringstream Kd(
"[6](0.0,0.0,0.0,0.0,0.0,0.0)");
37 aControlAdm->m_KpSIN.set(Kp);
38 aControlAdm->m_KdSIN.set(Kd);
39 std::istringstream dqSaturation(
"[6](10.0,10.0,10.0,10.0,10.0,10.0)");
40 aControlAdm->m_dqSaturationSIN.set(dqSaturation);
41 std::istringstream w_forceDes(
"[6](100.0,0.0,0.0,0.0,0.0,0.0)");
42 aControlAdm->m_w_forceDesSIN.set(w_forceDes);
43 std::istringstream force(
"[6](10.0,0.0,10.0,0.0,0.0,0.0)");
44 aControlAdm->m_forceSIN.set(force);
46 opPose.translation() << 0.3, 0.0, 0.0;
47 opPose.linear() << 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0;
48 aControlAdm->m_opPoseSIN = opPose;
50 sensorPose.translation() << 0.3, 0.0, 0.0;
51 sensorPose.linear() << 0.0, 0.0, -1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0;
52 aControlAdm->m_sensorPoseSIN = sensorPose;
53 aControlAdm->
init(0.001);
55 aControlAdm->m_dqSOUT.recompute(0);
58 expected << 1.1, 0.0, -0.109, 0.0, 0.03, 0.0;
59 BOOST_CHECK(aControlAdm->m_dqSOUT(0).isApprox(expected));
Admittance controller for an operational point wrt to a force sensor. It can be a point of the model ...
Eigen::Transform< double, 3, Eigen::Affine > MatrixHomogeneous
void init(const double &dt)
Initialize the entity.
BOOST_AUTO_TEST_CASE(control_admittance)