49 #include <sys/types.h> 57 #include "rnr/rnrconfig.h" 73 for(
int i = 0; i < TrajNumOf; ++i)
75 m_path[i] = src.m_path[i];
82 for(
int i = 0; i < TrajNumOf; ++i)
84 m_path[i] = rhs.m_path[i];
91 return i < TrajNumOf? m_path[i]: m_path[TrajDesired];
94 void LaeSimplePathFeedback::clear()
96 for(
int i = 0; i < TrajNumOf; ++i)
107 LaeWaypoint::LaeWaypoint()
109 m_timeStart = StartImmediately;
111 m_fAcceleration = 0.0;
114 LaeWaypoint::LaeWaypoint(
const LaePose &pose,
115 const double fVelocity,
116 const double fAcceleration,
117 const string &strName,
118 const timespec_t &timeStart)
119 : m_pose(pose), m_strName(strName)
121 m_timeStart = timeStart;
122 m_fVelocity = fVelocity;
123 m_fAcceleration = fAcceleration;
127 : m_pose(src.m_pose), m_strName(src.m_strName)
149 double &fAcceleration)
173 const double fVelocity,
174 const double fAcceleration,
175 const std::string &strName,
180 if( strName.empty() )
182 ss <<
"wp_" << m_path.size();
189 LaeWaypoint pt(pose, fVelocity, fAcceleration, ss.str(), timeStart);
190 m_path.push_back(pt);
202 m_path[i] = src.m_path[i];
210 m_path[i] = rhs.m_path[i];
Trajectory classes interfaces.
Robot fully-defined waypoint.
LaePose m_pose
robot pose at waypoint
static const int TrajDesired
Trajectory feedback identifiers (and indices).
LaeWaypoint operator=(const LaeWaypoint &rhs)
Assignment operator.
std::string m_strName
waypoint name
static const timespec_t StartImmediately
Start navigation immediately.
timespec_t m_timeStart
time to start navigation
static const int TrajNumOf
number of trajectories ids
Simple path feedback class.
struct timespec timespec_t
typedef'ed timespec structure
The <b><i>Laelaps</i></b> namespace encapsulates all <b><i>Laelaps</i></b> related constructs...
void get(std::string &strName, timespec_t &timeStart, LaePose &pose, double &fVelocity, double &fAcceleration)
Get waypoint data.
Laelaps common utilities.
Simple path feedback class.
double m_fAcceleration
target acceleration (meters/s^2)
double m_fVelocity
target velocity at waypoint (meters/s)
LaePath & operator[](const size_t i)
Subscript operator to get reference to given trajectory.
LaePathFeedback operator=(const LaePathFeedback &rhs)
Assignment operator.
LaePathFeedback()
Default constructor.
void append(const LaePose &pose, const double fVelocity, const double fAcceleration, const std::string &strName="", const timespec_t &timeStart=StartImmediately)
Append waypoint to end of path.
void clear()
Clear (reset) waypoint data.
Top-level package include file.