Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project

The Hekateros namespace encapsulates all Hekateros related constructs. More...

Classes

class  HekCalib
 Hekateros robotic manipulator calibration abstract base class. More...
 
class  HekCalibStretch
 Hekateros robotic manipulator calibration by stretching class. More...
 
class  HekDesc
 Hekateros robotic manipulator full description class. More...
 
class  HekDescArm
 Hekateros robotic arm (manipulator) description class. More...
 
class  HekDescEE
 Hekateros end effector tool description class. More...
 
class  HekJointOptical
 Operational robotic joint optical limits class. More...
 
class  HekJointState
 Joint state class. More...
 
class  HekJointStatePoint
 Joint state point class. More...
 
class  HekJointTraj
 Joint trajectory class. More...
 
class  HekJointTrajectoryFeedback
 Joint trajectory feedback class. More...
 
class  HekJointTrajectoryPoint
 Joint trajectory point class. More...
 
class  HekKinematics
 
class  HekKinJoint
 Hekateros powered joint dynamics and kinematics control class. More...
 
class  HekKinJointWristRot
 Special wrist rotation joint kinematics and dynamics class. More...
 
class  HekMonitor
  Hekateros power, joint limits, and alarm monitoring class. More...
 
struct  HekOpticalLimit_T
 Optical limit switch. More...
 
class  HekPid
 
class  HekRobot
 Hekateros robotic manipulator plus accesories class. More...
 
class  HekRobotJoint
 Operational robotic joint description class. More...
 
class  HekRobotState
 Robot overall state. More...
 
class  HekServoHealth
 Robot servo health. More...
 
class  HekSpec
 Robotic specification. More...
 
struct  HekSpecJoint_T
 Robotic joint specification. More...
 
struct  HekSpecLink_T
 Robotic link specification. More...
 
struct  HekSpecServo_T
 Robotic servo specification. More...
 
class  HekSysBoard
 
class  HekTunes
 Hekateros tuning data class. More...
 
class  HekTunesJoint
 Hekateros tuning per joint data class. More...
 
class  HekUno
 
class  HekXmlCfg
 HekXmlCfg Hekateros XML configuration class. More...
 
class  HekXmlTune
 HekXmlTune Hekateros XML tuning class. More...
 
class  SyncMoveMsgs
 Container class to hold Dynamixel synchronous messages data. More...
 
class  VelSpeedLookupTbl
 Joint velocity/ servo speed lookup table class. More...
 
class  VelSpeedTuple
 Joint velocity to servo speed tuple class. More...
 

Functions

static byte_t getDarkOpticalLimits (byte_t byBits, byte_t byMask)
 Test if any of the optical limits have been triggered (occluded). More...
 
static byte_t getLitOpticalLimits (byte_t byBits, byte_t byMask)
 Test if any of the optical limits are lit (not occluded). More...
 
uint_t strToVersion (const std::string &str)
 Convert version dotted string to integer equivalent. More...
 
const char * getStrError (const int ecode)
 Get the error string describing the Hekateros error code. More...
 
const char * boolstr (bool b)
 Boolean to string. More...
 
double degToRad (double d)
 Convert degrees to radians. More...
 
double radToDeg (double r)
 Convert radians to degrees. More...
 
int iabs (int a)
 Integer absolute value. More...
 
double fcap (double a, double min, double max)
 Cap value within limits [min, max]. More...
 
int cap (int a, int min, int max)
 Cap value within limits [min, max]. More...
 
double signof (double a)
 Sign of a. More...
 
int signof (int a)
 Sign of a. More...
 
