Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on the evaluation of the curve.
More...
|
| curve_abc () |
| Constructor. More...
|
|
virtual | ~curve_abc () |
| Destructor. More...
|
|
virtual point_t | operator() (const time_t t) const =0 |
| Evaluation of the cubic spline at time t. More...
|
|
virtual curve_derivate_t * | compute_derivate_ptr (const std::size_t order) const =0 |
| Compute the derived curve at order N. More...
|
|
virtual point_derivate_t | derivate (const time_t t, const std::size_t order) const =0 |
| Evaluate the derivative of order N of curve at time t. More...
|
|
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 treshold. This test is done by discretizing both curves and evaluating them and their derivatives. More...
|
|
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 treshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent. More...
|
|
virtual std::size_t | dim () const =0 |
| Get dimension of curve. More...
|
|
virtual time_t | min () const =0 |
| Get the minimum time for which the curve is defined. More...
|
|
virtual time_t | max () const =0 |
| Get the maximum time for which the curve is defined. More...
|
|
virtual std::size_t | degree () const =0 |
| Get the degree of the curve. More...
|
|
std::pair< time_t, time_t > | timeRange () |
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
template<class Derived > |
void | loadFromText (const std::string &filename) |
| Loads a Derived object from a text file. More...
|
|
template<class Derived > |
void | saveAsText (const std::string &filename) const |
| Saved a Derived object as a text file. More...
|
|
template<class Derived > |
void | loadFromXML (const std::string &filename, const std::string &tag_name) |
| Loads a Derived object from an XML file. More...
|
|
template<class Derived > |
void | saveAsXML (const std::string &filename, const std::string &tag_name) const |
| Saved a Derived object as an XML file. More...
|
|
template<class Derived > |
void | loadFromBinary (const std::string &filename) |
| Loads a Derived object from an binary file. More...
|
|
template<class Derived > |
void | saveAsBinary (const std::string &filename) const |
| Saved a Derived object as an binary file. More...
|
|
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
struct ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on the evaluation of the curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
Compute the derived curve at order N.
- Parameters
-
order | : order of derivative. |
- Returns
- A pointer to
derivative order N of the curve.
Implemented in ndcurves::helpers::rotation_spline, ndcurves::constant_curve< Time, Numeric, Safe, Point, Point_derivate >, ndcurves::SO3Linear< Time, Numeric, Safe >, ndcurves::sinusoidal< Time, Numeric, Safe, Point >, ndcurves::SE3Curve< Time, Numeric, Safe >, ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >, ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::piecewise_curve< double, double, false, Eigen::Matrix< double, Eigen::Dynamic, 1 > >, ndcurves::cubic_hermite_spline< Time, Numeric, Safe, Point >, and ndcurves::bezier_curve< Time, Numeric, Safe, Point >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual std::size_t ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::degree |
( |
| ) |
const |
|
pure virtual |
Get the degree of the curve.
- Returns
, the degree of the curve.
Implemented in ndcurves::SO3Linear< Time, Numeric, Safe >, ndcurves::sinusoidal< Time, Numeric, Safe, Point >, ndcurves::SE3Curve< Time, Numeric, Safe >, ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >, ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::piecewise_curve< double, double, false, Eigen::Matrix< double, Eigen::Dynamic, 1 > >, ndcurves::helpers::rotation_spline, ndcurves::cubic_hermite_spline< Time, Numeric, Safe, Point >, and ndcurves::constant_curve< Time, Numeric, Safe, Point, Point_derivate >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
Evaluate the derivative of order N of curve at time t.
- Parameters
-
t | : time when to evaluate the spline. |
order | : order of derivative. |
- Returns
, point corresponding on derivative curve of order N at time t.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual std::size_t ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::dim |
( |
| ) |
const |
|
pure virtual |
Get dimension of curve.
- Returns
- dimension of curve.
Implemented in ndcurves::SO3Linear< Time, Numeric, Safe >, ndcurves::sinusoidal< Time, Numeric, Safe, Point >, ndcurves::SE3Curve< Time, Numeric, Safe >, ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >, ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::piecewise_curve< double, double, false, Eigen::Matrix< double, Eigen::Dynamic, 1 > >, ndcurves::helpers::rotation_spline, ndcurves::cubic_hermite_spline< Time, Numeric, Safe, Point >, and ndcurves::constant_curve< Time, Numeric, Safe, Point, Point_derivate >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual bool ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::isApprox |
( |
const curve_t * |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits< Numeric >::dummy_precision() |
|
) |
| const |
|
pure virtual |
isApprox check if other and *this are approximately equal given a precision treshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.
- Parameters
-
other | the other curve to check |
prec | the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true if the two curves are approximately equal
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
bool ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::isEquivalent |
( |
const curve_t * |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits<Numeric>::dummy_precision() , |
|
|
const size_t |
order = 5 |
|
) |
| const |
|
inline |
isEquivalent check if other and *this are approximately equal by values, given a precision treshold. This test is done by discretizing both curves and evaluating them and their derivatives.
- Parameters
-
other | the other curve to check |
order | the order up to which the derivatives of the curves are checked for equality |
prec | the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true if the two curves are approximately equal
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
Get the maximum time for which the curve is defined.
- Returns
, upper bound of time range.
Implemented in ndcurves::SO3Linear< Time, Numeric, Safe >, ndcurves::sinusoidal< Time, Numeric, Safe, Point >, ndcurves::SE3Curve< Time, Numeric, Safe >, ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >, ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::piecewise_curve< double, double, false, Eigen::Matrix< double, Eigen::Dynamic, 1 > >, ndcurves::helpers::rotation_spline, ndcurves::cubic_hermite_spline< Time, Numeric, Safe, Point >, and ndcurves::constant_curve< Time, Numeric, Safe, Point, Point_derivate >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
Get the minimum time for which the curve is defined.
- Returns
, lower bound of time range.
Implemented in ndcurves::SO3Linear< Time, Numeric, Safe >, ndcurves::sinusoidal< Time, Numeric, Safe, Point >, ndcurves::SE3Curve< Time, Numeric, Safe >, ndcurves::polynomial< Time, Numeric, Safe, Point, T_Point >, ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::piecewise_curve< double, double, false, Eigen::Matrix< double, Eigen::Dynamic, 1 > >, ndcurves::helpers::rotation_spline, ndcurves::cubic_hermite_spline< Time, Numeric, Safe, Point >, and ndcurves::constant_curve< Time, Numeric, Safe, Point, Point_derivate >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
Evaluation of the cubic spline at time t.
- Parameters
-
t | : time when to evaluate the spine |
- Returns
, point corresponding on curve at time t.