Represents a sinusoidal curve, evaluating the following equation: p0 + amplitude * (sin(2pi/T + phi) More...
#include <curves/fwd.h>
Public Types | |
typedef Point | point_t |
typedef Point | point_derivate_t |
typedef Time | time_t |
typedef Numeric | num_t |
typedef sinusoidal< Time, Numeric, Safe, Point > | sinusoidal_t |
typedef curve_abc< Time, Numeric, Safe, Point > | curve_abc_t |
Public Member Functions | |
sinusoidal () | |
Empty constructor. Curve obtained this way can not perform other class functions. More... | |
sinusoidal (const Point &p0, const Point &litude, const time_t T, const time_t phi, const time_t T_min=0., const time_t T_max=std::numeric_limits< time_t >::max()) | |
Constructor. More... | |
sinusoidal (const time_t traj_time, const Point &p_init, const Point &p_final, const time_t T_min=0., const time_t T_max=std::numeric_limits< time_t >::max()) | |
Constructor from stationary points. More... | |
sinusoidal (const sinusoidal_t &other) | |
Copy constructor. More... | |
virtual | ~sinusoidal () |
Destructor. More... | |
virtual point_t | operator() (const time_t t) const |
Evaluation of the cubic spline at time t. More... | |
virtual point_derivate_t | derivate (const time_t t, const std::size_t order) const |
Evaluate the derivative of order N of curve at time t. More... | |
sinusoidal_t | compute_derivate (const std::size_t order) const |
Compute the derived curve at order N. Computes the derivative order N, ![]() | |
virtual sinusoidal_t * | compute_derivate_ptr (const std::size_t order) const |
Compute the derived curve at orderN. More... | |
virtual bool | isApprox (const sinusoidal_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
isApprox check if other and *this are approximately equals given a precision treshold Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent. More... | |
virtual bool | isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
virtual bool | operator== (const sinusoidal_t &other) const |
virtual bool | operator!= (const sinusoidal_t &other) const |
virtual std::size_t | dim () const |
Get dimension of curve. More... | |
virtual num_t | min () const |
Get the minimum time for which the curve is defined. More... | |
virtual num_t | max () const |
Get the maximum time for which the curve is defined. More... | |
virtual std::size_t | degree () const |
Get the degree of the curve. More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Public Attributes | |
Point | p0_ |
Point | amplitude_ |
time_t | T_ |
time_t | phi_ |
time_t | T_min_ |
time_t | T_max_ |
std::size_t | dim_ |
Friends | |
class | boost::serialization::access |
Represents a sinusoidal curve, evaluating the following equation: p0 + amplitude * (sin(2pi/T + phi)
typedef curve_abc<Time, Numeric, Safe, Point> curves::sinusoidal::curve_abc_t |
typedef Numeric curves::sinusoidal::num_t |
typedef Point curves::sinusoidal::point_derivate_t |
typedef Point curves::sinusoidal::point_t |
typedef sinusoidal<Time, Numeric, Safe, Point> curves::sinusoidal::sinusoidal_t |
typedef Time curves::sinusoidal::time_t |
|
inline |
Empty constructor. Curve obtained this way can not perform other class functions.
|
inline |
Constructor.
p0 | : Offset of the sinusoidal |
amplitude | Amplitude |
T | : The period |
phi | : the phase |
T_min | : lower bound of the time interval (default to 0) |
T_max | : upper bound of the time interval (default to +inf) |
|
inline |
Constructor from stationary points.
traj_time | duration to go from p_init to p_final (half a period) |
p_init | : first stationary point, either minimum or maximum |
p_final | : second stationary point, either minimum or maximum |
T_min | : lower bound of the time interval (default to 0) |
T_max | : upper bound of the time interval (default to +inf) |
|
inline |
Copy constructor.
other |
|
inlinevirtual |
Destructor.
|
inline |
Compute the derived curve at order N. Computes the derivative order N, of bezier curve of parametric equation x(t).
order | : order of derivative. |
|
inlinevirtual |
Compute the derived curve at orderN.
order | : order of derivative. |
|
inlinevirtual |
Get the degree of the curve.
|
inlinevirtual |
Evaluate the derivative of order N of curve at time t.
t | : time when to evaluate the spline. |
order | : order of derivative. |
|
inlinevirtual |
Get dimension of curve.
|
inlinevirtual |
|
inlinevirtual |
isApprox check if other and *this are approximately equals given a precision treshold Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent.
other | the other curve to check |
prec | the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
|
inlinevirtual |
Get the maximum time for which the curve is defined.
|
inlinevirtual |
Get the minimum time for which the curve is defined.
|
inlinevirtual |
Evaluation of the cubic spline at time t.
t | : time when to evaluate the spine |
|
inlinevirtual |
|
inline |
|
friend |
Point curves::sinusoidal::amplitude_ |
std::size_t curves::sinusoidal::dim_ |
Point curves::sinusoidal::p0_ |
time_t curves::sinusoidal::phi_ |
time_t curves::sinusoidal::T_ |
time_t curves::sinusoidal::T_max_ |
time_t curves::sinusoidal::T_min_ |