Loading...
Searching...
No Matches
ndcurves::SE3Curve< Time, Numeric, Safe > Class Template Reference

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...

#include <ndcurves/se3_curve.h>

Inheritance diagram for ndcurves::SE3Curve< Time, Numeric, Safe >:
Collaboration diagram for ndcurves::SE3Curve< Time, Numeric, Safe >:

Public Types

typedef Numeric Scalar
 
typedef Eigen::Transform< Numeric, 3, Eigen::Affine > transform_t
 
typedef transform_t point_t
 
typedef Eigen::Matrix< Scalar, 6, 1 > point_derivate_t
 
typedef Eigen::Quaternion< ScalarQuaternion
 
typedef Time time_t
 
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_tcurve_abc_t
 
typedef polynomial< Time, Numeric, Safe, point_derivate_tcurve_derivate_t
 
typedef curve_abc< Time, Numeric, Safe, pointX_tcurve_X_t
 
typedef curve_abc< Time, Numeric, Safe, point3_t, point3_tcurve_translation_t
 
typedef curve_abc< Time, Numeric, Safe, matrix3_t, point3_tcurve_rotation_t
 
typedef std::shared_ptr< curve_X_tcurve_ptr_t
 
typedef std::shared_ptr< curve_rotation_tcurve_rotation_ptr_t
 
typedef std::shared_ptr< curve_translation_tcurve_translation_ptr_t
 
typedef SO3Linear< Time, Numeric, SafeSO3Linear_t
 
typedef polynomial< Time, Numeric, Safe, pointX_tpolynomial_t
 
typedef SE3Curve< Time, Numeric, SafeSE3Curve_t
 
- Public Types inherited from ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
typedef Point point_t
 
typedef Point_derivate point_derivate_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_tcurve_t
 
typedef curve_abc< Time, Numeric, Safe, point_derivate_tcurve_derivate_t
 
typedef std::shared_ptr< curve_tcurve_ptr_t
 

Public Member Functions

 SE3Curve ()
 Empty constructor. Curve obtained this way can not perform other class functions.
 
virtual ~SE3Curve ()
 Destructor.
 
 SE3Curve (const transform_t &init_transform, const transform_t &end_transform, const time_t &t_min, const time_t &t_max)
 Constructor from init/end transform use polynomial of degree 1 for position and SO3Linear for rotation.
 
 SE3Curve (const point3_t &init_pos, const point3_t &end_pos, const Quaternion &init_rot, const Quaternion &end_rot, const time_t &t_min, const time_t &t_max)
 Constructor from init/end pose, with quaternion. use polynomial of degree 1 for position and SO3Linear for rotation.
 
 SE3Curve (const point3_t &init_pos, const point3_t &end_pos, const matrix3_t &init_rot, const matrix3_t &end_rot, const time_t &t_min, const time_t &t_max)
 Constructor from init/end pose, with rotation matrix. use polynomial of degree 1 for position and SO3Linear for rotation.
 
 SE3Curve (curve_translation_ptr_t translation_curve, const Quaternion &init_rot, const Quaternion &end_rot)
 Constructor from curve for the translation and init/end rotation, with quaternion. Use SO3Linear for rotation with the same time bounds as the.
 
 SE3Curve (curve_translation_ptr_t translation_curve, const matrix3_t &init_rot, const matrix3_t &end_rot)
 Constructor from curve for the translation and init/end rotation, with rotation matrix. Use SO3Linear for rotation with the same time bounds as the.
 
 SE3Curve (curve_translation_ptr_t translation_curve, curve_rotation_ptr_t rotation_curve)
 Constructor from from translation and rotation curves object.
 
virtual point_t operator() (const time_t t) const
 Evaluation of the SE3Curve at time t.
 
bool isApprox (const SE3Curve_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 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
 
virtual bool isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 isApprox check if other and *this are approximately equal given a precision threshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.
 
virtual bool operator== (const SE3Curve_t &other) const
 
virtual bool operator!= (const SE3Curve_t &other) const
 
virtual point_derivate_t derivate (const time_t t, const std::size_t order) const
 Evaluation of the derivative of order N of spline at time t.
 
curve_derivate_t compute_derivate (const std::size_t) const
 
curve_derivate_tcompute_derivate_ptr (const std::size_t order) const
 Compute the derived curve at order N.
 
virtual std::size_t dim () const
 Get dimension of curve.
 
time_t min () const
 Get the minimum time for which the curve is defined.
 
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.
 
const curve_translation_ptr_t translation_curve () const
 const accessor to the translation curve
 
const curve_rotation_ptr_t rotation_curve () const
 const accessor to the rotation curve
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
 curve_abc ()
 Constructor.
 
virtual ~curve_abc ()
 Destructor.
 
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 threshold. This test is done by discretizing both curves and evaluating them and their derivatives.
 
std::pair< time_t, time_ttimeRange ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from ndcurves::serialization::Serializable
template<class Derived >
void loadFromText (const std::string &filename)
 Loads a Derived object from a text file.
 
template<class Derived >
void saveAsText (const std::string &filename) const
 Saved a Derived object as a text file.
 
template<class Derived >
void loadFromXML (const std::string &filename, const std::string &tag_name)
 Loads a Derived object from an XML file.
 
template<class Derived >
void saveAsXML (const std::string &filename, const std::string &tag_name) const
 Saved a Derived object as an XML file.
 
template<class Derived >
void loadFromBinary (const std::string &filename)
 Loads a Derived object from an binary file.
 
template<class Derived >
void saveAsBinary (const std::string &filename) const
 Saved a Derived object as an binary file.
 

Public Attributes

std::size_t dim_
 
curve_translation_ptr_t translation_curve_
 
curve_rotation_ptr_t rotation_curve_
 
time_t T_min_
 
time_t T_max_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Time = double, typename Numeric = Time, bool Safe = false>
class ndcurves::SE3Curve< Time, Numeric, Safe >

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)

