hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
hpp::core::Path Class Referenceabstract

#include <hpp/core/path.hh>

Inheritance diagram for hpp::core::Path:

Public Member Functions

Construction, destruction, copy
virtual ~Path ()
 Destructor. More...
 
virtual PathPtr_t copy () const =0
 Return a shared pointer to a copy of this. More...
 
virtual PathPtr_t copy (const ConstraintSetPtr_t &constraints) const =0
 
template<class T >
boost::shared_ptr< T > as (void)
 Static cast into a derived type. More...
 
template<class T >
boost::shared_ptr< const T > as (void) const
 Static cast into a derived type. More...
 
Extraction/Reversion of a sub-path
PathPtr_t extract (const interval_t &subInterval) const
 
PathPtr_t extract (const value_type &tmin, const value_type &tmax) const
 
virtual PathPtr_t reverse () const
 
Evalutation of the path
Configuration_t operator() (const value_type &time) const HPP_CORE_DEPRECATED
 
Configuration_t operator() (const value_type &time, bool &success) const
 
bool operator() (ConfigurationOut_t result, const value_type &time) const
 
Configuration_t eval (const value_type &time, bool &success) const
 
bool eval (ConfigurationOut_t result, const value_type &time) const
 
bool at (const value_type &time, ConfigurationOut_t result) const
 Get the configuration at a parameter without applying the constraints. More...
 
void derivative (vectorOut_t result, const value_type &time, size_type order) const
 
void velocityBound (vectorOut_t result, const value_type &t0, const value_type &t1) const
 
Path definition
size_type outputSize () const
 Get size of configuration space. More...
 
size_type outputDerivativeSize () const
 Get size of velocity. More...
 
const interval_ttimeRange () const
 Get interval of definition. More...
 
virtual value_type length () const
 Get length of definition interval. More...
 
virtual Configuration_t initial () const =0
 Get the initial configuration. More...
 
virtual Configuration_t end () const =0
 Get the final configuration. More...
 
const ConstraintSetPtr_tconstraints () const
 Get constraints the path is subject to. More...
 
Time parameterizarion

Time parameterization is handled by this class so child classes need not to handle it.

const interval_tparamRange () const
 
void timeParameterization (const TimeParameterizationPtr_t &tp, const interval_t &tr)
 Set the time parameterization function. More...
 

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 
 Path (const interval_t &interval, size_type outputSize, size_type outputDerivativeSize, const ConstraintSetPtr_t &constraints)
 
 Path (const interval_t &interval, size_type outputSize, size_type outputDerivativeSize)
 
 Path (const Path &path)
 Copy constructor. More...
 
 Path (const Path &path, const ConstraintSetPtr_t &constraints)
 Copy constructor with constraints. More...
 
void init (const PathWkPtr_t &self)
 
void constraints (const ConstraintSetPtr_t &constraint)
 
virtual void checkPath () const
 Should be called by child classes after having init. More...
 
void timeRange (const interval_t &timeRange)
 
const TimeParameterizationPtr_ttimeParameterization () const
 
value_type paramLength () const
 
Configuration_t configAtParam (const value_type &param, bool &success) const
 
virtual bool impl_compute (ConfigurationOut_t configuration, value_type param) const =0
 Function evaluation without applying constraints. More...
 
virtual void impl_derivative (vectorOut_t derivative, const value_type &param, size_type order) const
 
virtual void impl_velocityBound (vectorOut_t bound, const value_type &param0, const value_type &param1) const
 
virtual PathPtr_t impl_extract (const interval_t &paramInterval) const
 Virtual implementation of extract. More...
 

Protected Attributes

interval_t paramRange_
 Interval of parameters. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Path &path)
 

Detailed Description

Abstraction of paths: mapping from time to configuration space

A path \( p \) is defined by:

\begin{eqnarray*} p : [t_0, t_1] &\to & \mathcal{C} \\ t &\mapsto & constraints.apply( q(t) ) \end{eqnarray*}

