Aikido
aikido::statespace::Interpolator Class Referenceabstract

Method of interpolating between two states in a StateSpace. More...

#include <aikido/statespace/Interpolator.hpp>

Inheritance diagram for aikido::statespace::Interpolator:
aikido::statespace::GeodesicInterpolator

Public Member Functions

virtual ~Interpolator ()=default
 
virtual statespace::ConstStateSpacePtr getStateSpace () const =0
 Gets the StateSpace on which this Interpolator operates. More...
 
virtual std::size_t getNumDerivatives () const =0
 Upper bound on the number of non-zero derivatives. More...
 
virtual void interpolate (const statespace::StateSpace::State *_from, const statespace::StateSpace::State *_to, double _alpha, statespace::StateSpace::State *_state) const =0
 Computes the state that lies at path parameter _alpha along the path that connects _from to _to. More...
 
virtual void getDerivative (const statespace::StateSpace::State *_from, const statespace::StateSpace::State *_to, std::size_t _derivative, double _alpha, Eigen::VectorXd &_tangentVector) const =0
 Computes the _derivative-th derivative of the path at path parameter _alpha between _from and _to. More...
 

Detailed Description

Method of interpolating between two states in a StateSpace.

Constructor & Destructor Documentation

◆ ~Interpolator()

virtual aikido::statespace::Interpolator::~Interpolator ( )
virtualdefault

Member Function Documentation

◆ getDerivative()

virtual void aikido::statespace::Interpolator::getDerivative ( const statespace::StateSpace::State _from,
const statespace::StateSpace::State _to,
std::size_t  _derivative,
double  _alpha,
Eigen::VectorXd &  _tangentVector 
) const
pure virtual

Computes the _derivative-th derivative of the path at path parameter _alpha between _from and _to.

The output is an element of the tangent space in the local (i.e. "body") frame.

Parameters
_fromstart state in getStateSpace()
_toend state in getStateSpace()
_derivativeorder of the derivative to compute
_alphapath parameter in the range [0, 1]
[out]_tangentVectoroutput element of the tangent space

Implemented in aikido::statespace::GeodesicInterpolator.

◆ getNumDerivatives()

virtual std::size_t aikido::statespace::Interpolator::getNumDerivatives ( ) const
pure virtual

Upper bound on the number of non-zero derivatives.

Implemented in aikido::statespace::GeodesicInterpolator.

◆ getStateSpace()

virtual statespace::ConstStateSpacePtr aikido::statespace::Interpolator::getStateSpace ( ) const
pure virtual

Gets the StateSpace on which this Interpolator operates.

Implemented in aikido::statespace::GeodesicInterpolator.

◆ interpolate()

virtual void aikido::statespace::Interpolator::interpolate ( const statespace::StateSpace::State _from,
const statespace::StateSpace::State _to,
double  _alpha,
statespace::StateSpace::State _state 
) const
pure virtual

Computes the state that lies at path parameter _alpha along the path that connects _from to _to.

By definition interpolate(0) is _from and interpolate(1) is _to. The memory location of _state must differ from the memory locations of _from and _to.

Parameters
_fromstart state in getStateSpace()
_toend state in getStateSpace()
_alphapath parameter in the range [0, 1]
[out]_stateoutput interpolated state

Implemented in aikido::statespace::GeodesicInterpolator.