Member Typedef Documentation

◆ curve_abc_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef curve_abc<Time, Numeric, Safe, point_t, point_derivate_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_abc_t

◆ curve_derivate_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef polynomial<Time, Numeric, Safe, point_derivate_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_derivate_t

◆ curve_ptr_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef std::shared_ptr<curve_X_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_ptr_t

◆ curve_rotation_ptr_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef std::shared_ptr<curve_rotation_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_rotation_ptr_t

◆ curve_rotation_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef curve_abc<Time, Numeric, Safe, matrix3_t, point3_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_rotation_t

◆ curve_translation_ptr_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef std::shared_ptr<curve_translation_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_translation_ptr_t

◆ curve_translation_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef curve_abc<Time, Numeric, Safe, point3_t, point3_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_translation_t

◆ curve_X_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef curve_abc<Time, Numeric, Safe, pointX_t> ndcurves::SE3Curve< Time, Numeric, Safe >::curve_X_t

◆ point_derivate_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef Eigen::Matrix<Scalar, 6, 1> ndcurves::SE3Curve< Time, Numeric, Safe >::point_derivate_t

◆ point_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef transform_t ndcurves::SE3Curve< Time, Numeric, Safe >::point_t

◆ polynomial_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef polynomial<Time, Numeric, Safe, pointX_t> ndcurves::SE3Curve< Time, Numeric, Safe >::polynomial_t

◆ Quaternion

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef Eigen::Quaternion<Scalar> ndcurves::SE3Curve< Time, Numeric, Safe >::Quaternion

◆ Scalar

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef Numeric ndcurves::SE3Curve< Time, Numeric, Safe >::Scalar

◆ SE3Curve_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef SE3Curve<Time, Numeric, Safe> ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve_t

◆ SO3Linear_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef SO3Linear<Time, Numeric, Safe> ndcurves::SE3Curve< Time, Numeric, Safe >::SO3Linear_t

◆ time_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef Time ndcurves::SE3Curve< Time, Numeric, Safe >::time_t

◆ transform_t

template<typename Time = double, typename Numeric = Time, bool Safe = false>
typedef Eigen::Transform<Numeric, 3, Eigen::Affine> ndcurves::SE3Curve< Time, Numeric, Safe >::transform_t

Constructor & Destructor Documentation

