trajectory_collection
|
Interpolator with bang-bang control. More...
#include <BangBangInterpolator.h>
Public Member Functions | |
BangBangInterpolator (const std::map< double, T > &points={}, const std::vector< double > &accelDurationList={}) | |
Constructor. More... | |
BangBangInterpolator (const BangBangInterpolator &inst) | |
Copy constructor. More... | |
virtual std::shared_ptr< Interpolator< T, U > > | clone () const override |
Clone this instance and get shared pointer. More... | |
virtual void | clearPoints () override |
Clear points. More... | |
virtual void | appendPoint (const std::pair< double, T > &point) override |
Add point. More... | |
void | appendPoint (const std::pair< double, T > &point, double accelDuration) |
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... | |
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::vector< double > | accelDurationList_ |
List of acceleration/deceleration duration. More... | |
std::shared_ptr< PiecewiseFunc< double > > | 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... | |
Interpolator with bang-bang control.
T | value type |
U | derivative type |
The velocity of each waypoint is assumed to be zero.
Definition at line 16 of file BangBangInterpolator.h.
|
inline |
Constructor.
points | times and values to be interpolated |
accelDurationList | list of acceleration/deceleration duration |
Definition at line 23 of file BangBangInterpolator.h.
|
inline |
Copy constructor.
Definition at line 42 of file BangBangInterpolator.h.
|
inlineoverridevirtual |
Add point.
point | time and value |
Implements TrajColl::Interpolator< T, T >.
Definition at line 66 of file BangBangInterpolator.h.
|
inline |
Add point.
point | time and value |
accelDuration | acceleration/deceleration duration (automatically determined if zero is specified) |
Definition at line 77 of file BangBangInterpolator.h.
|
inlineoverridevirtual |
Calculate coefficients.
Implements TrajColl::Interpolator< T, T >.
Definition at line 113 of file BangBangInterpolator.h.
|
inlineoverridevirtual |
Clear points.
Reimplemented from TrajColl::Interpolator< T, T >.
Definition at line 55 of file BangBangInterpolator.h.
|
inlineoverridevirtual |
Clone this instance and get shared pointer.
Definition at line 49 of file BangBangInterpolator.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 169 of file BangBangInterpolator.h.
|
inlineoverridevirtual |
Calculate interpolated value.
t | time |
Implements TrajColl::Interpolator< T, T >.
Definition at line 155 of file BangBangInterpolator.h.
|
protected |
List of acceleration/deceleration duration.
Definition at line 181 of file BangBangInterpolator.h.
|
protected |
Function to calculate the ratio of interpolation points.
Definition at line 184 of file BangBangInterpolator.h.