curves::SO3Linear Class Reference

Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion. More...

#include <curves/fwd.h>

Public Types

typedef Numeric Scalar
 
typedef matrix3_t point_t
 
typedef point3_t point_derivate_t
 
typedef Eigen::Quaternion< Scalarquaternion_t
 
typedef Time time_t
 
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_tcurve_abc_t
 
typedef constant_curve< Time, Numeric, Safe, point_derivate_tcurve_derivate_t
 
typedef SO3Linear< Time, Numeric, Safe > SO3Linear_t
 

Public Member Functions

 SO3Linear ()
 Empty constructor. Curve obtained this way can not perform other class functions. More...
 
 SO3Linear (const quaternion_t &init_rot, const quaternion_t &end_rot, const time_t t_min, const time_t t_max)
 constructor with initial and final rotation and time bounds More...
 
 SO3Linear (const matrix3_t &init_rot, const matrix3_t &end_rot, const time_t t_min, const time_t t_max)
 constructor with initial and final rotation expressed as rotation matrix and time bounds More...
 
 SO3Linear (const quaternion_t &init_rot, const quaternion_t &end_rot)
 constructor with initial and final rotation, time bounds are set to [0;1] More...
 
 SO3Linear (const matrix3_t &init_rot, const matrix3_t &end_rot)
 constructor with initial and final rotation expressed as rotation matrix, time bounds are set to [0;1] More...
 
 ~SO3Linear ()
 Destructor. More...
 
 SO3Linear (const SO3Linear &other)
 
point3_t computeAngularVelocity (const matrix3_t &init_rot, const matrix3_t &end_rot, const double t_min, const double t_max)
 
quaternion_t computeAsQuaternion (const time_t t) const
 
virtual point_t operator() (const time_t t) const
 Evaluation of the SO3Linear at time t using Eigen slerp. More...
 
