Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laelaps::LaeSimplePath Class Reference

Robot simple path class. More...

#include <laeTraj.h>

Public Member Functions

 LaeSimplePath ()
 Default constructor.
 
 LaeSimplePath (const LaeSimplePath &src)
 Copy constructor.
 
 ~LaeSimplePath ()
 Destructor.
 
LaeSimplePath operator= (const LaeSimplePath &rhs)
 Assignment operator. More...
 
timespec_t getStartTime ()
 Get navigation start time. More...
 
void setStartTime (timespec_t &timeStart)
 Set navigation start time. More...
 
size_t getNumPoints ()
 Get the number of wheel points in trajectory. More...
 
void append (LaePoint &ptDist, double fVelocity, double fAcceleration)
 Append wheel point to end of trajectory. More...
 
LaeSimpleWaypointoperator[] (const size_t i)
 Subscript operator to get reference to wheel point at the given index. More...
 
void clear ()
 Clear data.
 

Protected Attributes

timespec_t m_timeStart
 start time
 
std::vector< LaeSimpleWaypointm_path
 path
 

Detailed Description

Robot simple path class.

A simple path defines a set of waypoints from the robot's current position to the endpoint. Each waypoint defines a x,y distance, plus target velocity and acceleration.

A sequence of waypoints points Wp_i, i=0,n define a path.

Definition at line 382 of file laeTraj.h.

Member Function Documentation

void laelaps::LaeSimplePath::append ( LaePoint ptDist,
double  fVelocity,
double  fAcceleration 
)
inline

Append wheel point to end of trajectory.

Parameters
ptDistRobot goal distance (meters, meters).
fVelocityRobot goal velocity (meters/second).
fAccelerationRobot goal acceleration (meters/second^2).

Definition at line 462 of file laeTraj.h.

465  {
466  LaeSimpleWaypoint pt(ptDist, fVelocity, fAcceleration);
467  m_path.push_back(pt);
468  }
std::vector< LaeSimpleWaypoint > m_path
path
Definition: laeTraj.h:496
size_t laelaps::LaeSimplePath::getNumPoints ( )
inline

Get the number of wheel points in trajectory.

Returns
Number of points.

Definition at line 450 of file laeTraj.h.

451  {
452  return m_path.size();
453  }
std::vector< LaeSimpleWaypoint > m_path
path
Definition: laeTraj.h:496
timespec_t laelaps::LaeSimplePath::getStartTime ( )
inline

Get navigation start time.

Returns
Start time. Time is in seconds,nanoseconds from last Epoch.

Definition at line 429 of file laeTraj.h.

430  {
431  return m_timeStart;
432  }
timespec_t m_timeStart
start time
Definition: laeTraj.h:495
LaeSimplePath laelaps::LaeSimplePath::operator= ( const LaeSimplePath rhs)
inline

Assignment operator.

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

Definition at line 416 of file laeTraj.h.

References m_path, and m_timeStart.

417  {
418  m_timeStart = rhs.m_timeStart;
419  m_path = rhs.m_path;
420 
421  return *this;
422  }
timespec_t m_timeStart
start time
Definition: laeTraj.h:495
std::vector< LaeSimpleWaypoint > m_path
path
Definition: laeTraj.h:496
LaeSimpleWaypoint& laelaps::LaeSimplePath::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 480 of file laeTraj.h.

481  {
482  return m_path[i];
483  }
std::vector< LaeSimpleWaypoint > m_path
path
Definition: laeTraj.h:496
void laelaps::LaeSimplePath::setStartTime ( timespec_t timeStart)
inline

Set navigation start time.

Parameters
timeStartTime to start path navigation. Time is in seconds,nanoseconds from last Epoch.

Definition at line 440 of file laeTraj.h.

441  {
442  m_timeStart = timeStart;
443  }
timespec_t m_timeStart
start time
Definition: laeTraj.h:495

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