![]() |
Hekateros
3.4.3
RoadNarrows Robotics Robot Arm Project
|
Joint velocity/ servo speed lookup table class. More...
#include <hekKinJoint.h>
Public Types | |
| typedef std::vector< VelSpeedTuple > | VelSpeedTbl |
| Velocity-speed table type. | |
Public Member Functions | |
| VelSpeedLookupTbl () | |
| Default constructor. | |
| ~VelSpeedLookupTbl () | |
| Destructor. | |
| VelSpeedLookupTbl | operator= (const VelSpeedLookupTbl &rhs) |
| Assignment operator. More... | |
| void | create (double fJointMaxVel, double fBucketSize) |
| Create lookup table. More... | |
| int | hash (double fJointVel) |
| Hash joint velocity to table index. More... | |
| void | update (double fJointVel, int nServoSpeed) |
| Update lookup table entry. More... | |
| int | estimate (double fJointGoalVel) |
| Estimate servo goal speed. More... | |
| int | getLookupTableSize () |
| Get the lookup table fixed size. More... | |
| int | getNumLookupTableEntries () |
| Get the number of populated entries in lookup table. More... | |
| void | enableDebugging (const std::string &strId) |
| Enable table debugging. More... | |
| void | disableDebugging () |
| Disable table debugging. | |
| void | dumpTable (const std::string &strId) |
| Dump lookup table entries. More... | |
Static Public Attributes | |
| static const int | NO_ENTRY = -1 |
| No table entry value. | |
| static const int | MIN_NON_ZERO_SPEED = 10 |
| Minimum servo speed for non-zero velocities. | |
Protected Attributes | |
| double | m_fBucketSize |
| table entry size (degrees/second) | |
| int | m_nMaxIndex |
| maximum index into table | |
| int | m_nNumEntries |
| number of populated table entries. | |
| VelSpeedTbl | m_tbl |
| dynamic interpolation table | |
| std::string | m_strDbgId |
| debugging id | |
| bool | m_bDbg |
| enable [disable] debugging | |
Joint velocity/ servo speed lookup table class.
A table of associated joint velocities to servo speed is dynamically built and updated to provide:
Definition at line 249 of file hekKinJoint.h.
| void VelSpeedLookupTbl::create | ( | double | fJointMaxVel, |
| double | fBucketSize | ||
| ) |
Create lookup table.
| fJointMaxVel | Joint maximum velocity (radians/second). |
| fBucketSize | Table bucket size (radians/second). |
Definition at line 197 of file hekKinJoint.cxx.
Referenced by hekateros::HekKinJoint::HekKinJoint().
| void VelSpeedLookupTbl::dumpTable | ( | const std::string & | strId | ) |
Dump lookup table entries.
Debugging is printed to stderr.
| strId | Debug identification string. |
Definition at line 374 of file hekKinJoint.cxx.
References hekateros::radToDeg().
| void VelSpeedLookupTbl::enableDebugging | ( | const std::string & | strId | ) |
Enable table debugging.
Debugging is printed to stderr.
| strId | Debug identification string. |
Definition at line 363 of file hekKinJoint.cxx.
| int VelSpeedLookupTbl::estimate | ( | double | fJointGoalVel | ) |
Estimate servo goal speed.
Linear interpolation is performed between the two nearest neighbors in the lookup table.
| fJointGoalVel | Joint goal velocity (radians/second). |
Definition at line 266 of file hekKinJoint.cxx.
Referenced by hekateros::HekKinJoint::estimateServoTgtSpeed().
|
inline |
Get the lookup table fixed size.
Definition at line 324 of file hekKinJoint.h.
|
inline |
Get the number of populated entries in lookup table.
Definition at line 334 of file hekKinJoint.h.
| int VelSpeedLookupTbl::hash | ( | double | fJointVel | ) |
Hash joint velocity to table index.
| fJointVel | Joint velocity (radians/second). |
Definition at line 229 of file hekKinJoint.cxx.
References hekateros::cap().
| VelSpeedLookupTbl VelSpeedLookupTbl::operator= | ( | const VelSpeedLookupTbl & | rhs | ) |
Assignment operator.
| rhs | Right hand side object. |
Definition at line 187 of file hekKinJoint.cxx.
References m_bDbg, m_fBucketSize, m_nMaxIndex, m_nNumEntries, m_strDbgId, and m_tbl.
| void VelSpeedLookupTbl::update | ( | double | fJointVel, |
| int | nServoSpeed | ||
| ) |
Update lookup table entry.
| fJointVel | Joint velocity (radians/second). |
| nServoSpeed | Servo speed (raw unitless). |
Definition at line 235 of file hekKinJoint.cxx.
References hekateros::iabs(), and hekateros::radToDeg().
Referenced by hekateros::HekKinJoint::updateAssoc(), and hekateros::HekKinJointWristRot::updateAssoc().