Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project
hekateros::HekJointState Class Reference

Joint state class. More...

#include <hekJoint.h>

Public Member Functions

 HekJointState ()
 Default constructor.
 
 HekJointState (const HekJointState &src)
 Copy constructor.
 
 ~HekJointState ()
 Destructor.
 
HekJointState operator= (const HekJointState &rhs)
 Assignment operator. More...
 

Public Attributes

std::string m_strName
 joint name
 
HekOpState m_eOpState
 joint operational state
 
int m_nMasterServoId
 master servo id
 
int m_nSlaveServoId
 linked slave servo id (if any)
 
double m_fPosition
 current joint position (radians)
 
double m_fVelocity
 current joint velocity (% of max)
 
double m_fEffort
 current joint effort (servo load)
 
int m_nOdPos
 current master servo odometer pos (ticks)
 
int m_nEncPos
 current master servo encoder pos (ticks)
 
int m_nSpeed
 current master servo raw speed (unitless)
 
HekTriState m_eOptSwitch [HekOptLimitMaxPerJoint]
 current state of optical switch(es)
 

Detailed Description

Joint state class.

This class encapsulates the current state of one joint.

Definition at line 287 of file hekJoint.h.

Member Function Documentation

HekJointState HekJointState::operator= ( const HekJointState rhs)

Assignment operator.

Parameters
rhsRight hand side object.
Returns
Returns copy of this.

Definition at line 259 of file hekJoint.cxx.

References m_eOpState, m_eOptSwitch, m_fEffort, m_fPosition, m_fVelocity, m_nEncPos, m_nMasterServoId, m_nOdPos, m_nSlaveServoId, m_nSpeed, and m_strName.

260 {
261  m_strName = rhs.m_strName;
262  m_eOpState = rhs.m_eOpState;
265  m_fPosition = rhs.m_fPosition;
266  m_fVelocity = rhs.m_fVelocity;
267  m_fEffort = rhs.m_fEffort;
268  m_nOdPos = rhs.m_nOdPos;
269  m_nEncPos = rhs.m_nEncPos;
270  m_nSpeed = rhs.m_nSpeed;
271 
272  for(int i=0; i<HekOptLimitMaxPerJoint; ++i)
273  {
274  m_eOptSwitch[i] = rhs.m_eOptSwitch[i];
275  }
276 
277  return *this;
278 }
int m_nOdPos
current master servo odometer pos (ticks)
Definition: hekJoint.h:323
int m_nSpeed
current master servo raw speed (unitless)
Definition: hekJoint.h:325
double m_fPosition
current joint position (radians)
Definition: hekJoint.h:320
double m_fVelocity
current joint velocity (% of max)
Definition: hekJoint.h:321
HekOpState m_eOpState
joint operational state
Definition: hekJoint.h:317
int m_nMasterServoId
master servo id
Definition: hekJoint.h:318
std::string m_strName
joint name
Definition: hekJoint.h:316
static const int HekOptLimitMaxPerJoint
max limits/joint
Definition: hekOptical.h:120
int m_nSlaveServoId
linked slave servo id (if any)
Definition: hekJoint.h:319
double m_fEffort
current joint effort (servo load)
Definition: hekJoint.h:322
int m_nEncPos
current master servo encoder pos (ticks)
Definition: hekJoint.h:324
HekTriState m_eOptSwitch[HekOptLimitMaxPerJoint]
current state of optical switch(es)
Definition: hekJoint.h:326

The documentation for this class was generated from the following files: