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

Joint trajectory point class. More...

#include <hekTraj.h>

Public Member Functions

 HekJointTrajectoryPoint ()
 Default constructor.
 
 HekJointTrajectoryPoint (const HekJointTrajectoryPoint &src)
 Copy constructor.
 
 ~HekJointTrajectoryPoint ()
 Destructor.
 
HekJointTrajectoryPoint operator= (const HekJointTrajectoryPoint &rhs)
 Assignment operator. More...
 
uint_t getTimeFromStart ()
 Get time from start. More...
 
void setTimeFromStart (uint_t uTimeFromStart)
 Set time from start. More...
 
size_t getNumPoints ()
 Get the number of joint points in trajectory. More...
 
void append (const std::string &strName, double fPosition, double fVelocity, double fAcceleration=0.0)
 Append joint point to end of trajectory. More...
 
HekJointTrajoperator[] (const size_t i)
 Subscript operator to get reference to joint point at the given index. More...
 
void clear ()
 Clear data.
 

Protected Attributes

std::vector< HekJointTrajm_trajectory
 trajectory
 
uint_t m_uTimeFromStart
 duration
 

Detailed Description

Joint trajectory point class.

A joint trajectory point (T0, T1, ..., Tn-1) specifies the goal position, velocity, and acceleration for a set of joints (kinematic chain) Ti, i=0,n-1.

Definition at line 180 of file hekTraj.h.

Member Function Documentation

void hekateros::HekJointTrajectoryPoint::append ( const std::string &  strName,
double  fPosition,
double  fVelocity,
double  fAcceleration = 0.0 
)
inline

Append joint point to end of trajectory.

Parameters
strNameJoint name.
fPositionJoint position.
fVelocityJoint velocity.
fAccelerationJoint acceleration.

Definition at line 264 of file hekTraj.h.

Referenced by hekateros::HekRobot::closeGripper(), hekateros::HekRobot::gotoBalancedPos(), hekateros::HekRobot::gotoParkedPos(), hekateros::HekRobot::gotoZeroPtPos(), and hekateros::HekRobot::openGripper().

268  {
269  HekJointTraj jointPoint(strName, fPosition, fVelocity, fAcceleration);
270  m_trajectory.push_back(jointPoint);
271  }
std::vector< HekJointTraj > m_trajectory
trajectory
Definition: hekTraj.h:298
size_t hekateros::HekJointTrajectoryPoint::getNumPoints ( )
inline

Get the number of joint points in trajectory.

Returns
Number of points.

Definition at line 251 of file hekTraj.h.

Referenced by hekateros::HekKinematics::move().

252  {
253  return m_trajectory.size();
254  }
std::vector< HekJointTraj > m_trajectory
trajectory
Definition: hekTraj.h:298
uint_t hekateros::HekJointTrajectoryPoint::getTimeFromStart ( )
inline

Get time from start.

Todo:
TODO need to understand ROS meaning of this.
Returns
Duration.

Definition at line 229 of file hekTraj.h.

230  {
231  return m_uTimeFromStart;
232  }
uint_t m_uTimeFromStart
duration
Definition: hekTraj.h:299
HekJointTrajectoryPoint hekateros::HekJointTrajectoryPoint::operator= ( const HekJointTrajectoryPoint rhs)
inline

Assignment operator.

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

Definition at line 214 of file hekTraj.h.

References m_trajectory, and m_uTimeFromStart.

215  {
216  m_uTimeFromStart = rhs.m_uTimeFromStart;
217  m_trajectory = rhs.m_trajectory;
218 
219  return *this;
220  }
std::vector< HekJointTraj > m_trajectory
trajectory
Definition: hekTraj.h:298
uint_t m_uTimeFromStart
duration
Definition: hekTraj.h:299
HekJointTraj& hekateros::HekJointTrajectoryPoint::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 point.

Definition at line 283 of file hekTraj.h.

284  {
285  return m_trajectory[i];
286  }
std::vector< HekJointTraj > m_trajectory
trajectory
Definition: hekTraj.h:298
void hekateros::HekJointTrajectoryPoint::setTimeFromStart ( uint_t  uTimeFromStart)
inline

Set time from start.

Todo:
TODO need to understand ROS meaning of this.
Parameters
uTimeFromStartDuration.

Definition at line 241 of file hekTraj.h.

242  {
243  m_uTimeFromStart = uTimeFromStart;
244  }
uint_t m_uTimeFromStart
duration
Definition: hekTraj.h:299

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