curves Namespace Reference

Namespaces

 helpers
 
 optimization
 

Classes

struct  Bern
 
struct  bezier_curve
 
struct  cubic_hermite_spline
 
struct  curve_abc
 Represents a curve of dimension Dim. More...
 
struct  curve_constraints
 
struct  exact_cubic
 
struct  linear_variable
 
struct  piecewise_curve
 
class  polynomial
 Represents a polynomial of an arbitrary order defined on the interval $[t_{min}, t_{max}]$. More...
 
struct  quadratic_variable
 
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  SO3Linear
 Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion. More...
 
class  SplineOptimizer
 Mosek connection to produce optimized splines. More...
 

Typedefs

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< point3_t, Eigen::aligned_allocator< point3_t > > t_point3_t
 
typedef std::vector< pointX_t, Eigen::aligned_allocator< pointX_t > > t_pointX_t
 
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_abc< double, double, true, matrix3_t, point3_tcurve_rotation_t
 
typedef curve_abc< double, double, true, transform_t, point6_tcurve_SE3_t
 
typedef boost::shared_ptr< curve_abc_tcurve_ptr_t
 
typedef boost::shared_ptr< curve_3_tcurve3_ptr_t
 
typedef boost::shared_ptr< curve_rotation_tcurve_rotation_ptr_t
 
typedef boost::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 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 polynomial< double, double, true, point3_t, t_point3_tpolynomial3_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 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 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 curves::curve_constraints< pointX_tcurve_constraints_t
 
typedef curves::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 curves::Bern< double > bernstein_t
 

Functions

template<typename Point , typename T_Point >
T_Point make_cubic_vector (Point const &a, Point const &b, Point const &c, Point const &d)
 Creates coefficient vector of a cubic spline defined on the interval $[t_{min}, t_{max}]$. More...
 
template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial< Time, Numeric, Safe, Point, T_Point > create_cubic (Point const &a, Point const &b, Point const &c, Point const &d, const Time t_min, const Time t_max)
 
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. More...
 
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. More...
 
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. More...
 
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 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 _Matrix_Type_ >
void PseudoInverse (_Matrix_Type_ &pinvmat)
 
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. More...
 
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)
 
template<typename Point , typename T_Point >
T_Point make_quintic_vector (Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f)
 Creates coefficient vector of a quintic spline defined on the interval $[t_{min}, t_{max}]$. More...
 
template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial< Time, Numeric, Safe, Point, T_Point > create_quintic (Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f, const Time t_min, const Time t_max)
 

Typedef Documentation

◆ bernstein_t

◆ bezier3_t

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

◆ bezier_t

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

◆ coeff_t

◆ cubic_hermite_spline3_t

◆ cubic_hermite_spline_t

◆ curve3_ptr_t

typedef boost::shared_ptr<curve_3_t> curves::curve3_ptr_t

◆ curve_3_t

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

◆ curve_abc_t

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

◆ curve_constraints3_t

◆ curve_constraints_t

◆ curve_ptr_t

typedef boost::shared_ptr<curve_abc_t> curves::curve_ptr_t

◆ curve_rotation_ptr_t

typedef boost::shared_ptr<curve_rotation_t> curves::curve_rotation_ptr_t

◆ curve_rotation_t

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

◆ curve_SE3_ptr_t

typedef boost::shared_ptr<curve_SE3_t> curves::curve_SE3_ptr_t

◆ curve_SE3_t

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

◆ exact_cubic3_t

◆ exact_cubic_t

◆ matrix3_t

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

◆ matrix4_t

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

◆ pair_pointX_tangent_t

◆ piecewise3_t

◆ piecewise_SE3_t

◆ piecewise_t

◆ point3_t

typedef Eigen::Vector3d curves::point3_t

◆ point6_t

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

◆ point_list3_t

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

◆ point_list6_t

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

◆ point_listX_t

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

◆ pointX_list_t

typedef Eigen::MatrixXd curves::pointX_list_t

◆ pointX_t

typedef Eigen::VectorXd curves::pointX_t

◆ polynomial3_t

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

◆ polynomial_t

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

◆ quaternion_t

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

◆ real

typedef double curves::real

◆ ret_pointX_t

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

◆ SE3Curve_t

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

◆ SO3Linear_t

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

◆ t_pair_pointX_tangent_t

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

◆ t_point3_t

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

◆ t_pointX_t

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

◆ t_time_t

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

◆ t_waypoint_t

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

◆ time_waypoints_t

typedef Eigen::VectorXd curves::time_waypoints_t

◆ transform_t

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

◆ waypoint_t

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

Function Documentation

◆ bezier_from_curve()

template<typename Bezier >
Bezier curves::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.

◆ create_cubic()

template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial<Time, Numeric, Safe, Point, T_Point> curves::create_cubic ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
const Time  t_min,
const Time  t_max 
)

◆ create_quintic()

template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial<Time, Numeric, Safe, Point, T_Point> curves::create_quintic ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
Point const &  e,
Point const &  f,
const Time  t_min,
const Time  t_max 
)

◆ evaluateLinear()

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

◆ hermite_from_curve()

template<typename Hermite >
Hermite curves::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 curves::isApprox ( const T  a,
const T  b,
const T  eps = 1e-6 
)

◆ make_cubic_vector()

template<typename Point , typename T_Point >
T_Point curves::make_cubic_vector ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d 
)

Creates coefficient vector of a cubic spline defined on the interval $[t_{min}, t_{max}]$.

It follows the equation :
$ x(t) = a + b(t - t_{min}) + c(t - t_{min})^2 + d(t - t_{min})^3 $ where $ t \in [t_{min}, t_{max}] $ with a, b, c and d the control points.

◆ make_quintic_vector()

template<typename Point , typename T_Point >
T_Point curves::make_quintic_vector ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
Point const &  e,
Point const &  f 
)

Creates coefficient vector of a quintic spline defined on the interval $[t_{min}, t_{max}]$.

It follows the equation :
$ x(t) = a + b(t - t_{min}) + c(t - t_{min})^2 + d(t - t_{min})^3 + e(t - t_{min})^4 + f(t - t_{min})^5 $
where $ t \in [t_{min}, t_{max}] $.

◆ operator*() [1/5]

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

◆ operator*() [2/5]

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

◆ operator*() [3/5]

◆ operator*() [4/5]

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

◆ operator*() [5/5]

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

◆ operator+() [1/2]

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

◆ operator+() [2/2]

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ polynomial_from_curve()

template<typename Polynomial >
Polynomial curves::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 curves::PseudoInverse ( _Matrix_Type_ &  pinvmat)

◆ to_diagonal()

template<typename N >
Eigen::Matrix<N, Eigen::Dynamic, Eigen::Dynamic> curves::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 curves::vectorFromEigenArray ( const PointList &  array)

◆ vectorFromEigenVector()

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

◆ vectorToEigenArray()

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