bool isApprox (const SO3Linear_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 More...
 
virtual bool isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const
 
virtual bool operator== (const SO3Linear_t &other) const
 
virtual bool operator!= (const SO3Linear_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. More...
 
curve_derivate_t compute_derivate (const std::size_t order) const
 
curve_derivate_tcompute_derivate_ptr (const std::size_t order) const
 Compute the derived curve at order N. More...
 
virtual std::size_t dim () const
 Get dimension of curve. More...
 
time_t min () const
 Get the minimum time for which the curve is defined. More...
 
time_t max () const
 Get the maximum time for which the curve is defined. More...
 
virtual std::size_t degree () const
 Get the degree of the curve. More...
 
matrix3_t getInitRotation () const
 
matrix3_t getEndRotation () const
 
matrix3_t getInitRotation ()
 
matrix3_t getEndRotation ()
 
template<class Archive >
void load (Archive &ar, const unsigned int version)
 
template<class Archive >
void save (Archive &ar, const unsigned int version) const
 
point3_t log3 (const matrix3_t &R)
 Log: SO3 -> so3. More...
 

Public Attributes

std::size_t dim_
 
quaternion_t init_rot_
 
quaternion_t end_rot_
 
point3_t angular_vel_
 
time_t T_min_
 
time_t T_max_
 

Friends

class boost::serialization::access
 

Detailed Description

Represents a linear interpolation in SO3, using the slerp method provided by Eigen::Quaternion.

Member Typedef Documentation

◆ curve_abc_t

◆ curve_derivate_t

◆ point_derivate_t

◆ point_t

◆ quaternion_t

typedef Eigen::Quaternion<Scalar> curves::SO3Linear::quaternion_t

◆ Scalar

typedef Numeric curves::SO3Linear::Scalar

◆ SO3Linear_t

typedef SO3Linear<Time, Numeric, Safe> curves::SO3Linear::SO3Linear_t

◆ time_t

Constructor & Destructor Documentation

◆ SO3Linear() [1/6]

curves::SO3Linear::SO3Linear ( )
inline

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

◆ SO3Linear() [2/6]

curves::SO3Linear::SO3Linear ( const quaternion_t init_rot,
const quaternion_t end_rot,
const time_t  t_min,
const time_t  t_max 
)
inline

constructor with initial and final rotation and time bounds

◆ SO3Linear() [3/6]

curves::SO3Linear::SO3Linear ( const matrix3_t init_rot,
const matrix3_t end_rot,
const time_t  t_min,
const time_t  t_max 
)
inline

constructor with initial and final rotation expressed as rotation matrix and time bounds

◆ SO3Linear() [4/6]

curves::SO3Linear::SO3Linear ( const quaternion_t init_rot,
const quaternion_t end_rot 
)
inline

constructor with initial and final rotation, time bounds are set to [0;1]

◆ SO3Linear() [5/6]

curves::SO3Linear::SO3Linear ( const matrix3_t init_rot,
const matrix3_t end_rot 
)
inline

constructor with initial and final rotation expressed as rotation matrix, time bounds are set to [0;1]

◆ ~SO3Linear()

curves::SO3Linear::~SO3Linear ( )
inline

Destructor.

◆ SO3Linear() [6/6]

curves::SO3Linear::SO3Linear ( const SO3Linear other)
inline

Member Function Documentation

◆ compute_derivate()

curve_derivate_t curves::SO3Linear::compute_derivate ( const std::size_t  order) const
inline

◆ compute_derivate_ptr()

curve_derivate_t* curves::SO3Linear::compute_derivate_ptr ( const std::size_t  order) const
inline

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.

◆ computeAngularVelocity()

point3_t curves::SO3Linear::computeAngularVelocity ( const matrix3_t init_rot,
const matrix3_t end_rot,
const double  t_min,
const double  t_max 
)
inline

◆ computeAsQuaternion()

quaternion_t curves::SO3Linear::computeAsQuaternion ( const time_t  t) const
inline

◆ degree()

virtual std::size_t curves::SO3Linear::degree ( ) const
inlinevirtual

Get the degree of the curve.

Returns
$degree$, the degree of the curve.

◆ derivate()

virtual point_derivate_t curves::SO3Linear::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.

◆ dim()

virtual std::size_t curves::SO3Linear::dim ( ) const
inlinevirtual

Get dimension of curve.

Returns
dimension of curve.

◆ getEndRotation() [1/2]

matrix3_t curves::SO3Linear::getEndRotation ( )
inline

◆ getEndRotation() [2/2]

matrix3_t curves::SO3Linear::getEndRotation ( ) const
inline

◆ getInitRotation() [1/2]

matrix3_t curves::SO3Linear::getInitRotation ( )
inline

◆ getInitRotation() [2/2]

matrix3_t curves::SO3Linear::getInitRotation ( ) const
inline

◆ isApprox() [1/2]

virtual bool curves::SO3Linear::isApprox ( const curve_abc_t other,
const Numeric  prec = Eigen::NumTraits<Numeric>::dummy_precision() 
) const
inlinevirtual

◆ isApprox() [2/2]

bool curves::SO3Linear::isApprox ( const SO3Linear_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 treshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true is the two curves are approximately equals

◆ load()

template<class Archive >
void curves::SO3Linear::load ( Archive &  ar,
const unsigned int  version 
)
inline

◆ log3()

point3_t curves::SO3Linear::log3 ( const matrix3_t R)
inline

Log: SO3 -> so3.

Pseudo-inverse of log from $ SO3 -> { v \in so3, ||v|| \le pi } $.

Code from pinocchio.

Parameters
[in]Rthe rotation matrix. ///
Returns
The angular velocity vector associated to the rotation matrix.

◆ max()

time_t curves::SO3Linear::max ( ) const
inline

Get the maximum time for which the curve is defined.

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

◆ min()

time_t curves::SO3Linear::min ( ) const
inline

Get the minimum time for which the curve is defined.

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

◆ operator!=()

virtual bool curves::SO3Linear::operator!= ( const SO3Linear_t other) const
inlinevirtual

◆ operator()()

virtual point_t curves::SO3Linear::operator() ( const time_t  t) const
inlinevirtual

Evaluation of the SO3Linear at time t using Eigen slerp.

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

◆ operator==()

virtual bool curves::SO3Linear::operator== ( const SO3Linear_t other) const
inlinevirtual

◆ save()

template<class Archive >
void curves::SO3Linear::save ( Archive &  ar,
const unsigned int  version 
) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ angular_vel_

point3_t curves::SO3Linear::angular_vel_

◆ dim_

std::size_t curves::SO3Linear::dim_

◆ end_rot_

quaternion_t curves::SO3Linear::end_rot_

◆ init_rot_

quaternion_t curves::SO3Linear::init_rot_

◆ T_max_

time_t curves::SO3Linear::T_max_

◆ T_min_

time_t curves::SO3Linear::T_min_

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