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

Joint state point class. More...

#include <hekJoint.h>

Public Member Functions

 HekJointStatePoint ()
 Default constructor.
 
 HekJointStatePoint (const HekJointStatePoint &src)
 Copy constructor.
 
 ~HekJointStatePoint ()
 Destructor.
 
HekJointStatePoint operator= (const HekJointStatePoint &rhs)
 Assignment operator. More...
 
std::string getKinematicChainName ()
 Get the kinematic chain name. More...
 
void setKinematicChainName (std::string strKinName)
 Set the kinematic chain name. More...
 
size_t getNumPoints ()
 Get the number of joint states in joint state point. More...
 
bool hasJoint (const std::string &strJointName)
 Test if joint is a member of the joint state. More...
 
void append (const HekJointState &jointState)
 Append joint state to end of joint state point. More...
 
HekJointStateoperator[] (const size_t i)
 Subscript operator to get reference to joint point at the given index. More...
 
HekJointStateoperator[] (const std::string &strJointName)
 Key subscript operator to get reference to joint point at the given index. More...
 
void clear ()
 Clear all state data.
 

Protected Attributes

std::string m_strKinName
 name of kinematic chain
 
std::vector< HekJointStatem_jointState
 vector of joint states
 

Detailed Description

Joint state point class.

This class encapsulates the current state of all joints in a kinematic chain.

A joint state point (J0, J1, ..., Jn-1) specifies the current dynamic state of a set of joints (kinematic chain) Ji, i=0,n-1.

Definition at line 344 of file hekJoint.h.

Member Function Documentation

void hekateros::HekJointStatePoint::append ( const HekJointState jointState)
inline

Append joint state to end of joint state point.

Parameters
jointStateJoint state to append.

Definition at line 429 of file hekJoint.h.

Referenced by hekateros::HekRobot::getJointState().

430  {
431  m_jointState.push_back(jointState);
432  }
std::vector< HekJointState > m_jointState
vector of joint states
Definition: hekJoint.h:472
std::string hekateros::HekJointStatePoint::getKinematicChainName ( )
inline

Get the kinematic chain name.

Returns
String.

Definition at line 390 of file hekJoint.h.

391  {
392  return m_strKinName;
393  }
std::string m_strKinName
name of kinematic chain
Definition: hekJoint.h:471
size_t hekateros::HekJointStatePoint::getNumPoints ( )
inline

Get the number of joint states in joint state point.

Returns
Number of points.

Definition at line 410 of file hekJoint.h.

Referenced by hekateros::HekRobot::getTrajectoryState().

411  {
412  return m_jointState.size();
413  }
std::vector< HekJointState > m_jointState
vector of joint states
Definition: hekJoint.h:472
bool HekJointStatePoint::hasJoint ( const std::string &  strJointName)

Test if joint is a member of the joint state.

Parameters
strJointNameJoint name.
Returns
Returns true or false.

Definition at line 287 of file hekJoint.cxx.

288 {
289  vector<HekJointState>::iterator iter;
290 
291  for(iter = m_jointState.begin(); iter != m_jointState.end(); ++iter)
292  {
293  if( iter->m_strName == strJointName )
294  {
295  return true;
296  }
297  }
298  return false;
299 }
std::vector< HekJointState > m_jointState
vector of joint states
Definition: hekJoint.h:472
HekJointStatePoint hekateros::HekJointStatePoint::operator= ( const HekJointStatePoint rhs)
inline

Assignment operator.

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

Definition at line 377 of file hekJoint.h.

References m_jointState, and m_strKinName.

378  {
379  m_strKinName = rhs.m_strKinName;
380  m_jointState = rhs.m_jointState;
381 
382  return *this;
383  }
std::string m_strKinName
name of kinematic chain
Definition: hekJoint.h:471
std::vector< HekJointState > m_jointState
vector of joint states
Definition: hekJoint.h:472
HekJointState& hekateros::HekJointStatePoint::operator[] ( const size_t  i)
inline

Subscript operator to get reference to joint point at the given index.

Big boy warranty. No out of bound checks are made.

Parameters
iIndex.
Returns
Joint state.

Definition at line 444 of file hekJoint.h.

445  {
446  return m_jointState[i];
447  }
std::vector< HekJointState > m_jointState
vector of joint states
Definition: hekJoint.h:472
HekJointState& hekateros::HekJointStatePoint::operator[] ( const std::string &  strJointName)

Key subscript operator to get reference to joint point at the given index.

Big boy warranty. No out of bound checks are made.

Parameters
strJointNameJoint name.
Returns
Joint state.
void hekateros::HekJointStatePoint::setKinematicChainName ( std::string  strKinName)
inline

Set the kinematic chain name.

Parameters
String.

Definition at line 400 of file hekJoint.h.

Referenced by hekateros::HekRobot::getJointState().

401  {
402  m_strKinName = strKinName;
403  }
std::string m_strKinName
name of kinematic chain
Definition: hekJoint.h:471

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