ndcurves 2.3.0
create and manipulate spline and bezier curves.
Loading...
Searching...
No Matches
ndcurves Namespace Reference

Namespaces

namespace  helpers
namespace  optimization
namespace  serialization

Classes

struct  bezier_curve
class  constant_curve
 Represents a constant_curve curve, always returning the same value and a null derivative. More...
struct  cubic_hermite_spline
struct  curve_abc
 Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on the evaluation of the curve. More...
struct  curve_constraints
struct  exact_cubic
struct  piecewise_curve
class  polynomial
 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...
class  SE3Curve
 Composition of a curve of any type of dimension 3 and a curve representing an rotation (in current implementation, only SO3Linear can be used for the rotation part) The output is a vector of size 7 (pos_x,pos_y,pos_z,quat_x,quat_y,quat_z,quat_w) The output of the derivative of any order is a vector of size 6 (linear_x,linear_y,linear_z,angular_x,angular_y,angular_z). More...
class  sinusoidal
 Represents a sinusoidal curve, evaluating the following equation: p0 + amplitude * (sin(2pi/T + phi). More...
class  SO3Linear
 Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion. More...
struct  SO3Smooth
struct  Bern
struct  linear_variable
struct  quadratic_variable

Typedefs

typedef Eigen::Matrix< double, 1, 1 > point1_t
typedef Eigen::Vector3d point3_t
typedef Eigen::Matrix< double, 6, 1 > point6_t
typedef Eigen::VectorXd pointX_t
typedef Eigen::Matrix< double, 3, 3 > matrix3_t
typedef Eigen::Matrix< double, 4, 4 > matrix4_t
typedef Eigen::Quaternion< double > quaternion_t
typedef Eigen::Transform< double, 3, Eigen::Affine > transform_t
typedef std::vector< point1_t, Eigen::aligned_allocator< point1_t > > t_point1_t
typedef std::vector< point3_t, Eigen::aligned_allocator< point3_t > > t_point3_t
typedef std::vector< pointX_t, Eigen::aligned_allocator< pointX_t > > t_pointX_t
typedef Eigen::Ref< const matrix3_tmatrix3_t_cst_ref
typedef curve_abc< double, double, true, pointX_t, pointX_tcurve_abc_t
typedef curve_abc< double, double, true, point3_t, point3_tcurve_3_t
typedef curve_3_t curve_translation_t
typedef curve_abc< double, double, true, matrix3_t, point3_tcurve_rotation_t
typedef curve_abc< double, double, true, transform_t, point6_tcurve_SE3_t
typedef std::shared_ptr< curve_abc_tcurve_ptr_t
typedef std::shared_ptr< curve_3_tcurve3_ptr_t
typedef std::shared_ptr< curve_rotation_tcurve_rotation_ptr_t
typedef std::shared_ptr< curve_translation_tcurve_translation_ptr_t
typedef std::shared_ptr< curve_SE3_tcurve_SE3_ptr_t
typedef polynomial< double, double, true, pointX_t, t_pointX_tpolynomial_t
typedef exact_cubic< double, double, true, pointX_t, t_pointX_t, polynomial_texact_cubic_t
typedef bezier_curve< double, double, true, pointX_tbezier_t
typedef linear_variable< double, true > linear_variable_t
typedef bezier_curve< double, double, true, linear_variable_tbezier_linear_variable_t
typedef constant_curve< double, double, true, pointX_t, pointX_tconstant_t
typedef cubic_hermite_spline< double, double, true, pointX_tcubic_hermite_spline_t
typedef piecewise_curve< double, double, true, pointX_t, pointX_t, curve_abc_tpiecewise_t
typedef sinusoidal< double, double, true, pointX_tsinusoidal_t
typedef polynomial< double, double, true, point3_t, t_point3_tpolynomial3_t
typedef polynomial< double, double, true, point1_t, t_point1_tpolynomial1_t
typedef exact_cubic< double, double, true, point3_t, t_point3_t, polynomial_texact_cubic3_t
typedef bezier_curve< double, double, true, point3_tbezier3_t
typedef constant_curve< double, double, true, point3_t, point3_tconstant3_t
typedef cubic_hermite_spline< double, double, true, point3_tcubic_hermite_spline3_t
typedef piecewise_curve< double, double, true, point3_t, point3_t, curve_3_tpiecewise3_t
typedef SO3Smooth< double, double, true > SO3Smooth_t
typedef SO3Linear< double, double, true > SO3Linear_t
typedef SE3Curve< double, double, true > SE3Curve_t
typedef piecewise_curve< double, double, true, transform_t, point6_t, curve_SE3_tpiecewise_SE3_t
typedef double real
typedef std::vector< realt_time_t
typedef Eigen::VectorXd time_waypoints_t
typedef Eigen::Matrix< double, Eigen::Dynamic, 1, 0, Eigen::Dynamic, 1 > ret_pointX_t
typedef std::pair< pointX_t, pointX_tpair_pointX_tangent_t
typedef Eigen::MatrixXd pointX_list_t
typedef std::vector< pair_pointX_tangent_t, Eigen::aligned_allocator< pair_pointX_tangent_t > > t_pair_pointX_tangent_t
typedef ndcurves::curve_constraints< pointX_tcurve_constraints_t
typedef ndcurves::curve_constraints< point3_tcurve_constraints3_t
typedef std::pair< real, pointX_twaypoint_t
typedef std::vector< waypoint_tt_waypoint_t
typedef Eigen::Matrix< real, Eigen::Dynamic, Eigen::Dynamic > point_listX_t
typedef Eigen::Matrix< real, 3, Eigen::Dynamic > point_list3_t
typedef Eigen::Matrix< real, 6, Eigen::Dynamic > point_list6_t
typedef polynomial_t::coeff_t coeff_t
typedef ndcurves::Bern< double > bernstein_t

Functions

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
ndcurves::bezier_curve curve_abc waypoints () const
const point_t waypointAtIndex (const std::size_t index) const
point_t evalDeCasteljau (const Numeric t) const
 Evaluate the curve value at time t using deCasteljau algorithm. The algorithm will compute the $N-1$ centroids of parameters ${t,1-t}$ of consecutive $N$ control points of bezier curve, and perform it iteratively until getting one point in the list which will be the evaluation of bezier curve at time $t$.
t_point_t deCasteljauReduction (const Numeric t) const
t_point_t deCasteljauReduction (const t_point_t &pts, const Numeric u) const
 Compute de Casteljau's reduction of the given list of points at time t. For the list $pts$ of N points, compute a new list of points of size N-1 :
$<br>( pts[0]*(1-t)+pts[1], pts[1]*(1-t)+pts[2], ...,
pts[0]*(N-2)+pts[N-1] )$
with t the time when to evaluate bezier curve.
\ The new list contains centroid of parameters ${t,1-t}$ of consecutive points in the list.
std::pair< bezier_curve_t, bezier_curve_tsplit (const Numeric t) const
 Split the bezier curve in 2 at time t.
piecewise_curve_t split (const vector_x_t &times) const
 Split the bezier curve in several curves, all accessible within a piecewise_curve_t.
bezier_curve_t extract (const Numeric t1, const Numeric t2)
 Extract a bezier curve defined between $[t_1,t_2]$ from the actual bezier curve defined between $[T_{min},T_{max}]$ with $T_{min} \leq t_1
       \leq t_2 \leq T_{max}$.
bezier_curve_t cross (const bezier_curve_t &g) const
 Compute the cross product of the current bezier curve by another bezier curve. The cross product p1Xp2 of 2 bezier curves 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 curves. It assumes that a method point_t cross(const point_t&, const point_t&) has been defined.
bezier_curve_t cross (const bezier_curve_t::point_t &point) const
 Compute the cross product of the current bezier b by a point point. The cross product pXpoint of is defined such that forall t, bXpoint(t) = b(t) X point, with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.
bezier_curve_toperator+= (const bezier_curve_t &other)
bezier_curve_toperator-= (const bezier_curve_t &other)
bezier_curve_toperator+= (const bezier_curve_t::point_t &point)
bezier_curve_toperator-= (const bezier_curve_t::point_t &point)
bezier_curve_toperator/= (const double d)
bezier_curve_toperator*= (const double d)
virtual std::size_t dim () const
 Get dimension of curve.
virtual time_t min () const
 Get the minimum time for which the curve is defined.
virtual time_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.
template<class Archive>
void serialize (Archive &ar, const unsigned int version)
Eigen::Vector3d cross (const Eigen::VectorXd &a, const Eigen::VectorXd &b)
Eigen::Vector3d cross (const Eigen::Vector3d &a, const Eigen::Vector3d &b)
Eigen::Vector3f cross (const Eigen::Vector3f &a, const Eigen::Vector3f &b)
template<typename N, bool S>
linear_variable< N, S > cross (const linear_variable< N, S > &a, const linear_variable< N, S > &b)
template<typename T>
bool isApprox (const T a, const T b, const T eps=1e-6)
template<typename Polynomial>
Polynomial polynomial_from_curve (const typename Polynomial::curve_abc_t &curve)
 Converts a cubic hermite spline or a bezier curve to a polynomial.
template<typename Bezier>
Bezier bezier_from_curve (const typename Bezier::curve_abc_t &curve)
 Converts a cubic hermite spline or polynomial of order 3 or less to a cubic bezier curve.
template<typename Hermite>
Hermite hermite_from_curve (const typename Hermite::curve_abc_t &curve)
 Converts a polynomial of order 3 or less/cubic bezier curve to a cubic hermite spline.
template<typename N, bool S>
linear_variable< N, S > operator+ (const linear_variable< N, S > &w1, const linear_variable< N, S > &w2)
template<typename N, bool S>
linear_variable< N, S > operator- (const linear_variable< N, S > &w1, const linear_variable< N, S > &w2)
template<typename N, bool S>
linear_variable< N, S > operator- (const linear_variable< N, S > &w1)
template<typename N, bool S>
linear_variable< N, S > operator* (const double k, const linear_variable< N, S > &w)
template<typename N, bool S>
linear_variable< N, S > operator* (const linear_variable< N, S > &w, const double k)
template<typename N, bool S>
linear_variable< N, S > operator/ (const linear_variable< N, S > &w, const double k)
template<typename BezierFixed, typename BezierLinear, typename X>
BezierFixed evaluateLinear (const BezierLinear &bIn, const X x)
template<typename N, bool S>
std::ostream & operator<< (std::ostream &os, const linear_variable< N, S > &l)
template<typename _Matrix_Type_>
void PseudoInverse (_Matrix_Type_ &pinvmat)
 An inverse kinematics architecture enforcing an arbitrary number of strict priority levels (Reference : Boulic et Al. 2003).
template<typename Matrix3, typename Point>
Matrix3 skew (const Point &x)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator+ (const polynomial< T, N, S, P, TP > &p1, const polynomial< T, N, S, P, TP > &p2)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator+ (const polynomial< T, N, S, P, TP > &p1, const typename polynomial< T, N, S, P, TP >::point_t &point)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator+ (const typename polynomial< T, N, S, P, TP >::point_t &point, const polynomial< T, N, S, P, TP > &p1)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator- (const polynomial< T, N, S, P, TP > &p1, const typename polynomial< T, N, S, P, TP >::point_t &point)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator- (const typename polynomial< T, N, S, P, TP >::point_t &point, const polynomial< T, N, S, P, TP > &p1)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator- (const polynomial< T, N, S, P, TP > &p1)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator- (const polynomial< T, N, S, P, TP > &p1, const polynomial< T, N, S, P, TP > &p2)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator/ (const polynomial< T, N, S, P, TP > &p1, const double k)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator* (const polynomial< T, N, S, P, TP > &p1, const double k)
template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > operator* (const double k, const polynomial< T, N, S, P, TP > &p1)
template<typename PointList, typename T_Point>
T_Point vectorFromEigenArray (const PointList &array)
template<typename PointList, typename T_Point>
T_Point vectorFromEigenVector (const PointList &vector)
template<typename T_point, typename PointList>
PointList vectorToEigenArray (const T_point &vect)
template<typename N>
Eigen::Matrix< N, Eigen::Dynamic, Eigen::Dynamic > to_diagonal (const Eigen::Ref< const Eigen::Matrix< N, Eigen::Dynamic, 1 > > vec)
 Transforms a vector into a diagonal matrix.
template<typename N>
quadratic_variable< N > operator* (const linear_variable< N > &w1, const linear_variable< N > &w2)
template<typename N>
quadratic_variable< N > operator+ (const quadratic_variable< N > &w1, const quadratic_variable< N > &w2)
template<typename N>
quadratic_variable< N > operator- (const quadratic_variable< N > &w1, const quadratic_variable< N > &w2)
template<typename N>
quadratic_variable< N > operator* (const double k, const quadratic_variable< N > &w)
template<typename N>
quadratic_variable< N > operator* (const quadratic_variable< N > &w, const double k)
template<typename N>
quadratic_variable< N > operator/ (const quadratic_variable< N > &w, const double k)

Variables

std::size_t dim_
 Dim of curve.
time_t T_min_
time_t T_max_
time_t mult_T_
std::size_t size_
std::size_t degree_
std::vector< Bern< Numeric > > bernstein_
t_point_t control_points_

Detailed Description

This file define a method register_types that register all the curves class of this package for a boost::Archive This is used to serialize pointer of the abstract class curve_abc

Typedef Documentation

◆ bernstein_t

◆ bezier3_t

typedef bezier_curve<double, double, true, point3_t> ndcurves::bezier3_t

◆ bezier_linear_variable_t

◆ bezier_t

typedef bezier_curve<double, double, true, pointX_t> ndcurves::bezier_t

◆ coeff_t

◆ constant3_t

typedef constant_curve<double, double, true, point3_t, point3_t> ndcurves::constant3_t

◆ constant_t

typedef constant_curve<double, double, true, pointX_t, pointX_t> ndcurves::constant_t

◆ cubic_hermite_spline3_t

◆ cubic_hermite_spline_t

◆ curve3_ptr_t

typedef std::shared_ptr<curve_3_t> ndcurves::curve3_ptr_t

◆ curve_3_t

typedef curve_abc<double, double, true, point3_t, point3_t> ndcurves::curve_3_t

◆ curve_abc_t

typedef curve_abc<double, double, true, pointX_t, pointX_t> ndcurves::curve_abc_t

◆ curve_constraints3_t

◆ curve_constraints_t

◆ curve_ptr_t

typedef std::shared_ptr<curve_abc_t> ndcurves::curve_ptr_t

◆ curve_rotation_ptr_t

◆ curve_rotation_t

typedef curve_abc<double, double, true, matrix3_t, point3_t> ndcurves::curve_rotation_t

◆ curve_SE3_ptr_t

typedef std::shared_ptr<curve_SE3_t> ndcurves::curve_SE3_ptr_t

◆ curve_SE3_t

typedef curve_abc<double, double, true, transform_t, point6_t> ndcurves::curve_SE3_t

◆ curve_translation_ptr_t

◆ curve_translation_t

◆ exact_cubic3_t

◆ exact_cubic_t

◆ linear_variable_t

◆ matrix3_t

typedef Eigen::Matrix<double, 3, 3> ndcurves::matrix3_t

◆ matrix3_t_cst_ref

typedef Eigen::Ref<const matrix3_t> ndcurves::matrix3_t_cst_ref

◆ matrix4_t

typedef Eigen::Matrix<double, 4, 4> ndcurves::matrix4_t

◆ pair_pointX_tangent_t

◆ piecewise3_t

◆ piecewise_SE3_t

◆ piecewise_t

◆ point1_t

typedef Eigen::Matrix<double, 1, 1> ndcurves::point1_t

◆ point3_t

typedef Eigen::Vector3d ndcurves::point3_t

◆ point6_t

typedef Eigen::Matrix<double, 6, 1> ndcurves::point6_t

◆ point_list3_t

typedef Eigen::Matrix<real, 3, Eigen::Dynamic> ndcurves::point_list3_t

◆ point_list6_t

typedef Eigen::Matrix<real, 6, Eigen::Dynamic> ndcurves::point_list6_t

◆ point_listX_t

typedef Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> ndcurves::point_listX_t

◆ pointX_list_t

typedef Eigen::MatrixXd ndcurves::pointX_list_t

◆ pointX_t

typedef Eigen::VectorXd ndcurves::pointX_t

◆ polynomial1_t

typedef polynomial<double, double, true, point1_t, t_point1_t> ndcurves::polynomial1_t

◆ polynomial3_t

typedef polynomial<double, double, true, point3_t, t_point3_t> ndcurves::polynomial3_t

◆ polynomial_t

typedef polynomial<double, double, true, pointX_t, t_pointX_t> ndcurves::polynomial_t

◆ quaternion_t

typedef Eigen::Quaternion<double> ndcurves::quaternion_t

◆ real

typedef double ndcurves::real

◆ ret_pointX_t

typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, Eigen::Dynamic, 1> ndcurves::ret_pointX_t

◆ SE3Curve_t

typedef SE3Curve<double, double, true> ndcurves::SE3Curve_t

◆ sinusoidal_t

typedef sinusoidal<double, double, true, pointX_t> ndcurves::sinusoidal_t

◆ SO3Linear_t

typedef SO3Linear<double, double, true> ndcurves::SO3Linear_t

◆ SO3Smooth_t

typedef SO3Smooth<double, double, true> ndcurves::SO3Smooth_t

◆ t_pair_pointX_tangent_t

typedef std::vector<pair_pointX_tangent_t, Eigen::aligned_allocator<pair_pointX_tangent_t> > ndcurves::t_pair_pointX_tangent_t

◆ t_point1_t

typedef std::vector<point1_t, Eigen::aligned_allocator<point1_t> > ndcurves::t_point1_t

◆ t_point3_t

typedef std::vector<point3_t, Eigen::aligned_allocator<point3_t> > ndcurves::t_point3_t

◆ t_pointX_t

typedef std::vector<pointX_t, Eigen::aligned_allocator<pointX_t> > ndcurves::t_pointX_t

◆ t_time_t

typedef std::vector<real> ndcurves::t_time_t

◆ t_waypoint_t

typedef std::vector<waypoint_t> ndcurves::t_waypoint_t

◆ time_waypoints_t

typedef Eigen::VectorXd ndcurves::time_waypoints_t

◆ transform_t

typedef Eigen::Transform<double, 3, Eigen::Affine> ndcurves::transform_t

◆ waypoint_t

typedef std::pair<real, pointX_t> ndcurves::waypoint_t

Function Documentation

◆ bezier_from_curve()

template<typename Bezier>
Bezier ndcurves::bezier_from_curve ( const typename Bezier::curve_abc_t & curve)

Converts a cubic hermite spline or polynomial of order 3 or less to a cubic bezier curve.

Parameters
curve: the polynomial of order 3 or less/cubic hermite spline defined between [Tmin,Tmax] to convert.
Returns
the equivalent cubic bezier curve.

◆ cross() [1/6]

bezier_curve_t ndcurves::cross ( const bezier_curve_t & g) const

Compute the cross product of the current bezier curve by another bezier curve. The cross product p1Xp2 of 2 bezier curves 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 curves. It assumes that a method point_t cross(const point_t&, const point_t&) has been defined.

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

◆ cross() [2/6]

bezier_curve_t ndcurves::cross ( const bezier_curve_t::point_t & point) const

Compute the cross product of the current bezier b by a point point. The cross product pXpoint of is defined such that forall t, bXpoint(t) = b(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

◆ cross() [3/6]

Eigen::Vector3d ndcurves::cross ( const Eigen::Vector3d & a,
const Eigen::Vector3d & b )
inline

◆ cross() [4/6]

Eigen::Vector3f ndcurves::cross ( const Eigen::Vector3f & a,
const Eigen::Vector3f & b )
inline

◆ cross() [5/6]

Eigen::Vector3d ndcurves::cross ( const Eigen::VectorXd & a,
const Eigen::VectorXd & b )
inline

◆ cross() [6/6]

template<typename N, bool S>
linear_variable< N, S > ndcurves::cross ( const linear_variable< N, S > & a,
const linear_variable< N, S > & b )

◆ deCasteljauReduction() [1/2]

t_point_t ndcurves::deCasteljauReduction ( const Numeric t) const

◆ deCasteljauReduction() [2/2]

t_point_t ndcurves::deCasteljauReduction ( const t_point_t & pts,
const Numeric u ) const

Compute de Casteljau's reduction of the given list of points at time t. For the list $pts$ of N points, compute a new list of points of size N-1 :
$<br>( pts[0]*(1-t)+pts[1], pts[1]*(1-t)+pts[2], ...,
pts[0]*(N-2)+pts[N-1] )$
with t the time when to evaluate bezier curve.
\ The new list contains centroid of parameters ${t,1-t}$ of consecutive points in the list.

Parameters
pts: list of points.
u: NORMALIZED time when to evaluate the curve.
Returns
reduced list of point (size of pts - 1).

◆ degree()

virtual std::size_t ndcurves::degree ( ) const
virtual

Get the degree of the curve.

Returns
$degree$, the degree of the curve.

◆ dim()

virtual std::size_t ndcurves::dim ( ) const
virtual

Get dimension of curve.

Returns
dimension of curve.

◆ evalDeCasteljau()

point_t ndcurves::evalDeCasteljau ( const Numeric t) const

Evaluate the curve value at time t using deCasteljau algorithm. The algorithm will compute the $N-1$ centroids of parameters ${t,1-t}$ of consecutive $N$ control points of bezier curve, and perform it iteratively until getting one point in the list which will be the evaluation of bezier curve at time $t$.

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

◆ evaluateLinear()

template<typename BezierFixed, typename BezierLinear, typename X>
BezierFixed ndcurves::evaluateLinear ( const BezierLinear & bIn,
const X x )

◆ extract()

bezier_curve_t ndcurves::extract ( const Numeric t1,
const Numeric t2 )

Extract a bezier curve defined between $[t_1,t_2]$ from the actual bezier curve defined between $[T_{min},T_{max}]$ with $T_{min} \leq t_1
       \leq t_2 \leq T_{max}$.

Parameters
t1: start time of bezier curve extracted.
t2: end time of bezier curve extracted.
Returns
bezier curve extract defined between $[t_1,t_2]$.

◆ hermite_from_curve()

template<typename Hermite>
Hermite ndcurves::hermite_from_curve ( const typename Hermite::curve_abc_t & curve)

Converts a polynomial of order 3 or less/cubic bezier curve to a cubic hermite spline.

Parameters
curve: the polynomial of order 3 or less/cubic bezier curve defined between [Tmin,Tmax] to convert.
Returns
the equivalent cubic hermite spline.

◆ isApprox()

template<typename T>
bool ndcurves::isApprox ( const T a,
const T b,
const T eps = 1e-6 )

◆ max()

virtual time_t ndcurves::max ( ) const
virtual

Get the maximum time for which the curve is defined.

Returns
$t_{max}$, upper bound of time range.

◆ min()

virtual time_t ndcurves::min ( ) const
virtual

Get the minimum time for which the curve is defined.

Returns
$t_{min}$, lower bound of time range.

◆ operator*() [1/7]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator* ( const double k,
const linear_variable< N, S > & w )

◆ operator*() [2/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator* ( const double k,
const polynomial< T, N, S, P, TP > & p1 )

◆ operator*() [3/7]

template<typename N>
quadratic_variable< N > ndcurves::operator* ( const double k,
const quadratic_variable< N > & w )

◆ operator*() [4/7]

template<typename N>
quadratic_variable< N > ndcurves::operator* ( const linear_variable< N > & w1,
const linear_variable< N > & w2 )
inline

◆ operator*() [5/7]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator* ( const linear_variable< N, S > & w,
const double k )

◆ operator*() [6/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator* ( const polynomial< T, N, S, P, TP > & p1,
const double k )

◆ operator*() [7/7]

template<typename N>
quadratic_variable< N > ndcurves::operator* ( const quadratic_variable< N > & w,
const double k )

◆ operator*=()

bezier_curve_t & ndcurves::operator*= ( const double d)

◆ operator+() [1/5]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator+ ( const linear_variable< N, S > & w1,
const linear_variable< N, S > & w2 )
inline

◆ operator+() [2/5]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator+ ( const polynomial< T, N, S, P, TP > & p1,
const polynomial< T, N, S, P, TP > & p2 )

◆ operator+() [3/5]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator+ ( const polynomial< T, N, S, P, TP > & p1,
const typename polynomial< T, N, S, P, TP >::point_t & point )

◆ operator+() [4/5]

template<typename N>
quadratic_variable< N > ndcurves::operator+ ( const quadratic_variable< N > & w1,
const quadratic_variable< N > & w2 )
inline

◆ operator+() [5/5]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator+ ( const typename polynomial< T, N, S, P, TP >::point_t & point,
const polynomial< T, N, S, P, TP > & p1 )

◆ operator+=() [1/2]

bezier_curve_t & ndcurves::operator+= ( const bezier_curve_t & other)

◆ operator+=() [2/2]

bezier_curve_t & ndcurves::operator+= ( const bezier_curve_t::point_t & point)

◆ operator-() [1/7]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator- ( const linear_variable< N, S > & w1)

◆ operator-() [2/7]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator- ( const linear_variable< N, S > & w1,
const linear_variable< N, S > & w2 )

◆ operator-() [3/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator- ( const polynomial< T, N, S, P, TP > & p1)

◆ operator-() [4/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator- ( const polynomial< T, N, S, P, TP > & p1,
const polynomial< T, N, S, P, TP > & p2 )

◆ operator-() [5/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator- ( const polynomial< T, N, S, P, TP > & p1,
const typename polynomial< T, N, S, P, TP >::point_t & point )

◆ operator-() [6/7]

template<typename N>
quadratic_variable< N > ndcurves::operator- ( const quadratic_variable< N > & w1,
const quadratic_variable< N > & w2 )

◆ operator-() [7/7]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator- ( const typename polynomial< T, N, S, P, TP >::point_t & point,
const polynomial< T, N, S, P, TP > & p1 )

◆ operator-=() [1/2]

bezier_curve_t & ndcurves::operator-= ( const bezier_curve_t & other)

◆ operator-=() [2/2]

bezier_curve_t & ndcurves::operator-= ( const bezier_curve_t::point_t & point)

◆ operator/() [1/3]

template<typename N, bool S>
linear_variable< N, S > ndcurves::operator/ ( const linear_variable< N, S > & w,
const double k )

◆ operator/() [2/3]

template<typename T, typename N, bool S, typename P, typename TP>
polynomial< T, N, S, P, TP > ndcurves::operator/ ( const polynomial< T, N, S, P, TP > & p1,
const double k )

◆ operator/() [3/3]

template<typename N>
quadratic_variable< N > ndcurves::operator/ ( const quadratic_variable< N > & w,
const double k )

◆ operator/=()

bezier_curve_t & ndcurves::operator/= ( const double d)

◆ operator<<()

template<typename N, bool S>
std::ostream & ndcurves::operator<< ( std::ostream & os,
const linear_variable< N, S > & l )

◆ polynomial_from_curve()

template<typename Polynomial>
Polynomial ndcurves::polynomial_from_curve ( const typename Polynomial::curve_abc_t & curve)

Converts a cubic hermite spline or a bezier curve to a polynomial.

Parameters
curve: the bezier curve/cubic hermite spline defined between [Tmin,Tmax] to convert.
Returns
the equivalent polynomial.

◆ PseudoInverse()

template<typename _Matrix_Type_>
void ndcurves::PseudoInverse ( _Matrix_Type_ & pinvmat)

An inverse kinematics architecture enforcing an arbitrary number of strict priority levels (Reference : Boulic et Al. 2003).

◆ serialize()

template<class Archive>
void ndcurves::serialize ( Archive & ar,
const unsigned int version )

◆ skew()

template<typename Matrix3, typename Point>
Matrix3 ndcurves::skew ( const Point & x)

◆ split() [1/2]

std::pair< bezier_curve_t, bezier_curve_t > ndcurves::split ( const Numeric t) const

Split the bezier curve in 2 at time t.

Parameters
t: list of points.
Returns
pair containing the first element of both bezier curve obtained.

◆ split() [2/2]

piecewise_curve_t ndcurves::split ( const vector_x_t & times) const

Split the bezier curve in several curves, all accessible within a piecewise_curve_t.

Parameters
times: list of times of size n.
Returns
a piecewise_curve_t comprising n+1 curves

◆ to_diagonal()

template<typename N>
Eigen::Matrix< N, Eigen::Dynamic, Eigen::Dynamic > ndcurves::to_diagonal ( const Eigen::Ref< const Eigen::Matrix< N, Eigen::Dynamic, 1 > > vec)

Transforms a vector into a diagonal matrix.

◆ vectorFromEigenArray()

template<typename PointList, typename T_Point>
T_Point ndcurves::vectorFromEigenArray ( const PointList & array)

◆ vectorFromEigenVector()

template<typename PointList, typename T_Point>
T_Point ndcurves::vectorFromEigenVector ( const PointList & vector)

◆ vectorToEigenArray()

template<typename T_point, typename PointList>
PointList ndcurves::vectorToEigenArray ( const T_point & vect)

◆ waypointAtIndex()

const point_t ndcurves::waypointAtIndex ( const std::size_t index) const

◆ waypoints()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>>
ndcurves::bezier_curve curve_abc ndcurves::waypoints ( ) const

Variable Documentation

◆ bernstein_

std::vector<Bern<Numeric> > ndcurves::bernstein_

◆ control_points_

t_point_t ndcurves::control_points_

◆ degree_

std::size_t ndcurves::degree_

◆ dim_

std::size_t ndcurves::dim_

Dim of curve.

◆ mult_T_

time_t ndcurves::mult_T_

◆ size_

std::size_t ndcurves::size_

◆ T_max_

time_t ndcurves::T_max_

Ending time of cubic hermite spline : T_max_ is equal to last time of control points.

◆ T_min_

time_t ndcurves::T_min_

Starting time of cubic hermite spline : T_min_ is equal to first time of control points.