bool operator< (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time is earlier than the right hand side time. More...
 
bool operator== (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time equals the right hand side time. More...
 
bool operator> (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time is later than the right hand side time. More...
 
struct timeval operator+ (const struct timeval &op1, const struct timeval &op2)
 Addition operator. More...
 
struct timeval operator- (const struct timeval &op1, const struct timeval &op2)
 Subtraction operator. More...
 
long dt_usec (struct timeval &t1, struct timeval &t0)
 Calculate delta time in microseconds. More...
 
double dt (struct timeval &t1, struct timeval &t0)
 Calculate delta time. More...
 
bool operator< (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time is earlier than the right hand side time. More...
 
bool operator== (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time equals the right hand side time. More...
 
bool operator> (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time is later than the right hand side time. More...
 
struct timespec operator+ (const struct timespec &op1, const struct timespec &op2)
 Addition operator. More...
 
struct timespec operator- (const struct timespec &op1, const struct timespec &op2)
 Subtraction operator. More...
 
long long dt_nsec (struct timespec &t1, struct timespec &t0)
 Calculate delta time in nanoseconds. More...
 
double dt (struct timespec &t1, struct timespec &t0)
 Calculate delta time. More...
 
std::string getRealDeviceName (const std::string &strDevName)
 Get real device name. More...
 
std::vector< std::string > & split (const std::string &s, char delim, std::vector< std::string > &elems)
 Split string at the delimiter character. More...
 
std::vector< std::string > split (const std::string &s, char delim)
 Split string at the delimiter character. More...
 

Detailed Description

The Hekateros namespace encapsulates all Hekateros related constructs.

Function Documentation

const char* hekateros::boolstr ( bool  b)
inline

Boolean to string.

Parameters
bBoolean value.
Returns
Pointer to null-terminated constant character string.

Definition at line 108 of file hekUtils.h.

Referenced by hekateros::HekKinJoint::resetServoOdometer().

109  {
110  return b? "true": "false";
111  }
int hekateros::cap ( int  a,
int  min,
int  max 
)
inline

Cap value within limits [min, max].

Parameters
aValue.
minMinimum.
maxMaximum.
Returns
a: min ≤ a ≤ max

Definition at line 177 of file hekUtils.h.

Referenced by hekateros::HekKinJoint::addServoMsgEntries(), hekateros::HekKinJoint::estimateServoTgtSpeedSimple(), hekateros::VelSpeedLookupTbl::hash(), and hekateros::HekKinJoint::moveServo().

178  {
179  return a<min? min: a>max? max: a;
180  }
double hekateros::dt ( struct timeval &  t1,
struct timeval &  t0 
)

Calculate delta time.

t1 - t0

Parameters
t1Time 1.
t0Time 0.
Returns
Returns dt as a double. May be negative.

Referenced by hekateros::HekKinJoint::delta_t(), and signof().

double hekateros::dt ( struct timespec &  t1,
struct timespec &  t0 
)

Calculate delta time.

t1 - t0

Parameters
t1Time 1.
t0Time 0.
Returns
Returns dt as a double. May be negative.
long long hekateros::dt_nsec ( struct timespec &  t1,
struct timespec &  t0 
)

Calculate delta time in nanoseconds.

t1 - t0, t1 ≥ t0

Parameters
t1Later time.
t0Earlier time.
Returns
Returns dt in nanoseconds.

Referenced by signof().

long hekateros::dt_usec ( struct timeval &  t1,
struct timeval &  t0 
)

Calculate delta time in microseconds.

t1 - t0, t1 ≥ t0

Parameters
t1Later time.
t0Earlier time.
Returns
Returns dt in microseconds.

Referenced by signof().

double hekateros::fcap ( double  a,
double  min,
double  max 
)
inline

Cap value within limits [min, max].

Parameters
aValue.
minMinimum.
maxMaximum.
Returns
a: min ≤ a ≤ max

Definition at line 163 of file hekUtils.h.

Referenced by hekateros::HekRobot::addRobotJoint(), hekateros::HekKinematics::setHz(), and hekateros::HekPid::toOutput().

164  {
165  return a<min? min: a>max? max: a;
166  }
std::string hekateros::getRealDeviceName ( const std::string &  strDevName)

Get real device name.

If the given device name is a symbolic link, then the real device the link references is returned. Otherwise the given device name is returned.

Parameters
strDevNameGiven device name.
Returns
String.

Referenced by hekateros::HekRobot::connect(), and signof().

const char* hekateros::getStrError ( const int  ecode)

Get the error string describing the Hekateros error code.

The absolute value of the error code is taken prior retrieving the string. An unknown or out-of-range error code will be mapped to HEK_ECODE_BADEC.

Parameters
ecodeInstance of Hekateros Error Codes.
Returns
Returns the appropriate error code string.
int hekateros::iabs ( int  a)
inline
struct timeval hekateros::operator+ ( const struct timeval &  op1,
const struct timeval &  op2 
)

Addition operator.

op1 + op2

Parameters
op1Left hand side time.
op2Right hand side time.
Returns
Sum of times.
struct timespec hekateros::operator+ ( const struct timespec &  op1,
const struct timespec &  op2 
)

Addition operator.

op1 + op2

Parameters
op1Left hand side time.
op2Right hand side time.
Returns
Sum of times.
struct timeval hekateros::operator- ( const struct timeval &  op1,
const struct timeval &  op2 
)

Subtraction operator.

op1 - op2, op1 ≥ op2.

Parameters
op1Left hand side time.
op2Right hand side time.
Returns
Difference of times.
struct timespec hekateros::operator- ( const struct timespec &  op1,
const struct timespec &  op2 
)

Subtraction operator.

op1 - op2, op1 ≥ op2.

Parameters
op1Left hand side time.
op2Right hand side time.
Returns
Difference of times.
bool hekateros::operator< ( const struct timeval &  lhs,
const struct timeval &  rhs 
)

Compare operator to test if left hand side time is earlier than the right hand side time.

lhs < rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.

Referenced by signof().

bool hekateros::operator< ( const struct timespec &  lhs,
const struct timespec &  rhs 
)

Compare operator to test if left hand side time is earlier than the right hand side time.

lhs < rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.
bool hekateros::operator== ( const struct timeval &  lhs,
const struct timeval &  rhs 
)

Compare operator to test if left hand side time equals the right hand side time.

lhs == rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.

Referenced by signof().

bool hekateros::operator== ( const struct timespec &  lhs,
const struct timespec &  rhs 
)

Compare operator to test if left hand side time equals the right hand side time.

lhs == rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.
bool hekateros::operator> ( const struct timeval &  lhs,
const struct timeval &  rhs 
)

Compare operator to test if left hand side time is later than the right hand side time.

lhs > rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.

Referenced by signof().

bool hekateros::operator> ( const struct timespec &  lhs,
const struct timespec &  rhs 
)

Compare operator to test if left hand side time is later than the right hand side time.

lhs > rhs

Parameters
lhsLeft hand side time.
rhsRight hand side time.
Returns
Returns true or false.
double hekateros::signof ( double  a)
inline

Sign of a.

Returns
Return 1.0 or -1.0.

Definition at line 187 of file hekUtils.h.

Referenced by hekateros::HekKinJoint::estimateServoTgtSpeed().

188  {
189  return a<0? -1.0: 1.0;
190  }
int hekateros::signof ( int  a)
inline

Sign of a.

Returns
Return 1 or -1.

Definition at line 197 of file hekUtils.h.

References dt(), dt_nsec(), dt_usec(), getRealDeviceName(), operator<(), operator==(), operator>(), and split().

198  {
199  return a<0? -1: 1;
200  }
std::vector<std::string>& hekateros::split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)

Split string at the delimiter character.

Parameters
sString to split.
delemDelimiter character.
[out]elemsVector of split strings.
Returns
Reference to vector of split strings.

Referenced by hekateros::HekXmlCfg::load(), hekateros::HekXmlTune::load(), and signof().

std::vector<std::string> hekateros::split ( const std::string &  s,
char  delim 
)

Split string at the delimiter character.

Parameters
sString to split.
delemDelimiter character.
Returns
Vector of split strings.
uint_t hekateros::strToVersion ( const std::string &  str)

Convert version dotted string to integer equivalent.

Parameters
strDotted version string "M[.m[.R]]".
Returns
Version number.

Referenced by hekateros::HekRobot::getVersion(), hekateros::HekRobot::getVersionNum(), hekateros::HekDescArm::HekDescArm(), and hekateros::HekDescEE::HekDescEE().