![]() |
Hekateros
3.4.3
RoadNarrows Robotics Robot Arm Project
|
Hekateros robotic manipulator plus accesories class. More...
#include <hekRobot.h>
Public Types | |
| enum | AsyncTaskId { AsyncTaskIdNone, AsyncTaskIdCalibrate } |
| Asynchronous task id. More... | |
| typedef map< std::string, int > | IMapRobotJoints |
| Indirect map of robot joints. More... | |
| typedef std::map< std::string, double > | MapDouble |
| Map of doubles. | |
Public Member Functions | |
| HekRobot (bool bNoExec=false) | |
| Default initialization constructor. More... | |
| virtual | ~HekRobot () |
| Destructor. | |
| int | connect (const std::string &strDevDynabus=HekDevDynabus, int nBaudRateDynabus=HekBaudRateDynabus, const std::string &strDevArduino=HekDevArduino, int nBaudRateArduino=HekBaudRateArduino) |
| Connect to Hekateros. More... | |
| int | disconnect () |
| Disconnect from Hekateros. More... | |
| int | calibrate (bool bForceRecalib=true) |
| Calibrate Hekateros's odometers and limit switch positions. More... | |
| int | calibrateAsync (bool bForceRecalib=true) |
| Asynchronously calibrate Hekateros's odometers and limit switch positions. More... | |
| void | reload () |
| Reload Hekateros's reloadable configuration and reset operational parameters. More... | |
| int | gotoBalancedPos () |
| Move robotic arm to its pre-defined balanced position. More... | |
| int | gotoParkedPos () |
| Move robotic arm to its pre-defined parked position. More... | |
| int | gotoZeroPtPos () |
| Move robotic arm to its pre-defined calibrated zero point position. More... | |
| int | openGripper () |
| Open gripper to its maximum opened position. More... | |
| int | closeGripper () |
| Close gripper to its minimum closed position. More... | |
| int | estop () |
| Emergency stop. More... | |
| int | freeze () |
| Freeze arm and accessories at current position. More... | |
| int | release () |
| Release arm and accessories. More... | |
| int | stop (const std::vector< std::string > &vecNames) |
| Stops specified joints at current position. More... | |
| int | clearAlarms () |
| Attempt to clear all servo alarms in all kinematic chains. More... | |
| void | resetEStop () |
| Reset (clears) emergency stop condition. More... | |
| int | moveArm (HekJointTrajectoryPoint &trajectoryPoint) |
| Move arm through trajectory point. More... | |
| int | getRobotState (HekRobotState &robotState) |
| Get the robot current state. More... | |
| int | getJointState (HekJointStatePoint &jointStatePoint) |
| Get the joint states of a kinematic chain. More... | |
| int | getTrajectoryState (HekJointTrajectoryFeedback &trajectoryFeedback) |
| Get trajectory feedback. More... | |
| void | setRobotMode (HekRobotMode eRobotMode) |
| Set robot's operational mode. More... | |
| bool | isInMotion () |
| Test if any joint in any of the kinematic chains is moving. More... | |
| void | cancelAsyncTask () |
| Cancel any asynchronous task. More... | |
| HekAsyncTaskState | getAsyncState () |
| Get the current asynchronous task state. More... | |
| int | getAsyncRc () |
| Get the last asynchronous task return code. More... | |
| bool | isConnected () |
| Test if connected to Hekateros hardware. More... | |
| void | getVersion (int &nVerMajor, int &nVerMinor, int &nRevision) |
| Get the Hekateros robotic arm hardware version numbers. More... | |
| uint_t | getVersionNum () |
| Get the Hekateros robotic arm hardware version compact number. More... | |
| std::string | getVersion () |
| Get the Hekateros robotic arm hardware version string. More... | |
| HekDesc * | getHekDesc () |
| Get the Hekateros product description. More... | |
| int | getProdId () |
| Convenience function to get this Hekateros description's base product id. More... | |
| std::string | getProdName () |
| Convenience function to get this Hekateros description's base product name. More... | |
| std::string | getFullProdBrief () |
| Get the Hekateros full brief descirption. More... | |
| int | isDescribed () |
| Test if robot is fully described via configuration XML. More... | |
| int | isCalibrated () |
| Test if robot is calibrated. More... | |
| int | isEStopped () |
| Test if robot is current emergency stopped. More... | |
| int | areServosPowered () |
| Test if robot servos are currently being driven (powered). More... | |
| int | isAlarmed () |
| Test if robot is alarmed. More... | |
| int | isAtBalancedPos () |
| Test if robot is as pre-defined balanced position. More... | |
| int | isAtParkedPos () |
| Test if robot is as pre-defined parked position. More... | |
| DynaChain * | getDynaChain () |
| Get the dynamixel chain object. More... | |
| void | getTrajectoryParams (HekNorm &eNorm, double &fEpsilon) |
| Get trajectory parameters. More... | |
| HekRobotJoint * | getArmJointAt (int index) |
| Get robotic joint in arm+ee kinematic chain at the given index. More... | |
| HekRobotJoint * | getArmJoint (const std::string &strName) |
| Get robotic joint in arm+ee kinematic chain. More... | |
| HekRobotJoint * | getArmJoint (int nServoId) |
| Get robotic joint in arm+ee kinematic chain. More... | |
| DynaServo * | getMasterServo (HekRobotJoint &joint) |
| Get robotic joint's master servo. More... | |
| double | pctOfMaxJointVelocity (HekRobotJoint &joint, double fVelPct) |
| Convert percent of maximum to joint velocity. More... | |
Protected Member Functions | |
| int | scanHw () |
| Scan Hekateros hardware and match against description. More... | |
| int | scanDynaBus (int nMaxTries) |
| Scan Hekateros dynamixel bus hardware and match against description. More... | |
| int | convertSpecs () |
| Convert specification(s) to operational parameters. More... | |
| int | addRobotJoint (HekSpecJoint_T *pSpecJoint, HekSpecServo_T *pSpecServo, MapRobotJoints &kin, IMapRobotJoints &imap) |
| Add a joint to robot's kinematic chain. More... | |
| void | adjustTuningFromSpecs () |
| Adjust tuning parameters for values in compiled product specifications. | |
| void | fauxcalibrate () |
| Faux calibrate Hekateros. More... | |
| int | configServos () |
| Configure Hekateros servos. More... | |
| int | configEEPROMForAllServos (MapRobotJoints &kin) |
| Configure the EEPROM for all Hekateros servos in kinematic chain. More... | |
| int | configEEPROMForServo (int nServoId, HekRobotJoint &joint) |
| Configure one Hekateros servo EEPROM. More... | |
| int | configRAMForAllServos (MapRobotJoints &kin) |
| Configure the RAM for all Hekateros servos in kinematic chain. More... | |
| int | configRAMForServo (int nServoId, HekRobotJoint &joint) |
| Configure one Hekateros servo RAM. More... | |
| void | resetCalibStateForAllJoints (bool bForceRecalib) |
| Mark all relevant joints for recalibration. More... | |
| HekOpState | determineRobotOpState () |
| Determine robot operational state from collective joint operational states. More... | |
| int | moveWait (DynaServo *pServo, int nOdGoalPos, int nSpeed) |
| Move servo to position. More... | |
| void | stopWait (const std::vector< std::string > &vecNames, int nMaxTries=10) |
| Wait for the specified joints to stop moving. More... | |
| void | moveWristRot () |
| Move wrist rotation for any necessary final position adjustments. More... | |
| void | setAllJointGoalsToNull () |
| Set all joint goals to a null trajectory. More... | |
| void | setJointGoalsToNull (const std::vector< std::string > &vecNames) |
| Set a set of joint goals to a null trajectory. More... | |
| void | setJointGoalToNull (const std::string &strName) |
| Set joint goal to null a trajectory. More... | |
| int | createAsyncThread () |
| Create the asynchronous thread. More... | |
| void | lock () |
| Lock the robot mutex. More... | |
| void | unlock () |
| Unlock the robot mutex. More... | |
| bool | trylock () |
| Try to lock the robot mutex. More... | |
Static Protected Member Functions | |
| static void | cbWristRot (void *pUserArg) |
| Callback to control wrist rotation. More... | |
| static void * | asyncThread (void *pArg) |
| Asynchronous operation thread. More... | |
Protected Attributes | |
| bool | m_bNoExec |
| do [not] execute physical movements | |
| HekDesc | m_descHek |
| Hekateros description | |
| HekRobotMode | m_eRobotMode |
| robot operating mode | |
| HekOpState | m_eOpState |
| arm operational state | |
| bool | m_bIsEStopped |
| arm is [not] emergency stopped | |
| bool | m_bAlarmState |
| robot is [not] alarmed | |
| bool | m_bAreServosPowered |
| arm servos are [not] driven | |
| bool | m_bAtBalancedPos |
| arm is [not] at balanced position | |
| bool | m_bAtParkedPos |
| arm is [not] at parked position | |
| HekTunes | m_tunes |
| tune parameters | |
| DynaComm * | m_pDynaComm |
| dynamixel communication | |
| DynaChain * | m_pDynaChain |
| dynamixel chain | |
| DynaBgThread * | m_pDynaBgThread |
| dynamixel background thread | |
| MapRobotJoints | m_jointsArm |
| robot arm + end effector joints | |
| MapRobotJoints | m_jointsEquipDeck |
| robot equipement deck kin. joints | |
| MapRobotJoints | m_jointsAux |
| robot auxiliary kinematic joints | |
| IMapRobotJoints | m_imapJoints |
| joints indirect map | |
| HekKinematics * | m_pKin |
| dynamics and kinematics | |
| HekJointTrajectoryPoint | m_lastTrajArm |
| last trajectory point for arm | |
| HekMonitor | m_monitor |
| power, health, and safety monitor | |
| HekAsyncTaskState | m_eAsyncTaskState |
| asynchronous task state | |
| int | m_rcAsyncTask |
| last async task return code | |
| AsyncTaskId | m_eAsyncTaskId |
| asynchronous task id | |
| void * | m_pAsyncTaskArg |
| asynchronous argument | |
| pthread_t | m_threadAsync |
| async pthread identifier | |
| pthread_mutex_t | m_mutex |
| synchronization mutex | |
Friends | |
| class | HekCalib |
| class | HekCalibStretch |
Hekateros robotic manipulator plus accesories class.
Includes up to 3 kinematic chains.
Definition at line 88 of file hekRobot.h.
| typedef map<std::string, int> hekateros::HekRobot::IMapRobotJoints |
Indirect map of robot joints.
| key: | joint name |
| mapped type: | master servo id |
Definition at line 99 of file hekRobot.h.
| enum hekateros::HekRobot::AsyncTaskId |
Asynchronous task id.
| Enumerator | |
|---|---|
| AsyncTaskIdNone |
no task |
| AsyncTaskIdCalibrate |
calibrate hekateros arm task id |
Definition at line 104 of file hekRobot.h.
| HekRobot::HekRobot | ( | bool | bNoExec = false | ) |
Default initialization constructor.
| bNoExec | Do [not] execute arm physical movements. All commands and responses are supported but the lower level arm movement commands will not be issued. |
Definition at line 194 of file hekRobot.cxx.
|
protected |
Add a joint to robot's kinematic chain.
| [in] | pSpecJoint | Pointer to joint spcecification. |
| [in] | pSpecServo | Pointer to master servo spcecification. |
| [out] | kin | Modified kinematics chain of joints. |
| [out] | imap | Indirect map of kinematic chain. |
Definition at line 1271 of file hekRobot.cxx.
References hekateros::degToRad(), hekateros::fcap(), hekateros::HekSpecServo_T::m_bIsContinuous, hekateros::HekRobotJoint::m_bIsServoContinuous, hekateros::HekRobotJoint::m_bStopAtOptLimits, hekateros::HekRobotJoint::m_byOptLimitMask, hekateros::HekRobotJoint::m_eJointType, hekateros::HekSpecJoint_T::m_eJointType, hekateros::HekRobotJoint::m_eLimitTypes, hekateros::HekSpecJoint_T::m_eLimitTypes, hekateros::HekRobotJoint::m_eOpState, hekateros::HekSpecJoint_T::m_fBalancedPos, hekateros::HekRobotJoint::m_fBalPosRads, hekateros::HekSpecJoint_T::m_fCalibPos, hekateros::HekRobotJoint::m_fCalibPosRads, hekateros::HekRobotJoint::m_fGearRatio, hekateros::HekSpecJoint_T::m_fGearRatio, hekateros::HekRobotJoint::m_fMaxJointRadsPerSec, hekateros::HekSpecJoint_T::m_fMaxPhyLimit, hekateros::HekRobotJoint::m_fMaxPhyLimitRads, hekateros::HekRobotJoint::m_fMaxServoRadsPerSec, hekateros::HekRobotJoint::m_fMaxSoftLimitRads, hekateros::HekSpecJoint_T::m_fMinPhyLimit, hekateros::HekRobotJoint::m_fMinPhyLimitRads, hekateros::HekRobotJoint::m_fMinSoftLimitRads, hekateros::HekRobotJoint::m_fOverTorqueThDft, hekateros::HekSpecJoint_T::m_fParkedPos, hekateros::HekRobotJoint::m_fParkPosRads, hekateros::HekRobotJoint::m_fTicksPerJointRad, hekateros::HekRobotJoint::m_fTicksPerServoRad, hekateros::HekSpecServo_T::m_fTorqueLimitPct, hekateros::HekSpecJoint_T::m_limit, hekateros::HekSpecServo_T::m_nDir, hekateros::HekRobotJoint::m_nMasterServoDir, hekateros::HekRobotJoint::m_nMasterServoId, hekateros::HekSpecJoint_T::m_nMasterServoId, hekateros::HekRobotJoint::m_nMaxPhyLimitOd, hekateros::HekRobotJoint::m_nMaxSoftLimitOd, hekateros::HekRobotJoint::m_nMinPhyLimitOd, hekateros::HekRobotJoint::m_nMinSoftLimitOd, hekateros::HekRobotJoint::m_nSlaveServoId, hekateros::HekSpecJoint_T::m_nSlaveServoId, hekateros::HekRobotJoint::m_strName, hekateros::HekSpecJoint_T::m_strName, M_TAU, and hekateros::HekOpticalLimit_T::m_uBit.
|
inline |
Test if robot servos are currently being driven (powered).
Definition at line 528 of file hekRobot.h.
References m_bAreServosPowered.
|
staticprotected |
Asynchronous operation thread.
| pArg | Thread argument (point to HekRobot object). |
Definition at line 1709 of file hekRobot.cxx.
References calibrate(), m_eAsyncTaskId, m_eAsyncTaskState, m_pAsyncTaskArg, and m_rcAsyncTask.
| int HekRobot::calibrate | ( | bool | bForceRecalib = true | ) |
Calibrate Hekateros's odometers and limit switch positions.
| bForceRecalib | If true, recalibrate all joints. Otherwise calibrate only the uncalibrated. |
Definition at line 436 of file hekRobot.cxx.
References hekateros::HekCalibStretch::calibrate(), HEK_TRY_CONN, and HEK_TRY_NO_EXEC.
Referenced by asyncThread().
| int HekRobot::calibrateAsync | ( | bool | bForceRecalib = true | ) |
Asynchronously calibrate Hekateros's odometers and limit switch positions.
Call cancelAsync() to cancel operation.
| bForceRecalib | If true, recalibrate all joints. Otherwise calibrate only the uncalibrated. |
Definition at line 483 of file hekRobot.cxx.
| void HekRobot::cancelAsyncTask | ( | ) |
Cancel any asynchronous task.
Definition at line 1662 of file hekRobot.cxx.
Referenced by setRobotMode().
|
staticprotected |
Callback to control wrist rotation.
The wrist rotation is coupled to wrist pitch.
| pUserArg | Point to this. |
| int HekRobot::clearAlarms | ( | ) |
Attempt to clear all servo alarms in all kinematic chains.
Definition at line 847 of file hekRobot.cxx.
References HEK_TRY_CONN.
| int HekRobot::closeGripper | ( | ) |
Close gripper to its minimum closed position.
Definition at line 739 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryPoint::append(), hekateros::degToRad(), HEK_TRY_CALIB, HEK_TRY_CONN, HEK_TRY_NOT_ESTOP, hekateros::HekRobotJoint::m_fMinSoftLimitRads, and hekateros::HekRobotJoint::m_strName.
|
protected |
Configure the EEPROM for all Hekateros servos in kinematic chain.
For each servo, ensure that the proper servo EEPROM values are set.
| kin | Kinematic chain of joints. |
Definition at line 1430 of file hekRobot.cxx.
|
protected |
Configure one Hekateros servo EEPROM.
A read, then write if necessary is performed to limit EEPROM wear.
| nServoId | Servo id. |
| joint | Associated robotic joint. |
Definition at line 1464 of file hekRobot.cxx.
References HEK_TRY_GET_SERVO, and hekateros::HekRobotJoint::m_bIsServoContinuous.
|
protected |
Configure the RAM for all Hekateros servos in kinematic chain.
For each servo, ensure that the proper servo RAM values are set.
| kin | Kinematic chain of joints. |
Definition at line 1550 of file hekRobot.cxx.
|
protected |
Configure one Hekateros servo RAM.
| nServoId | Servo id. |
| joint | Associated robotic joint. |
Definition at line 1574 of file hekRobot.cxx.
References HEK_TRY_GET_SERVO.
|
protected |
Configure Hekateros servos.
Each servo's EEPROM and RAM control tables must match the joint descriptions.
Definition at line 1411 of file hekRobot.cxx.
| int HekRobot::connect | ( | const std::string & | strDevDynabus = HekDevDynabus, |
| int | nBaudRateDynabus = HekBaudRateDynabus, |
||
| const std::string & | strDevArduino = HekDevArduino, |
||
| int | nBaudRateArduino = HekBaudRateArduino |
||
| ) |
Connect to Hekateros.
| strDevDynabus | Dynabus serial device name. |
| nBaudRateDynabus | Dynabus baud rate. |
| strDevArduino | Arduino serial device name. |
| nBaudRateArduino | Arduino baud rate. |
Definition at line 226 of file hekRobot.cxx.
References hekateros::getRealDeviceName(), and hekateros::HekXmlTune::load().
|
protected |
Convert specification(s) to operational parameters.
The specifications must be defined and the connecton to the Hekateros hardware must be open.
There are up to 3 kinematic chains, given the specifications and the hardware:
Definition at line 1175 of file hekRobot.cxx.
References hekateros::HekSpec::getJointSpecAt(), hekateros::HekSpec::getServoSpec(), hekateros::HekSpec::m_nDoF, hekateros::HekSpecJoint_T::m_nMasterServoId, hekateros::HekDescEE::m_spec, and hekateros::HekDescArm::m_spec.
|
protected |
Create the asynchronous thread.
Definition at line 1635 of file hekRobot.cxx.
|
protected |
Determine robot operational state from collective joint operational states.
Definition at line 1620 of file hekRobot.cxx.
| int HekRobot::disconnect | ( | ) |
Disconnect from Hekateros.
Definition at line 394 of file hekRobot.cxx.
| int HekRobot::estop | ( | ) |
Emergency stop.
All servos will stop driving, so arm or accessories may fall. Emergency stop requires recalibration.
Definition at line 771 of file hekRobot.cxx.
References HEK_TRY_CONN, and HEK_TRY_NO_EXEC.
|
protected |
Faux calibrate Hekateros.
Definition at line 1397 of file hekRobot.cxx.
| int HekRobot::freeze | ( | ) |
Freeze arm and accessories at current position.
Servos are still being driven.
Definition at line 794 of file hekRobot.cxx.
References HEK_TRY_CONN, and HEK_TRY_NO_EXEC.
|
inline |
Get robotic joint in arm+ee kinematic chain.
| strName | Joint name (key). |
Definition at line 610 of file hekRobot.h.
References m_imapJoints, and m_jointsArm.
|
inline |
Get robotic joint in arm+ee kinematic chain.
| nServoId | Master servo id (primary key). |
Definition at line 631 of file hekRobot.h.
References m_jointsArm.
|
inline |
Get robotic joint in arm+ee kinematic chain at the given index.
| index | Joint index. |
Definition at line 598 of file hekRobot.h.
References m_jointsArm.
| int HekRobot::getAsyncRc | ( | ) |
Get the last asynchronous task return code.
Definition at line 1704 of file hekRobot.cxx.
Referenced by setRobotMode().
| HekAsyncTaskState HekRobot::getAsyncState | ( | ) |
Get the current asynchronous task state.
Definition at line 1699 of file hekRobot.cxx.
Referenced by setRobotMode().
|
inline |
Get the dynamixel chain object.
Definition at line 570 of file hekRobot.h.
References m_pDynaChain.
|
inline |
Get the Hekateros full brief descirption.
Definition at line 488 of file hekRobot.h.
References hekateros::HekDesc::getFullProdBrief(), and m_descHek.
|
inline |
Get the Hekateros product description.
Definition at line 456 of file hekRobot.h.
References m_descHek.
| int HekRobot::getJointState | ( | HekJointStatePoint & | jointStatePoint | ) |
Get the joint states of a kinematic chain.
| [in,out] | jointStatePoint | Joint state point. |
Definition at line 979 of file hekRobot.cxx.
References hekateros::HekJointStatePoint::append(), hekateros::HekJointStatePoint::clear(), HEK_TRY_CONN, HEK_TRY_GET_SERVO, hekateros::HekRobotJoint::m_eOpState, hekateros::HekJointState::m_eOpState, hekateros::HekJointState::m_eOptSwitch, hekateros::HekJointState::m_fEffort, hekateros::HekJointState::m_fPosition, hekateros::HekJointState::m_fVelocity, hekateros::HekJointState::m_nEncPos, hekateros::HekJointState::m_nMasterServoId, hekateros::HekJointState::m_nOdPos, hekateros::HekRobotJoint::m_nSlaveServoId, hekateros::HekJointState::m_nSlaveServoId, hekateros::HekJointState::m_nSpeed, hekateros::HekRobotJoint::m_strName, hekateros::HekJointState::m_strName, and hekateros::HekJointStatePoint::setKinematicChainName().
Referenced by resetEStop().
|
inline |
Get robotic joint's master servo.
| joint | Robotic joint. |
Definition at line 652 of file hekRobot.h.
References hekateros::HekRobotJoint::m_nMasterServoId, and m_pDynaChain.
|
inline |
Convenience function to get this Hekateros description's base product id.
Definition at line 467 of file hekRobot.h.
References hekateros::HekDesc::getArmDesc(), hekateros::HekDescArm::getProdId(), and m_descHek.
|
inline |
Convenience function to get this Hekateros description's base product name.
Definition at line 478 of file hekRobot.h.
References hekateros::HekDesc::getArmDesc(), hekateros::HekDescArm::getProdName(), and m_descHek.
| int HekRobot::getRobotState | ( | HekRobotState & | robotState | ) |
Get the robot current state.
| [in,out] | robotState | Robot state. |
< stopped speed
Definition at line 904 of file hekRobot.cxx.
References hekateros::HekRobotState::clear(), hekateros::iabs(), hekateros::HekRobotState::m_eAreDrivesPowered, hekateros::HekRobotState::m_eIsCalibrated, hekateros::HekRobotState::m_eIsEStopped, hekateros::HekRobotState::m_eIsInError, hekateros::HekRobotState::m_eIsInMotion, hekateros::HekRobotState::m_eIsMotionPossible, hekateros::HekRobotState::m_eRobotMode, hekateros::HekServoHealth::m_fTemperature, hekateros::HekServoHealth::m_fVoltage, hekateros::HekRobotState::m_nErrorCode, hekateros::HekServoHealth::m_nServoId, hekateros::HekServoHealth::m_uAlarms, and hekateros::HekRobotState::m_vecServoHealth.
Referenced by resetEStop().
|
inline |
Get trajectory parameters.
| [out] | eNorm | Distance norm. |
| [out] | fEpsilon | Waypoint precision (radians) |
Definition at line 581 of file hekRobot.h.
References hekateros::HekTunes::getTrajectoryParams(), and m_tunes.
| int HekRobot::getTrajectoryState | ( | HekJointTrajectoryFeedback & | trajectoryFeedback | ) |
Get trajectory feedback.
| [in,out] | trajectoryFeedback | Joint state point. |
Definition at line 1035 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryFeedback::clear(), and hekateros::HekJointStatePoint::getNumPoints().
Referenced by resetEStop().
|
inline |
Get the Hekateros robotic arm hardware version numbers.
| [out] | nVerMajor | Major version number. |
| [out] | nVerMinor | Minor version number. |
| [out] | nVerRevision | Revision version number. |
Definition at line 419 of file hekRobot.h.
References hekateros::HekDesc::getArmDesc(), hekateros::HekDescArm::getProdHwVer(), HEK_VER_MAJOR, HEK_VER_MINOR, HEK_VER_REV, m_descHek, and hekateros::strToVersion().
|
inline |
Get the Hekateros robotic arm hardware version string.
Version number strings are of the dotted form maj.min.rev.
Definition at line 446 of file hekRobot.h.
References hekateros::HekDesc::getArmDesc(), hekateros::HekDescArm::getProdHwVer(), and m_descHek.
|
inline |
Get the Hekateros robotic arm hardware version compact number.
Definition at line 434 of file hekRobot.h.
References hekateros::HekDesc::getArmDesc(), hekateros::HekDescArm::getProdHwVer(), m_descHek, and hekateros::strToVersion().
| int HekRobot::gotoBalancedPos | ( | ) |
Move robotic arm to its pre-defined balanced position.
Definition at line 513 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryPoint::append(), hekateros::degToRad(), HEK_TRY_CALIB, HEK_TRY_CONN, HEK_TRY_NOT_ESTOP, hekateros::HekRobotJoint::m_fBalPosRads, and hekateros::HekRobotJoint::m_strName.
| int HekRobot::gotoParkedPos | ( | ) |
Move robotic arm to its pre-defined parked position.
See discussion at gotoBalancedPos about pre-defined movements.
Definition at line 578 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryPoint::append(), hekateros::degToRad(), HEK_TRY_CALIB, HEK_TRY_CONN, HEK_TRY_NOT_ESTOP, hekateros::HekRobotJoint::m_fParkPosRads, and hekateros::HekRobotJoint::m_strName.
| int HekRobot::gotoZeroPtPos | ( | ) |
Move robotic arm to its pre-defined calibrated zero point position.
See discussion at gotoBalancedPos about pre-defined movements.
Definition at line 643 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryPoint::append(), hekateros::degToRad(), HEK_TRY_CALIB, HEK_TRY_CONN, HEK_TRY_NOT_ESTOP, hekateros::HekRobotJoint::m_fCalibPosRads, and hekateros::HekRobotJoint::m_strName.
|
inline |
Test if robot is alarmed.
Definition at line 538 of file hekRobot.h.
References hekateros::HekMonitor::getAlarmCond(), m_bAlarmState, and m_monitor.
|
inline |
Test if robot is as pre-defined balanced position.
Definition at line 550 of file hekRobot.h.
References m_bAtBalancedPos.
|
inline |
Test if robot is as pre-defined parked position.
Definition at line 560 of file hekRobot.h.
References m_bAtParkedPos.
|
inline |
Test if robot is calibrated.
Definition at line 508 of file hekRobot.h.
References hekateros::HekOpStateCalibrated, and m_eOpState.
|
inline |
Test if connected to Hekateros hardware.
Definition at line 407 of file hekRobot.h.
References m_pDynaComm.
|
inline |
Test if robot is fully described via configuration XML.
Definition at line 498 of file hekRobot.h.
References hekateros::HekDesc::isDescribed(), and m_descHek.
|
inline |
Test if robot is current emergency stopped.
Definition at line 518 of file hekRobot.h.
References m_bIsEStopped.
| bool HekRobot::isInMotion | ( | ) |
Test if any joint in any of the kinematic chains is moving.
< stopped speed
Definition at line 1067 of file hekRobot.cxx.
References hekateros::iabs().
Referenced by setRobotMode().
|
inlineprotected |
Lock the robot mutex.
The lock()/unlock() primitives provide thread-safe access.
Definition at line 980 of file hekRobot.h.
| int HekRobot::moveArm | ( | HekJointTrajectoryPoint & | trajectoryPoint | ) |
Move arm through trajectory point.
| trajectoryPoint | Trajectory end point. |
Definition at line 880 of file hekRobot.cxx.
References HEK_TRY_CALIB, HEK_TRY_CONN, and HEK_TRY_NOT_ESTOP.
Referenced by resetEStop().
|
protected |
Move servo to position.
This call blocks until move is complete.
| pServo | Pointer to servo. |
| nOdGoalPos | Goal position in raw odometer units. |
| nSpeed | Speed in raw units. |
|
protected |
Move wrist rotation for any necessary final position adjustments.
The wrist coupled pitch and rotation joints can have their respective goal trajectories change by various actions.
| int HekRobot::openGripper | ( | ) |
Open gripper to its maximum opened position.
Definition at line 707 of file hekRobot.cxx.
References hekateros::HekJointTrajectoryPoint::append(), hekateros::degToRad(), HEK_TRY_CALIB, HEK_TRY_CONN, HEK_TRY_NOT_ESTOP, hekateros::HekRobotJoint::m_fMaxSoftLimitRads, and hekateros::HekRobotJoint::m_strName.
|
inline |
Convert percent of maximum to joint velocity.
The maximum joint velocity is the theoretical maximum joint velocity based on joint servo specs of unloaded maximum RPMs and the Hekateros external gear ratios.
| joint | Joint description. |
| fValPct | Joint velocity (%). |
Definition at line 670 of file hekRobot.h.
References hekateros::HekRobotJoint::m_fMaxJointRadsPerSec.
| int HekRobot::release | ( | ) |
Release arm and accessories.
Servos will stop driving, so the arm may fall. This call is assumed to be under control, so recalibration is not required. Typically, the arm is released during manual repositioning or teaching.
Definition at line 812 of file hekRobot.cxx.
References HEK_TRY_CONN, and HEK_TRY_NO_EXEC.
| void HekRobot::reload | ( | ) |
Reload Hekateros's reloadable configuration and reset operational parameters.
The robot connection and calibration states are uneffected.
Definition at line 499 of file hekRobot.cxx.
References hekateros::HekXmlTune::load().
|
protected |
Mark all relevant joints for recalibration.
| bForceRecalib | If true, force recalibration all joints. Otherwise calibrate only the uncalibrated. |
Definition at line 1607 of file hekRobot.cxx.
|
inline |
Reset (clears) emergency stop condition.
Definition at line 309 of file hekRobot.h.
References getJointState(), getRobotState(), getTrajectoryState(), m_bIsEStopped, m_monitor, hekateros::HekMonitor::markEStopCond(), and moveArm().
|
protected |
Scan Hekateros dynamixel bus hardware and match against description.
| nMaxTries | Maximums number of scan attempts before failing. |
Definition at line 1090 of file hekRobot.cxx.
|
protected |
Scan Hekateros hardware and match against description.
|
protected |
Set all joint goals to a null trajectory.
A null trajectory for a joint is the joint's current position and zero velocity.
|
protected |
Set a set of joint goals to a null trajectory.
A null trajectory for a joint is the joint's current position and zero velocity.
| vecNames | Vector of joint names. |
|
protected |
Set joint goal to null a trajectory.
A null trajectory for a joint is the joint's current position and zero velocity.
| strName | Joint name. |
|
inline |
Set robot's operational mode.
Definition at line 361 of file hekRobot.h.
References cancelAsyncTask(), getAsyncRc(), getAsyncState(), isInMotion(), and m_eRobotMode.
| int HekRobot::stop | ( | const std::vector< std::string > & | vecNames | ) |
Stops specified joints at current position.
Servos are still being driven.
| vecNames | Vector of joint names. |
the number of joints stopped. the number of joints stopped.
Definition at line 830 of file hekRobot.cxx.
References HEK_TRY_CONN, HEK_TRY_NO_EXEC, and HEK_TRY_NOT_ESTOP.
|
protected |
Wait for the specified joints to stop moving.
A maximum number of wait-test tries is performed until either all of the joints haved stopped or the maximum number of tries has been reached. The between-test wait is 10 milliseconds.
| vecNames | Vector of joint names. |
| nMaxTries | Maximum number of test-wait tries. |
|
inlineprotected |
Try to lock the robot mutex.
Definition at line 1004 of file hekRobot.h.
|
inlineprotected |