19 #include "tgCPGCableControl.h"
39 if (m_controlStep < 0.0)
41 throw std::invalid_argument(
"Negative control step");
45 tgCPGCableControl::~tgCPGCableControl()
57 assert(&subject == m_PID->getControllable());
62 if (m_controlTime >= m_controlStep)
65 m_commandedTension = motorControl().control(*m_PID, dt, controlLength(), getCPGValue());
71 const double currentTension = subject.
getTension();
72 m_PID->control(dt, m_commandedTension, currentTension);
79 assert(m_nodeNumber == -1);
81 m_pCPGSystem = &CPGSys;
83 std::vector<double> params (11);
84 params[0] = nodeParams[0][0];
85 params[1] = nodeParams[0][0];
86 params[2] = nodeParams[0][1];
87 params[3] = nodeParams[0][1];
92 params[7] = nodeParams[0][0];
93 params[8] = nodeParams[0][2];
94 params[9] = nodeParams[0][3];
95 params[10] = nodeParams[0][4];
97 m_nodeNumber = CPGSys.addNode(params);
Contains the definition of class ImpedanceControl. $Id$.
virtual const double getTension() const
virtual void onStep(tgSpringCableActuator &subject, double dt)
virtual void onSetup(tgSpringCableActuator &subject)
Utility class for class casting and filtering collections by type.
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
Definitions of class tgBulletSpringCableAnchor, formerly muscleAnchor.
Definition of class CPGEquations.
Definition of class CPGEquationsFB.
Definition of the tgPIDController class.
void assignNodeNumberFB(CPGEquationsFB &CPGSys, array_2D nodeParams)