Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
kuon::KuonWheelTrajectoryPoint Class Reference

Wheel trajectory point class. More...

#include <kuonTraj.h>

Public Member Functions

 KuonWheelTrajectoryPoint ()
 Default constructor.
 
 KuonWheelTrajectoryPoint (const KuonWheelTrajectoryPoint &src)
 Copy constructor.
 
 ~KuonWheelTrajectoryPoint ()
 Destructor.
 
KuonWheelTrajectoryPoint operator= (const KuonWheelTrajectoryPoint &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 wheel points in trajectory. More...
 
void append (const std::string &strName, double fPosition, double fVelocity, double fAcceleration=0.0)
 Append wheel point to end of trajectory. More...
 
KuonWheelTrajoperator[] (const size_t i)
 Subscript operator to get reference to wheel point at the given index. More...
 
void clear ()
 Clear data.
 

Protected Attributes

std::vector< KuonWheelTrajm_trajectory
 trajectory
 
uint_t m_uTimeFromStart
 duration
 

Detailed Description

Wheel trajectory point class.

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

Definition at line 186 of file kuonTraj.h.

Member Function Documentation

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

Append wheel point to end of trajectory.

Parameters
strNameWheel name.
fPositionWheel position.
fVelocityWheel velocity.
fAccelerationWheel acceleration.

Definition at line 270 of file kuonTraj.h.

274  {
275  KuonWheelTraj jointPoint(strName, fPosition, fVelocity, fAcceleration);
276  m_trajectory.push_back(jointPoint);
277  }
std::vector< KuonWheelTraj > m_trajectory
trajectory
Definition: kuonTraj.h:304
size_t kuon::KuonWheelTrajectoryPoint::getNumPoints ( )
inline

Get the number of wheel points in trajectory.

Returns
Number of points.

Definition at line 257 of file kuonTraj.h.

258  {
259  return m_trajectory.size();
260  }
std::vector< KuonWheelTraj > m_trajectory
trajectory
Definition: kuonTraj.h:304
uint_t kuon::KuonWheelTrajectoryPoint::getTimeFromStart ( )
inline

Get time from start.

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

Definition at line 235 of file kuonTraj.h.

236  {
237  return m_uTimeFromStart;
238  }
uint_t m_uTimeFromStart
duration
Definition: kuonTraj.h:305
KuonWheelTrajectoryPoint kuon::KuonWheelTrajectoryPoint::operator= ( const KuonWheelTrajectoryPoint rhs)
inline

Assignment operator.

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

Definition at line 220 of file kuonTraj.h.

References m_trajectory, and m_uTimeFromStart.

221  {
222  m_uTimeFromStart = rhs.m_uTimeFromStart;
223  m_trajectory = rhs.m_trajectory;
224 
225  return *this;
226  }
std::vector< KuonWheelTraj > m_trajectory
trajectory
Definition: kuonTraj.h:304
uint_t m_uTimeFromStart
duration
Definition: kuonTraj.h:305
KuonWheelTraj& kuon::KuonWheelTrajectoryPoint::operator[] ( const size_t  i)
inline

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

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

Parameters
iIndex.
Returns
Wheel point.

Definition at line 289 of file kuonTraj.h.

290  {
291  return m_trajectory[i];
292  }
std::vector< KuonWheelTraj > m_trajectory
trajectory
Definition: kuonTraj.h:304
void kuon::KuonWheelTrajectoryPoint::setTimeFromStart ( uint_t  uTimeFromStart)
inline

Set time from start.

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

Definition at line 247 of file kuonTraj.h.

248  {
249  m_uTimeFromStart = uTimeFromStart;
250  }
uint_t m_uTimeFromStart
duration
Definition: kuonTraj.h:305

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