trajectory_collection
|
Interpolator of a sequence of waypoints. More...
#include <Interpolator.h>
Public Member Functions | |
Interpolator (const std::map< double, T > &points={}) | |
Constructor. More... | |
Interpolator (const Interpolator &inst) | |
Copy constructor. More... | |
virtual std::shared_ptr< Interpolator< T, U > > | clone () const =0 |
Clone this instance and get shared pointer. More... | |
virtual void | clearPoints () |
Clear points. More... | |
virtual void | appendPoint (const std::pair< double, T > &point)=0 |
Add point. More... | |
virtual void | calcCoeff ()=0 |
Calculate coefficients. More... | |
virtual T | operator() (double t) const =0 |
Calculate interpolated value. More... | |
virtual U | derivative (double t, int order=1) const =0 |
Calculate the derivative of interpolated value. More... | |
double | startTime () const |
Get start time. More... | |
double | endTime () const |
Get end time. More... | |
const std::map< double, T > & | points () const |
Get points. More... | |
Protected Attributes | |
std::map< double, T > | points_ |
Times and values to be interpolated. More... | |
Interpolator of a sequence of waypoints.
T | value type |
U | derivative type |
The velocity of each waypoint is assumed to be zero.
Definition at line 14 of file Interpolator.h.
|
inline |
Constructor.
points | times and values to be interpolated |
accelDurationList | list of acceleration/deceleration duration |
Definition at line 21 of file Interpolator.h.
|
inline |
Copy constructor.
Definition at line 24 of file Interpolator.h.
|
pure virtual |
Add point.
point | time and value |
Implemented in TrajColl::BangBangInterpolator< T, U >, and TrajColl::CubicInterpolator< T, U >.
|
pure virtual |
Calculate coefficients.
Implemented in TrajColl::BangBangInterpolator< T, U >, and TrajColl::CubicInterpolator< T, U >.
|
inlinevirtual |
Clear points.
Reimplemented in TrajColl::BangBangInterpolator< T, U >.
Definition at line 33 of file Interpolator.h.
|
pure virtual |
Clone this instance and get shared pointer.
|
pure virtual |
Calculate the derivative of interpolated value.
t | time |
order | derivative order |
It is assumed that interpolateDerivative() returns zero if derivative order is greater than or equal to 2.
Implemented in TrajColl::BangBangInterpolator< T, U >, and TrajColl::CubicInterpolator< T, U >.
|
inline |
Get end time.
Definition at line 68 of file Interpolator.h.
|
pure virtual |
Calculate interpolated value.
t | time |
Implemented in TrajColl::BangBangInterpolator< T, U >, and TrajColl::CubicInterpolator< T, U >.
|
inline |
Get points.
Definition at line 74 of file Interpolator.h.
|
inline |
Get start time.
Definition at line 62 of file Interpolator.h.
|
protected |
Times and values to be interpolated.
Definition at line 81 of file Interpolator.h.