19 #include "tgCPGStringControl_mod.h"
28 tgCPGStringControl_mod::tgCPGStringControl_mod(
const double controlStep) :
31 if (m_controlStep < 0.0)
33 throw std::invalid_argument(
"Negative control step");
37 tgCPGStringControl_mod::~tgCPGStringControl_mod()
47 tgBasicActuator& m_sca = *(tgCast::cast<tgSpringCableActuator, tgBasicActuator>(subject));
54 if (m_nodeNumber == 2 || m_nodeNumber == 4 || m_nodeNumber == 5 || m_nodeNumber == 6 || m_nodeNumber == 7 || m_nodeNumber == 8)
56 m_commandedTension = motorControl().
control(m_sca,
m_controlTime, controlLength(), -getCPGValue());
60 m_commandedTension = motorControl().
control(m_sca,
m_controlTime, controlLength(), getCPGValue());
Contains the definition of class ImpedanceControl. $Id$.
virtual void moveMotors(double dt)
virtual void onStep(tgSpringCableActuator &subject, double dt)
Contains the definition of class tgBasicActuator.
const double m_controlStep
Definition of class CPGEquations.
double control(tgBasicController &mLocalController, double deltaTimeSeconds, double newPosition, double offsetVel=0)
Control Functions.