|
typedef Point | point_t |
|
typedef Point_derivate | point_derivate_t |
|
typedef std::vector< point_t, Eigen::aligned_allocator< point_t > > | t_point_t |
|
typedef std::vector< point_derivate_t, Eigen::aligned_allocator< point_derivate_t > > | t_point_derivate_t |
|
typedef Time | time_t |
|
typedef Numeric | num_t |
|
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_t > | base_curve_t |
|
typedef CurveType | curve_t |
|
typedef boost::shared_ptr< curve_t > | curve_ptr_t |
|
typedef std::vector< curve_ptr_t > | t_curve_ptr_t |
|
typedef std::vector< Time > | t_time_t |
|
typedef piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType > | piecewise_curve_t |
|
typedef piecewise_curve< Time, Numeric, Safe, Point_derivate, Point_derivate, typename CurveType::curve_derivate_t > | piecewise_curve_derivate_t |
|
typedef boost::shared_ptr< typename piecewise_curve_derivate_t::curve_t > | curve_derivate_ptr_t |
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C0 continuity. More...
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_point_derivate_t points_derivative, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C1 continuity. More...
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_point_derivate_t points_derivative, t_point_derivate_t points_second_derivative, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C2 continuity. More...
|
|
template<typename Polynomial > |
static piecewise_curve_t | load_piecewise_from_text_file (const std::string &filename, const time_t dt, const size_t dim) |
| load_piecewise_from_text_file build a piecewise polynomial from a list of discrete points read from a file. The file should contains one points per line, optionally with it's derivative and second derivatives. Each lines should then contains dim, 2*dim or 3*dim values More...
|
|
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
typedef piecewise_curve<Time, Numeric, Safe, Point_derivate, Point_derivate, typename CurveType::curve_derivate_t> curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::piecewise_curve_derivate_t |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
typedef piecewise_curve<Time, Numeric, Safe, Point, Point_derivate, CurveType> curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::piecewise_curve_t |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Empty constructor. Add at least one curve to call other class functions.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Constructor. Initialize a piecewise curve by giving the first curve.
- Parameters
-
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::piecewise_curve |
( |
const piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType > & |
other | ) |
|
|
inline |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Curve >
void curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::add_curve |
( |
const Curve & |
curve | ) |
|
|
inline |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
compute_derivate return a piecewise_curve which is the derivative of this at given order
- Parameters
-
- Returns
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Polynomial >
Convert discrete points into piecewise polynomial curve with C2 continuity.
- Parameters
-
points | : discrete points to convert. |
points_derivative | : derivative of order 1 corresponding to each point in piecewise curve. |
points_second_derivative | : derivative of order 2 corresponding to each point in piecewise curve. |
time_points | : time corresponding to each point in piecewise curve. |
- Returns
- piecewise polynomial curve of C2 continuity.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Polynomial >
Convert discrete points into piecewise polynomial curve with C1 continuity.
- Parameters
-
points | : discrete points to convert. |
points_derivative | : derivative of order 1 corresponding to each point in piecewise curve. |
time_points | : time corresponding to each point in piecewise curve. |
- Returns
- piecewise polynomial curve of C1 continuity.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Polynomial >
Convert discrete points into piecewise polynomial curve with C0 continuity.
- Parameters
-
points | : discrete points to convert. |
time_points | : time corresponding to each point in piecewise curve. |
- Returns
- piecewise polynomial curve of C0 continuity.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Bezier >
Convert all curves in piecewise curve into bezier curves.
- Returns
- piecewise bezier curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Hermite >
Convert all curves in piecewise curve into cubic hermite curves. Curves need to be of degree inferior or equal to three.
- Returns
- piecewise cubic hermite curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Polynomial >
Convert all curves in piecewise curve into polynomial curves.
- Returns
- piecewise polynomial curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Get curve at specified index in piecewise curve.
- Parameters
-
idx | : Index of curve to return, from 0 to num_curves-1. |
- Returns
- curve corresonding to index in piecewise curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Get curve corresponding to time t in piecewise curve. Example : A piecewise curve PC made of two curves : c1 for t in [0,1] and c2 for t in ]1,2]. PC.curve_at_time(0.5) will return c1.
- Parameters
-
- Returns
- Curve corresponding to time t in piecewise curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
virtual std::size_t curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::degree |
( |
| ) |
const |
|
inlinevirtual |
Get the degree of the curve.
- Returns
, the degree 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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
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 spline 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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
virtual std::size_t curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::dim |
( |
| ) |
const |
|
inlinevirtual |
Get dimension of curve.
- Returns
- dimension of curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
bool curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::is_continuous |
( |
const std::size_t |
order | ) |
|
|
inline |
Check if the curve is continuous of order given.
- Parameters
-
order | : order of continuity we want to check. |
- Returns
- True if the curve is continuous of order given.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
virtual bool curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::isApprox |
( |
const base_curve_t * |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits<Numeric>::dummy_precision() |
|
) |
| const |
|
inlinevirtual |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
bool curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::isApprox |
( |
const piecewise_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
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<typename Polynomial >
load_piecewise_from_text_file build a piecewise polynomial from a list of discrete points read from a file. The file should contains one points per line, optionally with it's derivative and second derivatives. Each lines should then contains dim, 2*dim or 3*dim values
- Parameters
-
filename | the (absolute) name of the file to load |
dt | the time step between each points in the file |
dim | the dimension of the curve |
- Returns
- a piecewise curves containing polynomial connectiong all the points in the file
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Get the maximum time for which the curve is defined.
- Returns
, upper bound of time range.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Get the minimum time for which the curve is defined.
- Returns
, lower bound of time range.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
Get number of curves in piecewise curve.
- Returns
- Number of curves in piecewise curve.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
template<class Archive >
void curves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
inline |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
friend class boost::serialization::access |
|
friend |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<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, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>