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

Wheel trajectory feedback class. More...

#include <kuonTraj.h>

Public Member Functions

 KuonWheelTrajectoryFeedback ()
 Default constructor.
 
 KuonWheelTrajectoryFeedback (const KuonWheelTrajectoryFeedback &src)
 Copy constructor.
 
 ~KuonWheelTrajectoryFeedback ()
 Destructor.
 
KuonWheelTrajectoryFeedback operator= (const KuonWheelTrajectoryFeedback &rhs)
 Assignment operator. More...
 
uint_t getTimeFromStart ()
 Get time from start of desired trajectory. More...
 
size_t getNumPoints ()
 Get the number of wheel points in trajectory. More...
 
KuonWheelTrajectoryPointoperator[] (const size_t i)
 Subscript operator to get reference to given trajectory. More...
 
void clear ()
 Clear data.
 

Static Public Attributes

static const int TRAJ_DESIRED = 0
 desired trajectory
 
static const int TRAJ_ACTUAL = 1
 actual trajectory
 
static const int TRAJ_NUMOF = 2
 number of trajectories
 

Protected Attributes

KuonWheelTrajectoryPoint m_trajectory [TRAJ_NUMOF]
 

Detailed Description

Wheel trajectory feedback class.

The feedback provides informaation about the last issued desired trajectory and the current trajectory.

Definition at line 319 of file kuonTraj.h.

Member Function Documentation

size_t kuon::KuonWheelTrajectoryFeedback::getNumPoints ( )
inline

Get the number of wheel points in trajectory.

Returns
Number of points.

Definition at line 383 of file kuonTraj.h.

384  {
385  return m_trajectory[TRAJ_DESIRED].getNumPoints();
386  }
size_t getNumPoints()
Get the number of wheel points in trajectory.
Definition: kuonTraj.h:257
static const int TRAJ_DESIRED
desired trajectory
Definition: kuonTraj.h:322
uint_t kuon::KuonWheelTrajectoryFeedback::getTimeFromStart ( )
inline

Get time from start of desired trajectory.

Returns
Duration.

Definition at line 373 of file kuonTraj.h.

374  {
375  return m_trajectory[TRAJ_DESIRED].getTimeFromStart();
376  }
uint_t getTimeFromStart()
Get time from start.
Definition: kuonTraj.h:235
static const int TRAJ_DESIRED
desired trajectory
Definition: kuonTraj.h:322
KuonWheelTrajectoryFeedback kuon::KuonWheelTrajectoryFeedback::operator= ( const KuonWheelTrajectoryFeedback rhs)
inline

Assignment operator.

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

Definition at line 358 of file kuonTraj.h.

360  {
361  for(int i = 0; i< TRAJ_NUMOF; ++i)
362  {
363  m_trajectory[i] = rhs.m_trajectory[i];
364  }
365  return *this;
366  }
std::vector< KuonWheelTraj > m_trajectory
trajectory
Definition: kuonTraj.h:304
static const int TRAJ_NUMOF
number of trajectories
Definition: kuonTraj.h:324
KuonWheelTrajectoryPoint& kuon::KuonWheelTrajectoryFeedback::operator[] ( const size_t  i)
inline

Subscript operator to get reference to given trajectory.

Parameters
iTrajectory point Index.
Returns
Trajectory.

Definition at line 395 of file kuonTraj.h.

396  {
397  return i < TRAJ_NUMOF? m_trajectory[i]: m_trajectory[TRAJ_DESIRED];
398  }
static const int TRAJ_NUMOF
number of trajectories
Definition: kuonTraj.h:324
static const int TRAJ_DESIRED
desired trajectory
Definition: kuonTraj.h:322

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