Loading...
Searching...
No Matches
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point > Class Template Reference

Represents a polynomial of an arbitrary order defined on the interval \([t_{min}, t_{max}]\). It follows the equation :
\( x(t) = a + b(t - t_{min}) + ... + d(t - t_{min})^N \)
where N is the order and \( t \in [t_{min}, t_{max}] \). More...

#include <ndcurves/polynomial.h>

Inheritance diagram for ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >:
Collaboration diagram for ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >:

Public Types

typedef Point point_t
 
typedef T_Point t_point_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_abc< Time, Numeric, Safe, Point > curve_abc_t
 
typedef Eigen::MatrixXd coeff_t
 
typedef Eigen::Ref< coeff_tcoeff_t_ref
 
typedef polynomial< Time, Numeric, Safe, Point, T_Point > polynomial_t
 
typedef curve_abc_t::curve_ptr_t curve_ptr_t
 
- Public Types inherited from ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
typedef Point point_t
 
typedef Point_derivate point_derivate_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_tcurve_t
 
typedef curve_abc< Time, Numeric, Safe, point_derivate_tcurve_derivate_t
 
typedef std::shared_ptr< curve_tcurve_ptr_t
 

Public Member Functions

 polynomial ()
 Empty constructor. Curve obtained this way can not perform other class functions.
 
 polynomial (const coeff_t &coefficients, const time_t min, const time_t max)
 Constructor.
 
 polynomial (const T_Point &coefficients, const time_t min, const time_t max)
 Constructor.
 
template<typename In >
 polynomial (In zeroOrderCoefficient, In out, const time_t min, const time_t max)
 Constructor.
 
 polynomial (const Point &init, const Point &end, const time_t min, const time_t max)
 Constructor from boundary condition with C0 : create a polynomial that connect exactly init and end (order 1)
 
 polynomial (const Point &init, const Point &d_init, const Point &end, const Point &d_end, const time_t min, const time_t max)
 Constructor from boundary condition with C1 : create a polynomial that connect exactly init and end and thier first order derivatives(order 3)
 
 polynomial (const Point &init, const Point &d_init, const Point &dd_init, const Point &end, const Point &d_end, const Point &dd_end, const time_t min, const time_t max)
 Constructor from boundary condition with C2 : create a polynomial that connect exactly init and end and thier first and second order derivatives(order 5)
 
virtual ~polynomial ()
 Destructor.
 
 polynomial (const polynomial &other)
 
virtual point_t operator() (const time_t t) const
 Evaluation of the cubic spline at time t using horner's scheme.
 
