All Classes Namespaces Files Functions Variables Typedefs
spline::bezier_curve< Time, Numeric, Dim, Safe, Point > Struct Template Reference

#include <parametric-curves/bezier_curve.h>

Inheritance diagram for spline::bezier_curve< Time, Numeric, Dim, Safe, Point >:
[legend]
Collaboration diagram for spline::bezier_curve< Time, Numeric, Dim, Safe, Point >:
[legend]

Public Types

typedef Point point_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, Dim, Safe, Point > 
bezier_curve_t
 

Public Member Functions

template<typename In >
 bezier_curve (In PointsBegin, In PointsEnd, const time_t minBound=0, const time_t maxBound=1)
 Constructor. More...
 
template<typename In >
 bezier_curve (In PointsBegin, In PointsEnd, const curve_constraints_t &constraints, const time_t minBound=0, const time_t maxBound=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 ()
 Destructor. More...
 
virtual point_t operator() (const time_t t) const
 Evaluation of the cubic spline at time t. More...
 
bezier_curve_t compute_derivate (const std::size_t order) const
 Computes the derivative curve at order N. More...
 
bezier_curve_t compute_primitive (const std::size_t order) const
 Computes the primitive of the curve at order N. More...
 
virtual point_t derivate (const time_t t, const std::size_t order) const
 Evaluates the derivative at order N of the curve. More...
 
point_t evalBernstein (const Numeric u) const
 Evaluates all Bernstein polynomes for a certain degree. More...
 
point_t evalHorner (const Numeric t) const
 Evaluates all Bernstein polynomes for a certain degree using horner's scheme. More...
 
const t_point_twaypoints () const
 
virtual time_t min () const
 
virtual time_t max () const
 

Public Attributes

const time_t minBound_
 
const time_t maxBound_
 
const std::size_t size_
 
const std::size_t degree_
 
const std::vector< Bern
< Numeric > > 
bernstein_
 

Member Typedef Documentation

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef bezier_curve<Time, Numeric, Dim, Safe, Point > spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef t_point_t::const_iterator spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::cit_point_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef curve_constraints<point_t> spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::curve_constraints_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Numeric spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::num_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Point spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::point_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef std::vector<point_t,Eigen::aligned_allocator<point_t> > spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::t_point_t
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Time spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::time_t

Constructor & Destructor Documentation

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
template<typename In >
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve ( In  PointsBegin,
In  PointsEnd,
const time_t  minBound = 0,
const time_t  maxBound = 1 
)
inline

Constructor.

Parameters
PointsBegin,PointsEnd: the points parametering the Bezier curve

References spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bernstein_, and spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::size_.

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
template<typename In >
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve ( In  PointsBegin,
In  PointsEnd,
const curve_constraints_t constraints,
const time_t  minBound = 0,
const time_t  maxBound = 1 
)
inline

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,PointsEnd: the points parametering the Bezier curve
constraints: constraints applying on start / end velocities and acceleration
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::~bezier_curve ( )
inline

Destructor.

Member Function Documentation

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
bezier_curve_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::compute_derivate ( const std::size_t  order) const
inline
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
bezier_curve_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::compute_primitive ( const std::size_t  order) const
inline
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::derivate ( const time_t  t,
const std::size_t  order 
) const
inlinevirtual

Evaluates the derivative at order N of the curve.

If the derivative is to be evaluated several times, it is rather recommended to compute the derivative curve using compute_derivate

Parameters
order: order of the derivative
t: the time when to evaluate the spine
return: the value x(t)

References spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::compute_derivate().

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::evalBernstein ( const Numeric  u) const
inline

Evaluates all Bernstein polynomes for a certain degree.

References spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bernstein_.

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::evalHorner ( const Numeric  t) const
inline

Evaluates all Bernstein polynomes for a certain degree using horner's scheme.

References spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::degree_.

Referenced by spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::operator()().

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::max ( ) const
inlinevirtual
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::min ( ) const
inlinevirtual
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::operator() ( const time_t  t) const
inlinevirtual
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const t_point_t& spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::waypoints ( ) const
inline

Member Data Documentation

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::vector<Bern<Numeric> > spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bernstein_
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::size_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::degree_
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::maxBound_
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::minBound_
template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::size_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::size_