◆ SE3Curve() [1/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( )
inline

Empty constructor. Curve obtained this way can not perform other class functions.

◆ ~SE3Curve()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual ndcurves::SE3Curve< Time, Numeric, Safe >::~SE3Curve ( )
inlinevirtual

Destructor.

◆ SE3Curve() [2/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( const transform_t init_transform,
const transform_t end_transform,
const time_t t_min,
const time_t t_max 
)
inline

Constructor from init/end transform use polynomial of degree 1 for position and SO3Linear for rotation.

◆ SE3Curve() [3/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( const point3_t init_pos,
const point3_t end_pos,
const Quaternion init_rot,
const Quaternion end_rot,
const time_t t_min,
const time_t t_max 
)
inline

Constructor from init/end pose, with quaternion. use polynomial of degree 1 for position and SO3Linear for rotation.

◆ SE3Curve() [4/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( const point3_t init_pos,
const point3_t end_pos,
const matrix3_t init_rot,
const matrix3_t end_rot,
const time_t t_min,
const time_t t_max 
)
inline

Constructor from init/end pose, with rotation matrix. use polynomial of degree 1 for position and SO3Linear for rotation.

◆ SE3Curve() [5/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( curve_translation_ptr_t  translation_curve,
const Quaternion init_rot,
const Quaternion end_rot 
)
inline

Constructor from curve for the translation and init/end rotation, with quaternion. Use SO3Linear for rotation with the same time bounds as the.

◆ SE3Curve() [6/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( curve_translation_ptr_t  translation_curve,
const matrix3_t init_rot,
const matrix3_t end_rot 
)
inline

Constructor from curve for the translation and init/end rotation, with rotation matrix. Use SO3Linear for rotation with the same time bounds as the.

◆ SE3Curve() [7/7]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
ndcurves::SE3Curve< Time, Numeric, Safe >::SE3Curve ( curve_translation_ptr_t  translation_curve,
curve_rotation_ptr_t  rotation_curve 
)
inline

Constructor from from translation and rotation curves object.

Member Function Documentation

◆ compute_derivate()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
curve_derivate_t ndcurves::SE3Curve< Time, Numeric, Safe >::compute_derivate ( const std::size_t  ) const
inline

◆ compute_derivate_ptr()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
curve_derivate_t * ndcurves::SE3Curve< Time, Numeric, Safe >::compute_derivate_ptr ( const std::size_t  order) const
inlinevirtual

Compute the derived curve at order N.

Parameters
order: order of derivative.
Returns
A pointer to \(\frac{d^Nx(t)}{dt^N}\) derivative order N of the curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ degree()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual std::size_t ndcurves::SE3Curve< Time, Numeric, Safe >::degree ( ) const
inlinevirtual

Get the degree of the curve.

Returns
\(degree\), the degree of the curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ derivate()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual point_derivate_t ndcurves::SE3Curve< Time, Numeric, Safe >::derivate ( const time_t  t,
const std::size_t  order 
) const
inlinevirtual

Evaluation of the derivative of order N of spline at time t.

Parameters
t: the time when to evaluate the spline.
order: order of derivative.
Returns
\(\frac{d^Nx(t)}{dt^N}\) point corresponding on derivative spline at time t.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ dim()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual std::size_t ndcurves::SE3Curve< Time, Numeric, Safe >::dim ( ) const
inlinevirtual

Get dimension of curve.

Returns
dimension of curve.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ isApprox() [1/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual bool ndcurves::SE3Curve< Time, Numeric, Safe >::isApprox ( const curve_abc_t other,
const Numeric  prec = Eigen::NumTraits< Numeric >::dummy_precision() 
) const
inlinevirtual

isApprox check if other and *this are approximately equal given a precision threshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.

Parameters
otherthe other curve to check
precthe precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true if the two curves are approximately equal

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ isApprox() [2/2]

template<typename Time = double, typename Numeric = Time, bool Safe = false>
bool ndcurves::SE3Curve< Time, Numeric, Safe >::isApprox ( const SE3Curve_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
otherthe other curve to check
precthe precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true is the two curves are approximately equals

◆ max()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
time_t ndcurves::SE3Curve< Time, Numeric, Safe >::max ( ) const
inlinevirtual

Get the maximum time for which the curve is defined.

Returns
\(t_{max}\) upper bound of time range.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ min()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
time_t ndcurves::SE3Curve< Time, Numeric, Safe >::min ( ) const
inlinevirtual

Get the minimum time for which the curve is defined.

Returns
\(t_{min}\) lower bound of time range.

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ operator!=()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual bool ndcurves::SE3Curve< Time, Numeric, Safe >::operator!= ( const SE3Curve_t other) const
inlinevirtual

◆ operator()()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual point_t ndcurves::SE3Curve< Time, Numeric, Safe >::operator() ( const time_t  t) const
inlinevirtual

Evaluation of the SE3Curve at time t.

Parameters
t: time when to evaluate the spline.
Returns
\(x(t)\) point corresponding on spline at time t. (pos_x,pos_y,pos_z,quat_x,quat_y,quat_z,quat_w)

Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.

◆ operator==()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
virtual bool ndcurves::SE3Curve< Time, Numeric, Safe >::operator== ( const SE3Curve_t other) const
inlinevirtual

◆ rotation_curve()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
const curve_rotation_ptr_t ndcurves::SE3Curve< Time, Numeric, Safe >::rotation_curve ( ) const
inline

const accessor to the rotation curve

◆ serialize()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
template<class Archive >
void ndcurves::SE3Curve< Time, Numeric, Safe >::serialize ( Archive ar,
const unsigned int  version 
)
inline

◆ translation_curve()

template<typename Time = double, typename Numeric = Time, bool Safe = false>
const curve_translation_ptr_t ndcurves::SE3Curve< Time, Numeric, Safe >::translation_curve ( ) const
inline

const accessor to the translation curve

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<typename Time = double, typename Numeric = Time, bool Safe = false>
friend class boost::serialization::access
friend

Member Data Documentation

◆ dim_

template<typename Time = double, typename Numeric = Time, bool Safe = false>
std::size_t ndcurves::SE3Curve< Time, Numeric, Safe >::dim_

◆ rotation_curve_

template<typename Time = double, typename Numeric = Time, bool Safe = false>
curve_rotation_ptr_t ndcurves::SE3Curve< Time, Numeric, Safe >::rotation_curve_

◆ T_max_

template<typename Time = double, typename Numeric = Time, bool Safe = false>
time_t ndcurves::SE3Curve< Time, Numeric, Safe >::T_max_

◆ T_min_

template<typename Time = double, typename Numeric = Time, bool Safe = false>
time_t ndcurves::SE3Curve< Time, Numeric, Safe >::T_min_

◆ translation_curve_

template<typename Time = double, typename Numeric = Time, bool Safe = false>
curve_translation_ptr_t ndcurves::SE3Curve< Time, Numeric, Safe >::translation_curve_

The documentation for this class was generated from the following files: