38 tgBaseCPGNode::tgBaseCPGNode() :
39 m_pMotorControl(NULL),
45 tgBaseCPGNode::~tgBaseCPGNode()
47 delete m_pMotorControl;
54 if (m_nodeNumber == -1)
56 throw std::runtime_error(
"Not yet initialized");
60 m_pMotorControl = &ipc;
64 double tgBaseCPGNode::getCPGValue()
const
66 double cpgValue = 0.0;
67 if (m_pCPGSystem == NULL)
69 throw std::runtime_error(
"CPG not initialized!");
73 cpgValue = (*m_pCPGSystem)[m_nodeNumber];
80 if (m_pMotorControl == NULL)
82 throw std::runtime_error(
"Motor control has not been set.");
86 return *m_pMotorControl;
92 if (newTension >= 0.0)
98 throw std::runtime_error(
"Tension setpoint is less than zero!");
104 if (newControlLength >= 0.0)
106 m_controlLength = newControlLength;
110 throw std::runtime_error(
"Length setpoint is less than zero!");
Contains the definition of class ImpedanceControl. $Id$.
void updateTensionSetpoint(double newTension)
void updateControlLength(double newControlLength)
Definition of class CPGEquations.
void setOffsetTension(double offsetTension)
Definition of class tgBaseCPGNode.