![]() |
Hekateros
3.4.3
RoadNarrows Robotics Robot Arm Project
|
Hekateros robotic manipulator calibration by stretching class. More...
#include <hekCalibStretch.h>
Public Member Functions | |
| HekCalibStretch (HekRobot &robot) | |
| virtual | ~HekCalibStretch () |
| virtual int | calibrate () |
| Calibrate the Hekateros's robotic arm. More... | |
Public Member Functions inherited from hekateros::HekCalib | |
| HekCalib (HekRobot &robot) | |
| virtual | ~HekCalib () |
| virtual double | moveWait (const std::string &strJointName, const double fJointGoalPos, const double fJointGoalVel) |
| Move joint to position. More... | |
| virtual double | moveToTorqueLimit (const std::string &strJointName, const double fJointGoalPos, const double fJointGoalVel) |
| Move joint until torque limit is reached. More... | |
| virtual double | moveToLight (const std::string &strJointName, const double fJointGoalPos, const double fJointGoalVel, byte_t byMask) |
| Move joint until unoccluded optical limit position is detected. More... | |
| virtual double | moveToDark (const std::string &strJointName, const double fJointGoalPos, const double fJointGoalVel, byte_t byMask) |
| Move joint until occluded optical limit position is detected. More... | |
Protected Member Functions | |
| virtual int | calibrateJointTopDeadCenter (HekRobotJoint &joint) |
| Calibrate a continuously rotating joint by top-dead-center electronic limits. More... | |
| virtual int | calibrateJointByLimits (HekRobotJoint &joint) |
| Calibrate a rovolute joint by electronic limits. More... | |
| virtual int | calibByLimitsFinal (HekRobotJoint &joint, byte_t byOptMask, int nEdge) |
| Perform final calibration by limits calculations and movements. More... | |
| virtual int | calibrateJointByTorqueLimits (HekRobotJoint &joint) |
| Calibrate joint by torque limits. More... | |
| virtual int | calibrateJointByTrust (HekRobotJoint &joint) |
| Calibrate joint by trust. More... | |
| virtual int | fineTuneTDC (HekRobotJoint &joint, byte_t byOptMask, int nEdge, double &fPosition) |
| Fine tune joint to top dead center of optical limit. More... | |
| virtual int | fineTuneLimit (HekRobotJoint &joint, byte_t byOptMask, int nEdge, double &fDeltaPos) |
| Fine tune joint to optical limit edge. More... | |
| double | calcJointRatios (const std::string &strJointName1, const std::string &strJointName2) |
| Calculate two joints' gear ratios. More... | |
| virtual int | multiMoveToLight (const std::string &strJointName, int nDir, double fJointGoalPos, double fJointGoalVel, byte_t byMask) |
| Move joint until unoccluded optical limit position is detected. More... | |
| virtual int | multiMoveToDark (const std::string &strJointName, int nDir, double fJointGoalPos, double fJointGoalVel, byte_t byMask) |
| Move joint until occluded optical limit position is detected. More... | |
| virtual HekRobotJoint * | getHelpfulParentJoint (int nChildServoId) |
| Get the parent joint (and link) that could aid in calibration. More... | |
Additional Inherited Members | |
Protected Attributes inherited from hekateros::HekCalib | |
| HekRobot & | m_robot |
| robot instance | |
Hekateros robotic manipulator calibration by stretching class.
The hekateros will do a choreographed sequence of moves to find the limits or top-dead-centers for all joints.
Definition at line 83 of file hekCalibStretch.h.
|
inline |
Default initialization constructor.
| robot | Instance of Hekateros robot. |
Definition at line 92 of file hekCalibStretch.h.
|
inlinevirtual |
Destructor.
Definition at line 99 of file hekCalibStretch.h.
References calcJointRatios(), calibByLimitsFinal(), calibrate(), calibrateJointByLimits(), calibrateJointByTorqueLimits(), calibrateJointByTrust(), calibrateJointTopDeadCenter(), fineTuneLimit(), fineTuneTDC(), getHelpfulParentJoint(), multiMoveToDark(), and multiMoveToLight().
|
protected |
Calculate two joints' gear ratios.
| strJointName1 | First joint. strJointName2 Second joint. |
Definition at line 1380 of file hekCalibStretch.cxx.
References hekateros::HekRobotJoint::m_fGearRatio.
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Perform final calibration by limits calculations and movements.
| joint | Robotic joint. |
| byOptMask | Joint optical limit bit mask; |
| nEdge | Which edge triggered limit switch. The minimum, unknown, or maximum leading edge is specified as < 0, 0, or > 0, respectively. |
Definition at line 674 of file hekCalibStretch.cxx.
References hekateros::degToRad(), hekateros::HekRobotJoint::m_bStopAtOptLimits, hekateros::HekOpticalLimit_T::m_fMaxEdgePos, hekateros::HekRobotJoint::m_fMaxPhyLimitRads, hekateros::HekRobotJoint::m_fMaxSoftLimitRads, hekateros::HekOpticalLimit_T::m_fMinEdgePos, hekateros::HekRobotJoint::m_fMinPhyLimitRads, hekateros::HekRobotJoint::m_fMinSoftLimitRads, hekateros::HekRobotJoint::m_fTicksPerJointRad, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_nMaxPhyLimitOd, hekateros::HekRobotJoint::m_nMaxSoftLimitOd, hekateros::HekRobotJoint::m_nMinPhyLimitOd, hekateros::HekRobotJoint::m_nMinSoftLimitOd, hekateros::HekRobotJoint::m_strName, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
virtual |
Calibrate the Hekateros's robotic arm.
Implements hekateros::HekCalib.
Definition at line 112 of file hekCalibStretch.cxx.
References CalibOrder, hekateros::HekRobotJoint::m_eLimitTypes, and hekateros::HekRobotJoint::m_eOpState.
Referenced by hekateros::HekRobot::calibrate(), and ~HekCalibStretch().
|
protectedvirtual |
Calibrate a rovolute joint by electronic limits.
The joint has an electronic limit switch and a occlusion band that marks the minimum and maximum rotation limits.
The joint is rotated until the electronic limit are triggered to find these min,max limits.
When the joint calibration moves are finished, the joint is repositioned at its new home position.
| joint | Robotic joint to calibrate. |
Definition at line 433 of file hekCalibStretch.cxx.
References hekateros::degToRad(), hekateros::getDarkOpticalLimits(), hekateros::getLitOpticalLimits(), hekateros::HekRobotJoint::m_bStopAtOptLimits, hekateros::HekRobotJoint::m_byOptLimitMask, hekateros::HekOpticalLimit_T::m_fMaxBlackPos, hekateros::HekRobotJoint::m_fMaxPhyLimitRads, hekateros::HekOpticalLimit_T::m_fMinBlackPos, hekateros::HekRobotJoint::m_fMinPhyLimitRads, hekateros::HekRobotJoint::m_fParkPosRads, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_strName, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Calibrate joint by torque limits.
The joint is rotated to its minimum and maximum physical end points. When the torque reaches a software defined limit, an endpoint is considered reached.
From the joint specification and detected limits, the home position at 0 ° is fine tuned.
When the joint calibration moves are finished, the joint is repositioned at its new home position.
| joint | Robotic joint to calibrate. |
Definition at line 771 of file hekCalibStretch.cxx.
References hekateros::degToRad(), HEK_TRY_GET_SERVO, hekateros::HekRobotJoint::m_bIsServoContinuous, hekateros::HekRobotJoint::m_fCalibPosRads, hekateros::HekRobotJoint::m_fMaxPhyLimitRads, hekateros::HekRobotJoint::m_fMaxSoftLimitRads, hekateros::HekRobotJoint::m_fMinPhyLimitRads, hekateros::HekRobotJoint::m_fMinSoftLimitRads, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_nMaxPhyLimitOd, hekateros::HekRobotJoint::m_nMaxSoftLimitOd, hekateros::HekRobotJoint::m_nMinPhyLimitOd, hekateros::HekRobotJoint::m_nMinSoftLimitOd, hekateros::HekRobotJoint::m_strName, M_TAU, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Calibrate joint by trust.
The joint is assumed to be already position at zero degrees by the user.
| joint | Robotic joint to calibrate. |
Definition at line 1021 of file hekCalibStretch.cxx.
References hekateros::HekRobotJoint::m_eJointType, hekateros::HekRobotJoint::m_fMaxPhyLimitRads, hekateros::HekRobotJoint::m_fMinPhyLimitRads, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_nMaxPhyLimitOd, hekateros::HekRobotJoint::m_nMinPhyLimitOd, hekateros::HekRobotJoint::m_strName, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Calibrate a continuously rotating joint by top-dead-center electronic limits.
The joint has optical limit switch(es) at defined location, typically at 0 ° and/or, at 180 °. A small occlusion band triggers the (occludes) the switch(es).
The joint is rotated until the electronic limits are triggered to find top-dead-center.
When the joint calibration moves are finished, the joint is repositioned at its new home position.
| joint | Robotic joint to calibrate. |
Definition at line 193 of file hekCalibStretch.cxx.
References hekateros::degToRad(), hekateros::getDarkOpticalLimits(), hekateros::HekRobotJoint::m_bStopAtOptLimits, hekateros::HekRobotJoint::m_byOptLimitMask, hekateros::HekRobotJoint::m_eJointType, hekateros::HekRobotJoint::m_fCalibPosRads, hekateros::HekRobotJoint::m_fMaxSoftLimitRads, hekateros::HekRobotJoint::m_fMinSoftLimitRads, hekateros::HekRobotJoint::m_fTicksPerJointRad, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_nMaxSoftLimitOd, hekateros::HekRobotJoint::m_nMinSoftLimitOd, hekateros::HekRobotJoint::m_strName, M_TAU, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Fine tune joint to optical limit edge.
* fine tune step occlusion band * _____________________ * 0 (start) | * | * | * | * 1 lit_edge * <------ * | * * | | * 2 dark_edge * ----> * | * |___________________| * * Or: * * fine tune step occlusion band * _____________________ * 0 start * | | * * | | * 2 dark_edge * ----> * | * |___________________| *
| joint | Robotic joint. | |
| byOptMask | Joint optical limit bit mask; | |
| nEdge | Which edge triggered limit switch. The minimum, unknown, or maximum leading edge is specified as < 0, 0, or > 0, respectively. | |
| [out] | fDeltaPos | Delta position (radians) from current to zero point as determined by the optical limit. |
Definition at line 1254 of file hekCalibStretch.cxx.
References hekateros::degToRad(), hekateros::getDarkOpticalLimits(), hekateros::getLitOpticalLimits(), hekateros::HekOpticalLimit_T::m_fMaxEdgePos, hekateros::HekOpticalLimit_T::m_fMinEdgePos, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_strName, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Fine tune joint to top dead center of optical limit.
The position of the joint must be in the dark, occluded region of a band prior to calling this function.
* fine tune step occlusion band * _____________________ * 0 (start) | * | * | * | * 1 lit_edge_0 * <------ * | * * | | * 2 dark_edge_0 * ----> * | * | * | * 3 lit_edge_1 | * ----------------> * * | | * * 4 center | * <---------- * * |___________________| * *
| joint | Robotic joint. | |
| byOptMask | Joint optical limit bit mask; | |
| nEdge | Which edge triggered limit switch. The minimum, unknown, or maximum leading edge is specified as < 0, 0, or > 0, respectively. Not used | |
| [out] | fPosition | Difference of determined uncalibrated joint position at TDC and the designed TDC (radians). |
Definition at line 1069 of file hekCalibStretch.cxx.
References hekateros::degToRad(), hekateros::getLitOpticalLimits(), hekateros::HekOpticalLimit_T::m_fCenterPos, hekateros::HekOpticalLimit_T::m_fMaxEdgePos, hekateros::HekOpticalLimit_T::m_fMinEdgePos, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekRobotJoint::m_strName, and hekateros::radToDeg().
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Get the parent joint (and link) that could aid in calibration.
Only a few joints serve this function.
| nChildServoId | Child joint's master servo id. |
Definition at line 1486 of file hekCalibStretch.cxx.
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Move joint until occluded optical limit position is detected.
Since moving a given joint during calibration may result in large trajectory arcs, other joints may be reposition to minimize this effects.
This call blocks until move is complete.
| strJointName | Name of joint. |
| nDir | Direction indicator. |
| fJointGoalPos | Joint goal position (radians). |
| fJointGoalVel | Joint goal velocity (radians/second). |
| byMask | Mask of limits to check. |
Definition at line 1446 of file hekCalibStretch.cxx.
Referenced by ~HekCalibStretch().
|
protectedvirtual |
Move joint until unoccluded optical limit position is detected.
Since moving a given joint during calibration may result in large trajectory arcs, other joints may be reposition to minimize this effects.
This call blocks until move is complete.
| strJointName | Name of joint. |
| nDir | Direction indicator. |
| fJointGoalPos | Joint goal position (radians). |
| fJointGoalVel | Joint goal velocity (radians/second). |
| byMask | Mask of limits to check. |
Definition at line 1406 of file hekCalibStretch.cxx.
Referenced by ~HekCalibStretch().