bool isApprox (const polynomial_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
 
virtual bool isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 
virtual bool operator== (const polynomial_t &other) const
 
virtual bool operator!= (const polynomial_t &other) const
 
virtual point_t derivate (const time_t t, const std::size_t order) const
 Evaluation of the derivative of order N of spline at time t.
 
polynomial_t compute_derivate (const std::size_t order) const
 
polynomial_tcompute_derivate_ptr (const std::size_t order) const
 Compute the derived curve at order N.
 
Eigen::MatrixXd coeff () const
 
point_t coeffAtDegree (const std::size_t degree) const
 
virtual std::size_t dim () const
 Get dimension of curve.
 
virtual num_t min () const
 Get the minimum time for which the curve is defined.
 
virtual num_t max () const
 Get the maximum time for which the curve is defined.
 
virtual std::size_t degree () const
 Get the degree of the curve.
 
polynomial_toperator+= (const polynomial_t &p1)
 
polynomial_toperator-= (const polynomial_t &p1)
 
polynomial_toperator+= (const polynomial_t::point_t &point)
 
polynomial_toperator-= (const polynomial_t::point_t &point)
 
polynomial_toperator/= (const double d)
 
polynomial_toperator*= (const double d)
 
polynomial_t cross (const polynomial_t &pOther) const
 Compute the cross product of the current polynomial by another polynomial. The cross product p1Xp2 of 2 polynomials p1 and p2 is defined such that forall t, p1Xp2(t) = p1(t) X p2(t), with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.
 
polynomial_t cross (const polynomial_t::point_t &point) const
 Compute the cross product of the current polynomial p by a point point. The cross product pXpoint of is defined such that forall t, pXpoint(t) = p(t) X point, with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
 curve_abc ()
 Constructor.
 
virtual ~curve_abc ()
 Destructor.
 
bool isEquivalent (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision(), const size_t order=5) const
 isEquivalent check if other and *this are approximately equal by values, given a precision threshold. This test is done by discretizing both curves and evaluating them and their derivatives.
 
virtual bool isApprox (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const =0
 isApprox check if other and *this are approximately equal given a precision threshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.
 
std::pair< time_t, time_ttimeRange ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from ndcurves::serialization::Serializable
template<class Derived >
void loadFromText (const std::string &filename)
 Loads a Derived object from a text file.
 
template<class Derived >
void saveAsText (const std::string &filename) const
 Saved a Derived object as a text file.
 
template<class Derived >
void loadFromXML (const std::string &filename, const std::string &tag_name)
 Loads a Derived object from an XML file.
 
template<class Derived >
void saveAsXML (const std::string &filename, const std::string &tag_name) const
 Saved a Derived object as an XML file.
 
template<class Derived >
void loadFromBinary (const std::string &filename)
 Loads a Derived object from an binary file.
 
template<class Derived >
void saveAsBinary (const std::string &filename) const
 Saved a Derived object as an binary file.
 

Static Public Member Functions

static polynomial_t MinimumJerk (const point_t &p_init, const point_t &p_final, const time_t t_min=0., const time_t t_max=1.)
 MinimumJerk Build a polynomial curve connecting p_init to p_final minimizing the time integral of the squared jerk with a zero initial and final velocity and acceleration.
 
static void MinimumJerk (polynomial_t &out, const point_t &p_init, const point_t &p_final, const time_t t_min=0., const time_t t_max=1.)
 MinimumJerk Build a polynomial curve connecting p_init to p_final minimizing the time integral of the squared jerk with a zero initial and final velocity and acceleration.
 

Public Attributes

std::size_t dim_
 
coeff_t coefficients_
 
std::size_t degree_
 
time_t T_min_
 
time_t T_max_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
class ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >

Represents a polynomial of an arbitrary order defined on the interval \([t_{min}, t_{max}]\). It follows the equation :
\( x(t) = a + b(t - t_{min}) + ... + d(t - t_{min})^N \)
where N is the order and \( t \in [t_{min}, t_{max}] \).

Member Typedef Documentation

◆ coeff_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Eigen::MatrixXd ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff_t

◆ coeff_t_ref

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Eigen::Ref<coeff_t> ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff_t_ref

◆ curve_abc_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef curve_abc<Time, Numeric, Safe, Point> ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::curve_abc_t

◆ curve_ptr_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef curve_abc_t::curve_ptr_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::curve_ptr_t

◆ num_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Numeric ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::num_t

◆ point_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Point ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::point_t

◆ polynomial_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef polynomial<Time, Numeric, Safe, Point, T_Point> ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial_t

◆ t_point_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef T_Point ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::t_point_t

◆ time_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Time ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::time_t

Constructor & Destructor Documentation

◆ polynomial() [1/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( )
inline

Empty constructor. Curve obtained this way can not perform other class functions.

◆ polynomial() [2/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const coeff_t coefficients,
const time_t  min,
const time_t  max 
)
inline

Constructor.

Parameters
coefficients: a reference to an Eigen matrix where each column is a coefficient, from the zero order coefficient, up to the highest order. Spline order is given by the number of the columns -1.
min: LOWER bound on interval definition of the curve.
max: UPPER bound on interval definition of the curve.

◆ polynomial() [3/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const T_Point &  coefficients,
const time_t  min,
const time_t  max 
)
inline

Constructor.

Parameters
coefficients: a container containing all coefficients of the spline, starting with the zero order coefficient, up to the highest order. Spline order is given by the size of the coefficients.
min: LOWER bound on interval definition of the spline.
max: UPPER bound on interval definition of the spline.

◆ polynomial() [4/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
template<typename In >
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( In  zeroOrderCoefficient,
In  out,
const time_t  min,
const time_t  max 
)
inline

Constructor.

Parameters
zeroOrderCoefficient: an iterator pointing to the first element of a structure containing the coefficients it corresponds to the zero degree coefficient.
out: an iterator pointing to the last element of a structure ofcoefficients.
min: LOWER bound on interval definition of the spline.
max: UPPER bound on interval definition of the spline.

◆ polynomial() [5/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const Point &  init,
const Point &  end,
const time_t  min,
const time_t  max 
)
inline

Constructor from boundary condition with C0 : create a polynomial that connect exactly init and end (order 1)

Parameters
initthe initial point of the curve
endthe final point of the curve
min: LOWER bound on interval definition of the spline.
max: UPPER bound on interval definition of the spline.

◆ polynomial() [6/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const Point &  init,
const Point &  d_init,
const Point &  end,
const Point &  d_end,
const time_t  min,
const time_t  max 
)
inline

Constructor from boundary condition with C1 : create a polynomial that connect exactly init and end and thier first order derivatives(order 3)

Parameters
initthe initial point of the curve
d_initthe initial value of the derivative of the curve
endthe final point of the curve
d_endthe final value of the derivative of the curve
min: LOWER bound on interval definition of the spline.
max: UPPER bound on interval definition of the spline.

◆ polynomial() [7/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const Point &  init,
const Point &  d_init,
const Point &  dd_init,
const Point &  end,
const Point &  d_end,
const Point &  dd_end,
const time_t  min,
const time_t  max 
)
inline

Constructor from boundary condition with C2 : create a polynomial that connect exactly init and end and thier first and second order derivatives(order 5)

Parameters
initthe initial point of the curve
d_initthe initial value of the derivative of the curve
d_initthe initial value of the second derivative of the curve
endthe final point of the curve
d_endthe final value of the derivative of the curve
d_endthe final value of the second derivative of the curve
min: LOWER bound on interval definition of the spline.
max: UPPER bound on interval definition of the spline.

◆ ~polynomial()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::~polynomial ( )
inlinevirtual

Destructor.

◆ polynomial() [8/8]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial ( const polynomial< Time, Numeric, Safe, Point, T_Point > &  other)
inline

Member Function Documentation

◆ coeff()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Eigen::MatrixXd ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff ( ) const
inline

◆ coeffAtDegree()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
point_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeffAtDegree ( const std::size_t  degree) const
inline

◆ compute_derivate()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate ( const std::size_t  order) const
inline

◆ compute_derivate_ptr()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t * ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate_ptr ( const std::size_t  order) const
inlinevirtual

Compute the derived curve at order N.

Parameters
order: order of derivative.
Returns
A pointer to \(\frac{d^Nx(t)}{dt^N}\) derivative order N of the curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ cross() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::cross ( const polynomial_t pOther) const
inline

Compute the cross product of the current polynomial by another polynomial. The cross product p1Xp2 of 2 polynomials p1 and p2 is defined such that forall t, p1Xp2(t) = p1(t) X p2(t), with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.

Parameters
pOtherother polynomial to compute the cross product with.
Returns
a new polynomial defining the cross product between this and pother

◆ cross() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::cross ( const polynomial_t::point_t point) const
inline

Compute the cross product of the current polynomial p by a point point. The cross product pXpoint of is defined such that forall t, pXpoint(t) = p(t) X point, with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.

Parameters
pointpoint to compute the cross product with.
Returns
a new polynomial defining the cross product between this and point

◆ degree()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual std::size_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree ( ) const
inlinevirtual

Get the degree of the curve.

Returns
\(degree\), the degree of the curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ derivate()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual point_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate ( const time_t  t,
const std::size_t  order 
) const
inlinevirtual

Evaluation of the derivative of order N of spline at time t.

Parameters
t: the time when to evaluate the spline.
order: order of derivative.
Returns
\(\frac{d^Nx(t)}{dt^N}\) point corresponding on derivative spline at time t.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ dim()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual std::size_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim ( ) const
inlinevirtual

Get dimension of curve.

Returns
dimension of curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ isApprox() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual bool ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox ( const curve_abc_t other,
const Numeric  prec = Eigen::NumTraits<Numeric>::dummy_precision() 
) const
inlinevirtual

◆ isApprox() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
bool ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox ( const polynomial_t other,
const Numeric  prec = Eigen::NumTraits<Numeric>::dummy_precision() 
) const
inline

isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent

Parameters
otherthe other curve to check
precthe precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true is the two curves are approximately equals

◆ max()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual num_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::max ( ) const
inlinevirtual

Get the maximum time for which the curve is defined.

Returns
\(t_{max}\) upper bound of time range.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ min()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual num_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::min ( ) const
inlinevirtual

Get the minimum time for which the curve is defined.

Returns
\(t_{min}\) lower bound of time range.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ MinimumJerk() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
static polynomial_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::MinimumJerk ( const point_t p_init,
const point_t p_final,
const time_t  t_min = 0.,
const time_t  t_max = 1. 
)
inlinestatic

MinimumJerk Build a polynomial curve connecting p_init to p_final minimizing the time integral of the squared jerk with a zero initial and final velocity and acceleration.

Parameters
p_initthe initial point
p_finalthe final point
t_mininitial time
t_maxfinal time
Returns
the polynomial curve

◆ MinimumJerk() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
static void ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::MinimumJerk ( polynomial_t out,
const point_t p_init,
const point_t p_final,
const time_t  t_min = 0.,
const time_t  t_max = 1. 
)
inlinestatic

MinimumJerk Build a polynomial curve connecting p_init to p_final minimizing the time integral of the squared jerk with a zero initial and final velocity and acceleration.

Parameters
outThe output polynomial needs to be of the correct size.
p_initthe initial point
p_finalthe final point
t_mininitial time
t_maxfinal time
Returns
the polynomial curve

◆ operator!=()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual bool ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator!= ( const polynomial_t other) const
inlinevirtual

◆ operator()()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual point_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator() ( const time_t  t) const
inlinevirtual

Evaluation of the cubic spline at time t using horner's scheme.

Parameters
t: time when to evaluate the spline.
Returns
\(x(t)\) point corresponding on spline at time t.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ operator*=()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator*= ( const double  d)
inline

◆ operator+=() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator+= ( const polynomial_t p1)
inline

◆ operator+=() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator+= ( const polynomial_t::point_t point)
inline

◆ operator-=() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator-= ( const polynomial_t p1)
inline

◆ operator-=() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator-= ( const polynomial_t::point_t point)
inline

◆ operator/=()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
polynomial_t & ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator/= ( const double  d)
inline

◆ operator==()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual bool ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator== ( const polynomial_t other) const
inlinevirtual

◆ serialize()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
template<class Archive >
void ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::serialize ( Archive ar,
const unsigned int  version 
)
inline

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
friend class boost::serialization::access
friend

Member Data Documentation

◆ coefficients_

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
coeff_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_

◆ degree_

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
std::size_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_

◆ dim_

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
std::size_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_

◆ T_max_

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
time_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_

◆ T_min_

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
time_t ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_

The documentation for this class was generated from the following files: