trajectory_collection
|
Cubic interpolator. More...
#include <CubicInterpolator.h>
Public Member Functions | |
CubicInterpolator (const std::map< double, T > &points={}) | |
Constructor. More... | |
CubicInterpolator (const CubicInterpolator &inst) | |
Copy constructor. More... | |
virtual std::shared_ptr< Interpolator< T, U > > | clone () const override |
Clone this instance and get shared pointer. More... | |
virtual void | appendPoint (const std::pair< double, T > &point) override |
Add point. More... | |
virtual void | calcCoeff () override |
Calculate coefficients. More... | |
virtual T | operator() (double t) const override |
Calculate interpolated value. More... | |
virtual U | derivative (double t, int order=1) const override |
Calculate the derivative of interpolated value. More... | |
Public Member Functions inherited from TrajColl::Interpolator< T, T > | |
Interpolator (const std::map< double, T > &points={}) | |
Constructor. More... | |
Interpolator (const Interpolator &inst) | |
Copy constructor. More... | |
virtual std::shared_ptr< Interpolator< T, T > > | clone () const=0 |
Clone this instance and get shared pointer. More... | |
virtual void | clearPoints () |
Clear points. 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 Types | |
using | Vector1d = Eigen::Matrix< double, 1, 1 > |
1D vector More... | |
Protected Attributes | |
std::shared_ptr< CubicHermiteSpline< Vector1d > > | func_ |
Function to calculate the ratio of interpolation points. More... | |
Protected Attributes inherited from TrajColl::Interpolator< T, T > | |
std::map< double, T > | points_ |
Times and values to be interpolated. More... | |
Cubic interpolator.
T | value type |
U | derivative type |
The velocity of each waypoint is assumed to be zero.
Definition at line 16 of file CubicInterpolator.h.
|
protected |
1D vector
Definition at line 20 of file CubicInterpolator.h.
|
inline |
Constructor.
points | times and values to be interpolated |
Definition at line 26 of file CubicInterpolator.h.
|
inline |
Copy constructor.
Definition at line 37 of file CubicInterpolator.h.
|
inlineoverridevirtual |
Add point.
point | time and value |
Implements TrajColl::Interpolator< T, T >.
Definition at line 53 of file CubicInterpolator.h.
|
inlineoverridevirtual |
Calculate coefficients.
Implements TrajColl::Interpolator< T, T >.
Definition at line 59 of file CubicInterpolator.h.
|
inlineoverridevirtual |
Clone this instance and get shared pointer.
Definition at line 43 of file CubicInterpolator.h.
|
inlineoverridevirtual |
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.
Implements TrajColl::Interpolator< T, T >.
Definition at line 98 of file CubicInterpolator.h.
|
inlineoverridevirtual |
Calculate interpolated value.
t | time |
Implements TrajColl::Interpolator< T, T >.
Definition at line 84 of file CubicInterpolator.h.
|
protected |
Function to calculate the ratio of interpolation points.
Definition at line 110 of file CubicInterpolator.h.