where

Optionally, it is possible to time-parameterize the path with a function \( s \). By default, \( s \) is the identity. The model becomes:

\begin{eqnarray*} p : [t_0, t_1] &\to & \mathcal{C} \\ t &\mapsto & constraints.apply( q(s(t)) ) \end{eqnarray*}

where \( s \) is the timeParameterization, from timeRange to paramRange.

Constructor & Destructor Documentation

◆ ~Path()

virtual hpp::core::Path::~Path ( )
inlinevirtual

Destructor.

◆ Path() [1/4]

hpp::core::Path::Path ( const interval_t interval,
size_type  outputSize,
size_type  outputDerivativeSize,
const ConstraintSetPtr_t constraints 
)
protected

Constructor

Parameters
intervalinterval of definition of the path,
outputSizesize of the output configuration,
outputDerivativeSizenumber of degrees of freedom of the underlying robot
constraintsconstraints the set is subject to, constraints are solved at each evaluation of the output configuration.
Note
Constraints are copied.

◆ Path() [2/4]

hpp::core::Path::Path ( const interval_t interval,
size_type  outputSize,
size_type  outputDerivativeSize 
)
protected

Constructor

Parameters
intervalinterval of definition of the path,
outputSizesize of the output configuration,
outputDerivativeSizenumber of degrees of freedom of the underlying robot

◆ Path() [3/4]

hpp::core::Path::Path ( const Path path)
protected

Copy constructor.

◆ Path() [4/4]

hpp::core::Path::Path ( const Path path,
const ConstraintSetPtr_t constraints 
)
protected

Copy constructor with constraints.

Member Function Documentation

◆ as() [1/2]

template<class T >
boost::shared_ptr<T> hpp::core::Path::as ( void  )
inline

Static cast into a derived type.

◆ as() [2/2]

template<class T >
boost::shared_ptr<const T> hpp::core::Path::as ( void  ) const
inline

Static cast into a derived type.

◆ at()

bool hpp::core::Path::at ( const value_type time,
ConfigurationOut_t  result 
) const
inline

Get the configuration at a parameter without applying the constraints.

◆ checkPath()

virtual void hpp::core::Path::checkPath ( ) const
protectedvirtual

Should be called by child classes after having init.

◆ configAtParam()

Configuration_t hpp::core::Path::configAtParam ( const value_type param,
bool &  success 
) const
inlineprotected

◆ constraints() [1/2]

const ConstraintSetPtr_t& hpp::core::Path::constraints ( ) const
inline

Get constraints the path is subject to.

◆ constraints() [2/2]

void hpp::core::Path::constraints ( const ConstraintSetPtr_t constraint)
inlineprotected

Set the constraints

Warning
this method is protected for child classes that need to initialize themselves before being sure that the initial and end configuration satisfy the constraints

◆ copy() [1/2]

◆ copy() [2/2]

virtual PathPtr_t hpp::core::Path::copy ( const ConstraintSetPtr_t constraints) const
pure virtual

◆ derivative()

void hpp::core::Path::derivative ( vectorOut_t  result,
const value_type time,
size_type  order 
) const

Get derivative with respect to parameter at given parameter

Parameters
timevalue of the time in the definition interval,
orderorder of the derivative
Return values
resultderivative. Should be allocated and of correct size.
Warning
the method is not implemented in this class and throws if called without being implemented in the derived class.
Note
unless otherwise stated, this method is not compatible with constraints. The derivative of the non-constrained path will be computed.

◆ end()

◆ eval() [1/2]

Configuration_t hpp::core::Path::eval ( const value_type time,
bool &  success 
) const
inline

◆ eval() [2/2]

bool hpp::core::Path::eval ( ConfigurationOut_t  result,
const value_type time 
) const
inline

◆ extract() [1/2]

