19 #include "tgCPGMGCableControl.h"
43 throw std::invalid_argument(
"Negative control step");
47 tgCPGMGCableControl::~tgCPGMGCableControl()
56 tgBasicActuator* basicAct = tgCast::cast<tgSpringCableActuator, tgBasicActuator>(&subject);
75 m_commandedTension = motorControl().
control(*m_PID, dt, controlLength(), getCPGValue());
79 tgBasicActuator* basicAct = tgCast::cast<tgSpringCableActuator, tgBasicActuator>(&subject);
80 m_commandedTension = motorControl().
control(*basicAct, dt, controlLength(), getCPGValue());
86 const double currentTension = subject.
getTension();
89 m_PID->
control(dt, m_commandedTension, currentTension);
93 tgBasicActuator* basicAct = tgCast::cast<tgSpringCableActuator, tgBasicActuator>(&subject);
102 assert(m_nodeNumber == -1);
104 m_pCPGSystem = &CPGSys;
106 std::vector<double> params (11);
107 params[0] = nodeParams[0][0];
108 params[1] = nodeParams[0][0];
109 params[2] = nodeParams[0][1];
110 params[3] = nodeParams[0][1];
115 params[7] = nodeParams[0][0];
116 params[8] = nodeParams[0][2];
117 params[9] = nodeParams[0][3];
118 params[10] = nodeParams[0][4];
120 m_nodeNumber = CPGSys.addNode(params);
Contains the definition of class ImpedanceControl. $Id$.
virtual void moveMotors(double dt)
virtual const double getTension() const
Utility class for class casting and filtering collections by type.
const double m_controlStep
virtual void onSetup(tgSpringCableActuator &subject)
virtual void control(double dt)
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
const tgControllable *const getControllable() const
Contains the definition of class tgBasicActuator.
virtual void onStep(tgSpringCableActuator &subject, double dt)
Definitions of class tgBulletSpringCableAnchor, formerly muscleAnchor.
Definition of class CPGEquations.
Definition of class CPGEquationsFB.
double control(tgBasicController &mLocalController, double deltaTimeSeconds, double newPosition, double offsetVel=0)
Control Functions.
Definition of the tgPIDController class.
void assignNodeNumberFB(CPGEquationsFB &CPGSys, array_2D nodeParams)