51 #include "rnr/rnrconfig.h" 54 #include "Dynamixel/Dynamixel.h" 55 #include "Dynamixel/DynaPid.h" 69 const double HekPid::WI_DFT = 0.25;
71 void HekPid::specifySetPoint(
double fJointGoalPos,
double fJointGoalVel)
73 DynaPid::SpecifySetPoint(fJointGoalPos,
true);
75 m_fJointGoalPos = fJointGoalPos;
76 m_fJointGoalVel = fJointGoalVel;
79 double HekPid::toOutput(
double fCVJointTgtVel)
81 double fMax = fabs(m_fJointGoalVel);
84 if( m_fMaxDeltaV != HekTunePidDeltaVNoMax )
86 fCVJointTgtVel =
fcap(fCVJointTgtVel, m_fJointCurVel-m_fMaxDeltaV,
87 m_fJointCurVel+m_fMaxDeltaV);
90 return fcap(fCVJointTgtVel, -fMax, fMax);
double fcap(double a, double min, double max)
Cap value within limits [min, max].
The Hekateros joint position and velocity PID class interface.
Top-level package include file.
Hekateros common utilities.
The <b><i>Hekateros</i></b> namespace encapsulates all <b><i>Hekateros</i></b> related constructs...