PathPtr_t hpp::core::Path::extract ( const interval_t subInterval) const
Parameters
subIntervalinterval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed.
Exceptions
projection_erroris thrown when an end configuration of the returned path could not be computed due to projection failure.

◆ extract() [2/2]

PathPtr_t hpp::core::Path::extract ( const value_type tmin,
const value_type tmax 
) const
inline

Parameters
subIntervalinterval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed.
Exceptions
projection_erroris thrown when an end configuration of the returned path could not be computed due to projection failure.

◆ impl_compute()

virtual bool hpp::core::Path::impl_compute ( ConfigurationOut_t  configuration,
value_type  param 
) const
protectedpure virtual

◆ impl_derivative()

virtual void hpp::core::Path::impl_derivative ( vectorOut_t  derivative,
const value_type param,
size_type  order 
) const
inlineprotectedvirtual

◆ impl_extract()

virtual PathPtr_t hpp::core::Path::impl_extract ( const interval_t paramInterval) const
protectedvirtual

◆ impl_velocityBound()

virtual void hpp::core::Path::impl_velocityBound ( vectorOut_t  bound,
const value_type param0,
const value_type param1 
) const
inlineprotectedvirtual

◆ init()

void hpp::core::Path::init ( const PathWkPtr_t &  self)
protected

Store weak pointer to itself

should be called at construction of derived class instances

◆ initial()

◆ length()

virtual value_type hpp::core::Path::length ( ) const
inlinevirtual

Get length of definition interval.

◆ operator()() [1/3]

Configuration_t hpp::core::Path::operator() ( const value_type time) const
inline
Deprecated:
Use operator()(value_type, bool)

◆ operator()() [2/3]

Configuration_t hpp::core::Path::operator() ( const value_type time,
bool &  success 
) const
inline

◆ operator()() [3/3]

bool hpp::core::Path::operator() ( ConfigurationOut_t  result,
const value_type time 
) const
inline

◆ outputDerivativeSize()

size_type hpp::core::Path::outputDerivativeSize ( ) const
inline

Get size of velocity.

◆ outputSize()

size_type hpp::core::Path::outputSize ( ) const
inline

Get size of configuration space.

◆ paramLength()

value_type hpp::core::Path::paramLength ( ) const
inlineprotected

◆ paramRange()

const interval_t& hpp::core::Path::paramRange ( ) const
inline

Get interval of parameters.

Returns
the result of applying the timeParameterization to timeRange().
Note
The time parameterization defaults to identity.

◆ print()

◆ reverse()

virtual PathPtr_t hpp::core::Path::reverse ( ) const
virtual

Reversion of a path

Returns
a new path that is this one reversed.

Reimplemented in hpp::core::InterpolatedPath.

◆ timeParameterization() [1/2]

void hpp::core::Path::timeParameterization ( const TimeParameterizationPtr_t tp,
const interval_t tr 
)
inline

Set the time parameterization function.

◆ timeParameterization() [2/2]

const TimeParameterizationPtr_t& hpp::core::Path::timeParameterization ( ) const
inlineprotected

◆ timeRange() [1/2]

const interval_t& hpp::core::Path::timeRange ( ) const
inline

Get interval of definition.

◆ timeRange() [2/2]

void hpp::core::Path::timeRange ( const interval_t timeRange)
inlineprotected

◆ velocityBound()

void hpp::core::Path::velocityBound ( vectorOut_t  result,
const value_type t0,
const value_type t1 
) const
inline

Get an upper bound of the velocity on a sub-interval. The result is a coefficient-wise.

Parameters
t0begin of the interval
t1end of the interval
Return values
resultmaximal derivative on the sub-interval. Should be allocated and of correct size.
Warning
the method is not implemented in this class and throws if called without being implemented in the derived class.
Note
unless otherwise stated, this method is not compatible with constraints. The derivative of the non-constrained path will be computed.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Path path 
)
friend

Member Data Documentation

◆ paramRange_

interval_t hpp::core::Path::paramRange_
protected

Interval of parameters.


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