58 #include "rnr/rnrconfig.h" 61 #include "Dynamixel/Dynamixel.h" 62 #include "Dynamixel/DynaError.h" 63 #include "Dynamixel/DynaTypes.h" 64 #include "Dynamixel/DynaPid.h" 65 #include "Dynamixel/DynaServo.h" 82 SyncMoveMsgs::SyncMoveMsgs()
84 for(
int i=0; i<DYNA_ID_NUMOF; ++i)
86 m_tupSpeed[i].m_nServoId = DYNA_ID_NONE;
87 m_tupSpeed[i].m_nSpeed = 0;
88 m_tupOdPos[i].m_nServoId = DYNA_ID_NONE;
89 m_tupOdPos[i].m_nPos = 0;
96 void SyncMoveMsgs::clear()
98 m_tupSpeed[0].m_nServoId = DYNA_ID_NONE;
99 m_tupSpeed[0].m_nSpeed = 0;
100 m_uSpeedTupCount = 0;
102 m_tupOdPos[0].m_nServoId = DYNA_ID_NONE;
103 m_tupOdPos[0].m_nPos = 0;
104 m_uOdPosTupCount = 0;
107 int SyncMoveMsgs::addSpeed(
int nServoId,
int nServoSpeed)
111 if( m_uSpeedTupCount < DYNA_ID_NONE )
113 index = (int)m_uSpeedTupCount++;
114 m_tupSpeed[index].m_nServoId = nServoId;
115 m_tupSpeed[index].m_nSpeed = nServoSpeed;
125 int SyncMoveMsgs::addOdPos(
int nServoId,
int nServoPos)
129 if( m_uOdPosTupCount < DYNA_ID_NONE )
131 index = (int)m_uOdPosTupCount++;
132 m_tupOdPos[index].m_nServoId = nServoId;
133 m_tupOdPos[index].m_nPos = nServoPos;
148 VelSpeedTuple::VelSpeedTuple()
154 VelSpeedTuple::VelSpeedTuple(
const double fJointVel,
const int nServoSpeed)
156 m_fJointVel = fJointVel;
157 m_nServoSpeed = nServoSpeed;
179 VelSpeedLookupTbl::VelSpeedLookupTbl()
197 void VelSpeedLookupTbl::create(
double fJointMaxVel,
double fBucketSize)
202 fJointMaxVel = fabs(fJointMaxVel);
203 m_fBucketSize = fabs(fBucketSize);
205 nElems = (int)(fJointMaxVel / m_fBucketSize);
206 if( (
double)nElems * m_fBucketSize < fJointMaxVel )
212 m_tbl.insert(m_tbl.begin(), nElems, noentry);
214 m_nMaxIndex = (int)m_tbl.size() - 1;
217 m_tbl[m_nMaxIndex] =
VelSpeedTuple(fJointMaxVel, DYNA_SPEED_MAX_RAW);
223 fprintf(stderr,
"DBG: %s(): %s: tbl_size=%zu, num_entries=%d\n",
225 m_strDbgId.c_str(), m_tbl.size(), m_nNumEntries);
229 int VelSpeedLookupTbl::hash(
double fJointVel)
231 int index = (int)(fabs(fJointVel)/m_fBucketSize);
232 return cap(index, 0, m_nMaxIndex);
235 void VelSpeedLookupTbl::update(
double fJointVel,
int nServoSpeed)
237 int index = hash(fJointVel);
239 if( (index > 0) && (index < m_nMaxIndex) )
241 int nOldCnt = m_nNumEntries;
243 if( m_tbl[index].m_nServoSpeed == NO_ENTRY )
248 m_tbl[index].m_fJointVel = fabs(fJointVel);
249 m_tbl[index].m_nServoSpeed =
iabs(nServoSpeed);
250 if( m_tbl[index].m_nServoSpeed < MIN_NON_ZERO_SPEED )
252 m_tbl[index].m_nServoSpeed = MIN_NON_ZERO_SPEED;
255 if( m_bDbg && (m_nNumEntries != nOldCnt) )
257 fprintf(stderr,
"DBG: %s(): %s: " 258 "num_entries=%d, index=%d, vel=%lf, speed=%d\n",
260 m_strDbgId.c_str(), m_nNumEntries, index,
261 radToDeg(m_tbl[index].m_fJointVel), m_tbl[index].m_nServoSpeed);
266 int VelSpeedLookupTbl::estimate(
double fJointGoalVel)
268 double fJointAbsVel = fabs(fJointGoalVel);
271 if( fJointAbsVel == 0.0 )
273 return m_tbl[0].m_nServoSpeed;
276 else if( fJointAbsVel >= m_tbl[m_nMaxIndex].m_fJointVel )
278 return m_tbl[m_nMaxIndex].m_nServoSpeed;
286 int index = hash(fJointAbsVel);
289 if( m_tbl[index].m_nServoSpeed == NO_ENTRY )
291 nMinSpeed = NO_ENTRY;
292 nMaxSpeed = NO_ENTRY;
295 else if( m_tbl[index].m_fJointVel == fJointAbsVel )
297 return m_tbl[index].m_nServoSpeed;
300 else if( m_tbl[index].m_fJointVel < fJointAbsVel )
302 fMinVel = m_tbl[index].m_fJointVel;
303 nMinSpeed = m_tbl[index].m_nServoSpeed;
304 nMaxSpeed = NO_ENTRY;
309 nMinSpeed = NO_ENTRY;
310 fMaxVel = m_tbl[index].m_fJointVel;
311 nMaxSpeed = m_tbl[index].m_nServoSpeed;
315 if( nMinSpeed == NO_ENTRY )
317 for(
int i = index-1; i >= 0; --i)
319 if( m_tbl[i].m_nServoSpeed == NO_ENTRY )
323 else if( m_tbl[i].m_fJointVel < fJointAbsVel )
325 fMinVel = m_tbl[i].m_fJointVel;
326 nMinSpeed = m_tbl[i].m_nServoSpeed;
331 if( nMinSpeed == NO_ENTRY )
333 return m_tbl[0].m_nServoSpeed;
337 if( nMaxSpeed == NO_ENTRY )
339 for(
int i = index+1; i <= m_nMaxIndex; ++i)
341 if( m_tbl[i].m_nServoSpeed == NO_ENTRY )
345 else if( m_tbl[i].m_fJointVel > fJointAbsVel )
347 fMaxVel = m_tbl[i].m_fJointVel;
348 nMaxSpeed = m_tbl[i].m_nServoSpeed;
353 if( nMaxSpeed == NO_ENTRY )
355 return m_tbl[m_nMaxIndex].m_nServoSpeed;
359 return (
int)((double)nMinSpeed + fabs(nMaxSpeed - nMinSpeed) *
360 (fJointAbsVel - fMinVel) / (fMaxVel - fMinVel));
363 void VelSpeedLookupTbl::enableDebugging(
const std::string &strId)
369 void VelSpeedLookupTbl::disableDebugging()
374 void VelSpeedLookupTbl::dumpTable(
const std::string &strId)
376 fprintf(stderr,
"DBG: %s: bucket_size=%.2lf deg, lookup table[%zu] =\n{\n",
377 strId.c_str(),
radToDeg(m_fBucketSize), m_tbl.size());
379 for(
int i=0; i<m_tbl.size(); ++i)
381 if( m_tbl[i].m_nServoSpeed != NO_ENTRY )
383 fprintf(stderr,
" [%3d]: vel=%7.3lf (%6.2lf deg), speed=%4d\n",
384 i, m_tbl[i].m_fJointVel,
radToDeg(m_tbl[i].m_fJointVel),
385 m_tbl[i].m_nServoSpeed);
388 fprintf(stderr,
"}\n");
395 const double HekKinJoint::SLOW_DERATE_DELTA_V = 1.0;
397 HekKinJoint::HekKinJoint() :
398 m_pJoint(NULL), m_pServo(NULL),
399 m_pid(HekTunePidKpDft, HekTunePidKiDft, HekTunePidKdDft),
400 m_histPosIn(POS_WIN_SIZE, 0.0),
401 m_histDtIn(DT_WIN_SIZE, 0.0),
402 m_histVelIn(VEL_WIN_SIZE, 0.0),
403 m_histTorqueIn(TORQUE_WIN_SIZE, 0.0)
423 clock_gettime(CLOCK_REALTIME, &
m_tsPrev);
450 double fKp, fKi, fKd;
452 double fRawMaxTorque;
488 clock_gettime(CLOCK_REALTIME, &
m_tsPrev);
514 fRawMaxTorque = (double)pServo->GetSpecification().m_uRawTorqueMax;
567 double fKp, fKi, fKd;
569 double fRawMaxTorque;
598 fRawMaxTorque = (double)
m_pServo->GetSpecification().m_uRawTorqueMax;
622 if( (rc =
m_pServo->Read(DYNA_ADDR_CUR_POS_LSB, &uEncZeroPt)) != DYNA_OK )
624 LOGERROR(
"Joint %s (servo=%d): Cannot read current encoder position.",
634 m_pServo->ResetOdometer((
int)uEncZeroPt, bIsReverse);
636 LOGDIAG3(
"Joint %s (servo=%d): Odometer reset at encoder=%u, reverse=%s.",
638 uEncZeroPt,
boolstr(bIsReverse));
691 if( m_fJointGoalPos < m_pJoint->m_fMinSoftLimitRads )
693 LOGDIAG3(
"Joint %s (servo=%d): " 694 "Goal position %.02lf < %.02lf degree limit - capping.",
702 LOGDIAG3(
"Joint %s (servo=%d): " 703 "Goal position %.02lf > %.02lf degree limit - capping.",
739 int nSign =
m_pServo->IsOdometerReversed()? -1: 1;
746 return nServoTgtSpeed >= 0? 1: -1;
785 LOGWARN(
"Large jump in servo position: prev_odpos=%d, cur_odpos=%d.",
830 LOGWARN(
"Joint %s (servo=%d): Entered over-torque condition. " 842 LOGDIAG2(
"Joint %s (servo=%d): Cleared over-torque condition.",
856 if( !bIsControlling )
902 else if( !bIsControlling )
984 static const int TuneMaxIters = 5;
985 static const useconds_t TuneWait = 100;
993 LOGDIAG4(
"Executing torque control for servo %d.",
m_pServo->GetServoId());
1000 case DYNA_MODE_CONTINUOUS:
1002 m_pServo->WriteGoalSpeed(nOffSpeed);
1003 for(
int i = 0; i < TuneMaxIters; ++i)
1016 case DYNA_MODE_SERVO:
1019 m_pServo->WriteGoalSpeed(nOffSpeed);
1099 if(
m_pServo->GetServoMode() == DYNA_MODE_CONTINUOUS )
1101 nServoGoalSpeed =
cap(nServoGoalSpeed, -DYNA_SPEED_MAX_RAW,
1102 DYNA_SPEED_MAX_RAW);
1103 m_pServo->WriteGoalSpeed(nServoGoalSpeed);
1107 nServoGoalSpeed =
cap(
iabs(nServoGoalSpeed), DYNA_SPEED_MIN_CTL,
1108 DYNA_SPEED_MAX_RAW);
1109 m_pServo->WriteGoalSpeed(nServoGoalSpeed);
1112 m_pServo->WriteGoalPos(nServoGoalPos);
1125 if(
m_pServo->GetServoMode() == DYNA_MODE_CONTINUOUS )
1127 nServoTgtSpeed =
cap(nServoTgtSpeed, -DYNA_SPEED_MAX_RAW,
1128 DYNA_SPEED_MAX_RAW);
1134 DYNA_SPEED_MAX_RAW);
1164 #ifdef HEK_KIN_EXEC_ALG_SYNC 1181 #endif // HEK_KIN_EXEC_ALG_SYNC 1212 double fJointStopVel;
1213 int nServoStopSpeed;
1256 return fDt > 0.0? (fPos1 - fPos0) / fDt: 0.0;
1266 int nSign = (int)
signof(fJointTgtVel);
1268 if(
m_pServo->IsOdometerReversed() )
1282 nSpeedEst = (int)(DYNA_SPEED_MAX_RAW * r);
1283 nSpeedEst =
cap(nSpeedEst, 0, DYNA_SPEED_MAX_RAW) *
getGoalDir();
1290 struct timespec tsNow;
1294 clock_gettime(CLOCK_REALTIME, &tsNow);
1315 return fDtAvg - fDtK + fDt0;
1321 if( nServoCurPos == nServoPrevPos )
1323 return nServoCurPos;
1329 return nServoCurPos;
1335 return nServoPrevPos;
1349 return fPosAvg - fPosK + fPos0;
1362 return fVelAvg - fVelK + fVel0;
1375 return fTorqueAvg - fTorqueK + fTorque0;
1385 if( !bIsControlling )
1394 m_eStateWristPitch = getCoupledJointState();
1403 if( isCoupledJointStopped() && (eStatePrev !=
MoveStateIdle) )
1454 else if( !bIsControlling )
1461 m_eStateWristPitch = getCoupledJointState();
1463 if( isCoupledJointMoving() )
1465 m_pKinJointWristPitch->getTgtVelSpeed(fAdjustVel, fAdjustSpeed);
1496 isCoupledJointMoving() ) &&
1525 m_eStateWristPitch = getCoupledJointState();
1527 if(
isStopped() && isCoupledJointStopped() &&
1562 m_pKinJointWristPitch->getTgtVelSpeed(fAdjustVel, fAdjustSpeed);
1622 double fJointStopVel;
1623 int nServoStopSpeed;
1645 if( isCoupledJointMoving() )
1647 m_pKinJointWristPitch->getTgtVelSpeed(fAdjustVel, fAdjustSpeed);
1655 nServoStopSpeed -= fAdjustSpeed;
1668 int nAdjustPos = 0, nAdjustSpeed = 0;
1671 if( m_pKinJointWristPitch != NULL )
1673 m_pKinJointWristPitch->getServoCurPosSpeed(nAdjustPos, nAdjustSpeed);
1678 return nServoPos + nAdjustPos;
1683 double fAdjustPos = 0, fAdjustVel = 0;
1686 if( m_pKinJointWristPitch != NULL )
1688 m_pKinJointWristPitch->getJointCurPosVel(fAdjustPos, fAdjustVel);
1693 return fJointPos - fAdjustPos;
1698 double fAdjustPos = 0.0, fAdjustVel = 0.0;
1700 if( m_pKinJointWristPitch != NULL )
1702 m_pKinJointWristPitch->getJointCurPosVel(fAdjustPos, fAdjustVel);
1706 if( (fAdjustVel == 0.0) && (getCoupledJointState() ==
MoveStateIdle) )
1714 if( m_pKinJointWristPitch != NULL )
1716 return m_pKinJointWristPitch->getMoveState();
virtual double servoPosToJointPos(int nOdPos)
Convert servo position to the equivalent joint position.
const char * boolstr(bool b)
Boolean to string.
virtual void updateAssoc(double fJointVel, int nServoSpeed)
Update joint velocity - servo speed association.
int addSpeed(int nServoId, int nServoSpeed)
Add servo speed to speed tuple array.
double filterPositions(double fPosAvg, double fJointPos)
Apply a low-pass band filter on the joint positions (radians).
virtual int jointPosToServoPos(double fPos)
Convert joint position to the equivalent servo position.
virtual int estimateServoTgtSpeed(double fJointTgtVel)
Estimate of target servo speed from target joint velocity.
int specifyMove(const double fGoalPos, const double fGoalVel)
Specify a new joint goal position and velocity move.
int estimate(double fJointGoalVel)
Estimate servo goal speed.
virtual int jointPosToServoPos(const double fPos)
Convert joint position to the equivalent servo position.
double m_fOverTorqueTh
set over torque condition threshold
int dejitterServoPos(int nServoCurPos, int nServoPrevPos)
De-jitter servo odometer position.
static const int TORQUE_CTL_BACKOFF_SPEED
Torque control backoff speed (raw unitless)
void getToleranceParams(const std::string &strJointName, double &fTolPos, double &fTolVel) const
Get joint tolerance tune parameters.
static const int HEK_OK
not an error, success
VelSpeedTbl m_tbl
dynamic interpolation table
HekOpState m_eOpState
current operational state
virtual int nlapplyTorqueControl()
Apply torque limit control (no lock version).
double m_fMinSoftLimitRads
joint min soft limit (radians)
double m_fVelDerate
joint velocity derate (normalized)
int m_nServoCurLoad
servo current load (raw unitless)
std::deque< double > m_histPosIn
recent history of joint positions
virtual MoveState move()
Move joint using joint PID controller.
double m_fStopVelTh
joint velocity threshold to safely stop move
HekRobotJoint * m_pJoint
joint description
double getPidMaxDeltaV(const std::string &strJointName) const
Get joint PID maximum delta v (radians/second) tune parameter.
virtual int nlstop()
Stop movement and move control of the joint (no lock version).
int m_nServoCurPos
servo current position (odometer ticks)
Operational robotic joint description class.
static const double SLOW_DERATE_DELTA_V
Stop delta v as a fraction of max_delta_v tune parameter.
DynaServo * m_pServo
joint master servo control
double signof(double a)
Sign of a.
int m_nNumEntries
number of populated table entries.
double m_fJointVelOut
low-pass filtered joint cur velocity
virtual MoveState planMotion(bool bIsControlling, SyncMoveMsgs &msgs)
Plan motion.
int m_nServoCurSpeed
current motor speed (raw unitless)
double m_fTicksPerJointRad
encoder/odom. ticks per joint radian
int m_nServoGoalPos
servo goal position (odometer ticks)
double dt(struct timeval &t1, struct timeval &t0)
Calculate delta time.
double m_fTicksPerServoRad
encoder/odom. ticks per servo radian
int m_eJointType
joint type
virtual int nlslowToStop(SyncMoveMsgs &msg)
Slow to stop (no lock version).
std::deque< double > m_histTorqueIn
recent history of joint torques
double m_fMaxJointRadsPerSec
maximum joint radians per second
bool canMoveInPlannedDir(int nServoTgtSpeed)
Test if joint can move in planned direction.
static const double HekTunePidMaxDeltaVDft
Maximum PID delta V output (degrees/second)
void update(double fJointVel, int nServoSpeed)
Update lookup table entry.
double m_fTolPos
joint position ± tolerance (rads)
int m_nMaxIndex
maximum index into table
double getVelocityDerate() const
Get derated velocity tune parameter (normalized).
void lock()
Lock the joint kinematics.
virtual int applyTorqueControl()
Apply torque limit control.
double radToDeg(double r)
Convert radians to degrees.
int addOdPos(int nServoId, int nServoPos)
Add servo position to position tuple array.
virtual void specifySetPoint(double fJointGoalPos, double fJointGoalVel)
Specify the PID set point.
int m_nMasterServoId
master servo id
std::string m_strDbgId
debugging id
pthread_mutex_t m_mutexSync
synchonization mutex
double delta_t()
Calculate the delta time between calls to this.
void unlock()
Unlock the joint kinematics.
virtual void reload(const HekTunes &tunes)
Reload configuration tuning parameters.
virtual double jointVelocity(double fPos1, double fPos0, double fDt)
Calculate the joint velocity from delta servo positions.
Hekateros tuning data class.
static const size_t POS_WIN_SIZE
Position sliding window size for low-pass band filtering of input positions.
MoveState m_eState
joint control state
int cap(int a, int min, int max)
Cap value within limits [min, max].
Container class to hold Dynamixel synchronous messages data.
int getPlannedDir(int nServoTgtSpeed)
Get the planned target rotation direction.
int m_nServoTgtSpeed
target motor speed (raw unitless)
void setPidKParams(const double fKp, const double fKi, const double fKd)
Set the joint's position and velocity PID K parameters.
Hekateros powered joint dynamics and kinematics control class.
virtual int react(bool bIsControlling, SyncMoveMsgs &msgs)
React to recently read sensor data.
double m_fDt
delta time between positions reads
static const size_t DT_WIN_SIZE
Delta t sliding window size for low-pass band filtering of input delta times.
void create(double fJointMaxVel, double fBucketSize)
Create lookup table.
double m_fJointGoalPos
joint goal position (radians)
void getTorqueParams(const std::string &strJointName, double &fOverTorqueTh, double &fClearTorqueTh) const
Get joint torque parameters.
virtual int stop()
Stop movement and move control of the joint.
double m_fBucketSize
table entry size (degrees/second)
Joint velocity/ servo speed lookup table class.
virtual int nlslowToStop(SyncMoveMsgs &msg)
Slow to stop (no lock version).
Hekateros joint classes interfaces.
virtual double control(double fJointCurPos, double fJointCurVel, double fDt)
Apply PID control.
double m_fJointPrevPos
joint current position (radians)
double m_fJointPosOut
low-pass filtered joint cur position
void moveServo(int nServoGoalSpeed, int nServoGoalPos)
Move servo.
static const double HekTuneVelDerateDft
Default Hekateros robot velocity derate (% of goal velocities).
double m_fTorqueOut
low-pass filtered torque
std::deque< double > m_histDtIn
sliding window of delta t's
int m_nServoPrevPos
servo previous pos (odometer ticks)
double m_fJointRadPerTick
joint radians / odometer tick
static const size_t VEL_WIN_SIZE
Velocity sliding window size for low-pass band filtering of input Velocities.
double m_fJointCurPos
joint current position (radians)
double filterVelocities(double fVelAvg, double fJointVel)
Apply a low-pass band filter on the joint velocities (radians/second).
std::deque< double > m_histVelIn
sliding window of current velocities
double m_fJointVel
joint velocity (radians/second)
std::string m_strName
joint name
int iabs(int a)
Integer absolute value.
The Hekateros joint position and velocity PID class interface.
static const int HEK_ECODE_DYNA
dynamixel error
static const double HekTuneTolVelDft
Default joint velocity control tolerance (degrees/second).
Top-level package include file.
double degToRad(double d)
Convert degrees to radians.
double m_fMaxSoftLimitRads
joint max soft limit (radians)
void addServoMsgEntries(SyncMoveMsgs &msg, int nServoGoalSpeed, int nServoGoalPos)
Add servo to synchronous move message(s).
static const size_t TORQUE_WIN_SIZE
Torque sliding window size for low-pass band filtering of input torques.
bool isMovingToGoal()
Test if actively moving joint to goal.
static const double HekTuneTolPosDft
Default joint position control tolerance (degrees).
no active goal or stopping control
struct timespec m_tsPrev
previous time mark
void setPidMaxDeltaVParam(const double fMaxDeltaV)
Set joint PID maximum delta v (radians/second) parameter.
virtual int nlspecifyMove(const double fGoalPos, const double fGoalVel)
Specify a new joint goal position and velocity move (no lock version).
HekPid m_pid
joint position and velocity PID
virtual bool isStopped()
Test if joint is stopped (i.e. control is not active).
int m_nServoSpeed
associated servo speed (raw unitless)
double m_fJointCurVel
joint current velocity (radians/second)
virtual int senseDynamics(bool bIsControlling)
Sense (read) the current servo dynamics and transform to useful state.
int m_nMasterServoDir
master servo normalized direction
VelSpeedLookupTbl m_tblVelSpeed
dynamic velocity/speed lookup table
virtual MoveState nlmove()
Move joint using joint PID controller (no lock version).
double m_fJointGoalVel
joint goal velocity (radians/second)
HekKinJoint & operator=(const HekKinJoint &rhs)
Assignment operator.
HekKinJoint()
Default constructor.
<b><i>Hekateros</i></b> product specification base classes.
double m_fJointTgtVel
joint target velocity (radians/second)
virtual int resetServoOdometer()
Reset servo odometer zero point to the current encoder position.
virtual void updateAssoc(double fJointVel, int nServoSpeed)
Update joint velocity - servo speed association.
virtual int react(bool bIsControlling, SyncMoveMsgs &msgs)
React to recently read sensor data.
static const int TORQUE_CTL_BACKOFF_POS
Torque control backoff positon (odometer ticks)
Hekateros common utilities.
bool canMoveInGoalDir()
Test if joint can move in direction of goal position.
double averageDt(double fDtAvg, double fDt)
Apply a running average for the delta times (seconds).
Hekateros powered joint kinematics and dynamics control class interface.
double m_fDtAvg
average delta t
virtual int act()
Act (write) to effect the servo dynamics for torque and motion control.
bool m_bDbg
enable [disable] debugging
double m_fTolVel
joint velocity ± tolerance (rads/s)
virtual MoveState planMotion(bool bIsControlling, SyncMoveMsgs &msgs)
Plan motion.
Joint velocity to servo speed tuple class.
virtual int act()
Act (write) to effect the servo dynamics for torque and motion control.
bool canStopNow()
Test if can stop now without slowing down.
bool isStopping()
Test if actively stopping joint.
MoveState getCoupledJointState()
Get coupled joint's move state.
virtual double servoPosToJointPos(const int nOdPos)
Convert servo position to the equivalent joint position.
bool m_bOverTorqueCond
is [not] in torque overload condition
double m_fClearTorqueTh
clear over torque condition threshold
MoveState
Kinedynamics joint position and velocity control states.
void getPidKParams(const std::string &strJointName, double &fKp, double &fKi, double &fKd) const
Get joint PID K tune parameters.
int getGoalDir()
Get the current goal rotation direction.
virtual int estimateServoTgtSpeedSimple(double fJointTgtVel)
Simple estimate of target servo speed from target joint velocity.
The <b><i>Hekateros</i></b> namespace encapsulates all <b><i>Hekateros</i></b> related constructs...
double filterTorques(double fTorqueAvg, int nServoLoad)
Apply a low-pass band filter on the sensed torques (loads).
virtual MoveState nlmove()
Move joint using joint PID controller (no lock version).