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

Robot fully-defined waypoint. More...

#include <laeTraj.h>

Public Member Functions

 LaeWaypoint ()
 Default constructor.
 
 LaeWaypoint (const LaePose &pose, const double fVelocity, const double fAcceleration, const std::string &strName="", const timespec_t &timeStart=StartImmediately)
 Initialization constructor. More...
 
 LaeWaypoint (const LaeWaypoint &src)
 Copy constructor. More...
 
 ~LaeWaypoint ()
 Destructor.
 
LaeWaypoint operator= (const LaeWaypoint &rhs)
 Assignment operator. More...
 
void get (std::string &strName, timespec_t &timeStart, LaePose &pose, double &fVelocity, double &fAcceleration)
 Get waypoint data. More...
 
timespec_t getStartTime ()
 Get waypoint navigation start time. More...
 
void setStartTime (timespec_t timeStart)
 Set waypoint navigation start time. More...
 
void clear ()
 Clear (reset) waypoint data.
 

Protected Attributes

std::string m_strName
 waypoint name
 
timespec_t m_timeStart
 time to start navigation
 
LaePose m_pose
 robot pose at waypoint
 
double m_fVelocity
 target velocity at waypoint (meters/s)
 
double m_fAcceleration
 target acceleration (meters/s^2)
 

Detailed Description

Robot fully-defined waypoint.

A waypoint specifies the goal pose (absolute x,y,theta position), plus the target velocity with the given acceleration at the destination. The waypoint is used in path navigation.

Each waypoint has an associtated name identifier and start time.

Definition at line 584 of file laeTraj.h.

Constructor & Destructor Documentation

laelaps::LaeWaypoint::LaeWaypoint ( const LaePose pose,
const double  fVelocity,
const double  fAcceleration,
const std::string &  strName = "",
const timespec_t timeStart = StartImmediately 
)

Initialization constructor.

Parameters
PoseRobot 2D pose (x,y,theta).
fVelocityRobot target velocity at waypoint (meters/second).
fAccelerationRobot target acceleration (meters/second^2).
strNameName of waypoint.
timeStartStart time to navigate to this waypoint.
LaeWaypoint::LaeWaypoint ( const LaeWaypoint src)

Copy constructor.

Parameters
srcSource object.

Definition at line 126 of file laeTraj.cxx.

References m_fAcceleration, m_fVelocity, and m_timeStart.

127  : m_pose(src.m_pose), m_strName(src.m_strName)
128 {
129  m_timeStart = src.m_timeStart;
130  m_fVelocity = src.m_fVelocity;
132 }
LaePose m_pose
robot pose at waypoint
Definition: laeTraj.h:674
std::string m_strName
waypoint name
Definition: laeTraj.h:672
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673
double m_fAcceleration
target acceleration (meters/s^2)
Definition: laeTraj.h:676
double m_fVelocity
target velocity at waypoint (meters/s)
Definition: laeTraj.h:675

Member Function Documentation

void LaeWaypoint::get ( std::string &  strName,
timespec_t timeStart,
LaePose pose,
double &  fVelocity,
double &  fAcceleration 
)

Get waypoint data.

Parameters
[out]strNameWaypoint name.
[out]timeStartWaypoint navigation start time.
[out]poseRobot 2D pose (x,y,theta).
[out]fVelocityTarget waypoint velocity (meters/second).
[out]fAccelerationTarget acceleration (meters/second^2).

Definition at line 145 of file laeTraj.cxx.

References m_fAcceleration, m_fVelocity, m_pose, m_strName, and m_timeStart.

150 {
151  strName = m_strName;
152  timeStart = m_timeStart;
153  pose = m_pose;
154  fVelocity = m_fVelocity;
155  fAcceleration = m_fAcceleration;
156 }
LaePose m_pose
robot pose at waypoint
Definition: laeTraj.h:674
std::string m_strName
waypoint name
Definition: laeTraj.h:672
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673
double m_fAcceleration
target acceleration (meters/s^2)
Definition: laeTraj.h:676
double m_fVelocity
target velocity at waypoint (meters/s)
Definition: laeTraj.h:675
timespec_t laelaps::LaeWaypoint::getStartTime ( )
inline

Get waypoint navigation start time.

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

Definition at line 650 of file laeTraj.h.

651  {
652  return m_timeStart;
653  }
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673
LaeWaypoint LaeWaypoint::operator= ( const LaeWaypoint rhs)

Assignment operator.

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

Definition at line 134 of file laeTraj.cxx.

References m_fAcceleration, m_fVelocity, m_pose, m_strName, and m_timeStart.

135 {
136  m_strName = rhs.m_strName;
137  m_timeStart = rhs.m_timeStart;
138  m_pose = rhs.m_pose;
139  m_fVelocity = rhs.m_fVelocity;
141 
142  return *this;
143 }
LaePose m_pose
robot pose at waypoint
Definition: laeTraj.h:674
std::string m_strName
waypoint name
Definition: laeTraj.h:672
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673
double m_fAcceleration
target acceleration (meters/s^2)
Definition: laeTraj.h:676
double m_fVelocity
target velocity at waypoint (meters/s)
Definition: laeTraj.h:675
void laelaps::LaeWaypoint::setStartTime ( timespec_t  timeStart)
inline

Set waypoint navigation start time.

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

Definition at line 661 of file laeTraj.h.

662  {
663  m_timeStart = timeStart;
664  }
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673

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