Loading...
Searching...
No Matches
ndcurves::helpers::rotation_spline Class Reference

#include <ndcurves/helpers/effector_spline_rotation.h>

Inheritance diagram for ndcurves::helpers::rotation_spline:
Collaboration diagram for ndcurves::helpers::rotation_spline:

Public Member Functions

 rotation_spline (quat_ref_const_t quat_from=quat_t(0, 0, 0, 1), quat_ref_const_t quat_to=quat_t(0, 0, 0, 1), const double min=0., const double max=1.)
 
 ~rotation_spline ()
 
rotation_splineoperator= (const rotation_spline &from)
 
quat_t operator() (const Numeric t) const
 
bool isApprox (const rotation_spline &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_quat_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 
virtual bool operator== (const rotation_spline &other) const
 
virtual bool operator!= (const rotation_spline &other) const
 
virtual quat_t derivate (time_t, std::size_t) const
 
curve_abc_quat_tcompute_derivate_ptr (const std::size_t) const
 Compute the derived curve at order N.
 
exact_cubic_constraint_one_dim computeWayPoints () const
 Initialize time re-parametrization for spline.
 
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.
 
- Public Member Functions inherited from ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >
 curve_abc ()
 Constructor.
 
virtual ~curve_abc ()
 Destructor.
 
virtual point_t operator() (const time_t t) const =0
 Evaluation of the cubic spline at time t.
 
virtual point_derivate_t derivate (const time_t t, const std::size_t order) const =0
 Evaluate the derivative of order N of curve at time t.
 
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.
 
virtual bool isApprox (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const =0
 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.
 
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

Eigen::Quaterniond quat_from_
 
Eigen::Quaterniond quat_to_
 
std::size_t dim_
 
double min_
 
double max_
 
exact_cubic_constraint_one_dim time_reparam_
 

Additional Inherited Members

- 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
 

Constructor & Destructor Documentation

◆ rotation_spline()

ndcurves::helpers::rotation_spline::rotation_spline ( quat_ref_const_t  quat_from = quat_t(0, 0, 0, 1),
quat_ref_const_t  quat_to = quat_t(0, 0, 0, 1),
const double  min = 0.,
const double  max = 1. 
)
inline

◆ ~rotation_spline()

ndcurves::helpers::rotation_spline::~rotation_spline ( )
inline

Member Function Documentation

◆ compute_derivate_ptr()

curve_abc_quat_t * ndcurves::helpers::rotation_spline::compute_derivate_ptr ( const std::size_t  ) 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 >.

◆ computeWayPoints()

exact_cubic_constraint_one_dim ndcurves::helpers::rotation_spline::computeWayPoints ( ) const
inline

Initialize time re-parametrization for spline.

◆ degree()

virtual std::size_t ndcurves::helpers::rotation_spline::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()

virtual quat_t ndcurves::helpers::rotation_spline::derivate ( time_t  ,
std::size_t   
) const
inlinevirtual

◆ dim()

virtual std::size_t ndcurves::helpers::rotation_spline::dim ( ) const
inlinevirtual

Get dimension of curve.

Returns
dimension of curve.

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

◆ isApprox() [1/2]

virtual bool ndcurves::helpers::rotation_spline::isApprox ( const curve_abc_quat_t other,
const Numeric  prec = Eigen::NumTraits<Numeric>::dummy_precision() 
) const
inlinevirtual

◆ isApprox() [2/2]

bool ndcurves::helpers::rotation_spline::isApprox ( const rotation_spline 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()

virtual time_t ndcurves::helpers::rotation_spline::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()

virtual time_t ndcurves::helpers::rotation_spline::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!=()

◆ operator()()

◆ operator=()

◆ operator==()

Member Data Documentation

◆ dim_

std::size_t ndcurves::helpers::rotation_spline::dim_

◆ max_

double ndcurves::helpers::rotation_spline::max_

◆ min_

double ndcurves::helpers::rotation_spline::min_

◆ quat_from_

Eigen::Quaterniond ndcurves::helpers::rotation_spline::quat_from_

◆ quat_to_

Eigen::Quaterniond ndcurves::helpers::rotation_spline::quat_to_

◆ time_reparam_

exact_cubic_constraint_one_dim ndcurves::helpers::rotation_spline::time_reparam_

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