|
typedef Point | point_t |
|
typedef Eigen::Matrix< Numeric, Eigen::Dynamic, 1 > | vector_x_t |
|
typedef Eigen::Ref< const vector_x_t > | vector_x_ref_t |
|
typedef Time | time_t |
|
typedef Numeric | num_t |
|
typedef curve_constraints< point_t > | curve_constraints_t |
|
typedef std::vector< point_t, Eigen::aligned_allocator< point_t > > | t_point_t |
|
typedef t_point_t::const_iterator | cit_point_t |
|
typedef bezier_curve< Time, Numeric, Safe, Point > | bezier_curve_t |
|
typedef boost::shared_ptr< bezier_curve_t > | bezier_curve_ptr_t |
|
typedef piecewise_curve< Time, Numeric, Safe, point_t, point_t, bezier_curve_t > | piecewise_curve_t |
|
typedef curve_abc< Time, Numeric, Safe, point_t > | curve_abc_t |
|
typedef curve_abc_t::curve_ptr_t | curve_ptr_t |
|
typedef Point | point_t |
|
typedef Point | point_derivate_t |
|
typedef Time | time_t |
|
typedef Numeric | num_t |
|
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_t > | curve_t |
|
typedef boost::shared_ptr< curve_t > | curve_ptr_t |
|
|
| bezier_curve () |
| Empty constructor. More...
|
|
template<typename In > |
| bezier_curve (In PointsBegin, In PointsEnd, const time_t T_min=0., const time_t T_max=1., const time_t mult_T=1.) |
| Constructor. More...
|
|
template<typename In > |
| bezier_curve (In PointsBegin, In PointsEnd, const curve_constraints_t &constraints, const time_t T_min=0., const time_t T_max=1., const time_t mult_T=1.) |
| Constructor This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected. More...
|
|
| bezier_curve (const bezier_curve &other) |
|
| ~bezier_curve () |
| Destructor. More...
|
|
virtual point_t | operator() (const time_t t) const |
| Evaluation of the bezier curve at time t. More...
|
|
bool | isApprox (const bezier_curve_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
| isApprox check if other and *this are approximately equals. More...
|
|
virtual bool | isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
|
virtual bool | operator== (const bezier_curve_t &other) const |
|
virtual bool | operator!= (const bezier_curve_t &other) const |
|
bezier_curve_t | compute_derivate (const std::size_t order) const |
| Compute the derived curve at order N. More...
|
|
bezier_curve_t * | compute_derivate_ptr (const std::size_t order) const |
| Compute the derived curve at order N. More...
|
|
bezier_curve_t | compute_primitive (const std::size_t order) const |
| Compute the primitive of the curve at order N. More...
|
|
virtual point_t | derivate (const time_t t, const std::size_t order) const |
| Evaluate the derivative order N of curve at time t. More...
|
|
point_t | evalBernstein (const Numeric t) const |
| Evaluate all Bernstein polynomes for a certain degree. More...
|
|
| curve_abc () |
| Constructor. More...
|
|
virtual | ~curve_abc () |
| Destructor. 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. 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 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 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 () |
|
void | serialize (Archive &, const unsigned int version) |
|
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename In >
Constructor.
Given the first and last point of a control points set, create the bezier curve.
- Parameters
-
PointsBegin | : an iterator pointing to the first element of a control point container. |
PointsEnd | : an iterator pointing to the last element of a control point container. |
T | : upper bound of time which is between (default ). |
mult_T | : ... (default value is 1.0). |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename In >
Constructor This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected.
- Parameters
-
PointsBegin | : an iterator pointing to the first element of a control point container. |
PointsEnd | : an iterator pointing to the last element of a control point container. |
constraints | : constraints applying on start / end velocities and acceleration. |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
Evaluate all Bernstein polynomes for a certain degree.
A bezier curve with N control points is represented by :
with
.
Warning: the horner scheme is about 100 times faster than this method.
This method will probably be removed in the future as the computation of bernstein polynomial is very costly.
- Parameters
-
t | : time when to evaluate the curve. |
- Returns
point corresponding on curve at time t.
References curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::add_curve_ptr(), curves::curve_abc< Time, Numeric, Safe, Point >::degree(), curves::curve_abc< Time, Numeric, Safe, Point >::dim(), curves::curve_constraints< Point >::end_acc, curves::curve_constraints< Point >::end_vel, curves::curve_constraints< Point >::init_acc, curves::curve_constraints< Point >::init_vel, curves::curve_abc< Time, Numeric, Safe, Point >::max(), curves::curve_abc< Time, Numeric, Safe, Point >::min(), curves::curve_abc< Time, Numeric, Safe, Point >::serialize(), and curves::optimization::split().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
bool curves::bezier_curve< Time, Numeric, Safe, Point >::isApprox |
( |
const bezier_curve_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
-
other | the other curve to check |
prec | the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true is the two curves are approximately equals
References curves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::degree(), curves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::dim(), curves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::max(), and curves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::min().
Referenced by curves::bezier_curve< Time, Numeric, Safe, Point >::isApprox(), and curves::bezier_curve< Time, Numeric, Safe, Point >::operator==().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>