hpp::core::Path Class Referenceabstract

Abstraction of paths: mapping from time to configuration space. More...

#include <hpp/core/path.hh>

Inheritance diagram for hpp::core::Path:

Public Member Functions

Configuration_t operator() (const value_type &t) const throw ()
 
Configuration_t operator() (const value_type &t, bool &success) const throw ()
 
bool operator() (ConfigurationOut_t result, const value_type &t) const throw ()
 
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...
 
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...
 
Construction, destruction, copy
virtual ~Path () throw ()
 Destructor. More...
 
virtual PathPtr_t copy () const =0
 Return a shared pointer to a copy of this. More...
 
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...
 
virtual PathPtr_t extract (const interval_t &subInterval) const
 Extraction/Reversion of a sub-path. More...
 
virtual PathPtr_t reverse () const
 Reversion of a path. More...
 
Constraints
const ConstraintSetPtr_tconstraints () const
 Get constraints the path is subject to. More...
 
void constraints (const ConstraintSetPtr_t &constraints)
 Set constraints the path is subject to. More...
 

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const =0
 Print path in a stream. More...
 
 Path (const interval_t &interval, size_type outputSize, size_type outputDerivativeSize)
 Constructor. More...
 
 Path (const interval_t &interval, size_type outputSize, size_type outputDerivativeSize, const ConstraintSetPtr_t &constraints)
 Constructor. More...
 
 Path (const Path &path)
 Copy constructor. More...
 
void init (const PathPtr_t &self)
 Store weak pointer to itself. More...
 
virtual bool impl_compute (ConfigurationOut_t configuration, value_type t) const =0
 Function evaluation. More...
 

Protected Attributes

interval_t timeRange_
 Interval of definition. More...
 

Friends

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

Detailed Description

Abstraction of paths: mapping from time to configuration space.

Constructor & Destructor Documentation

◆ ~Path()

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

Destructor.

◆ Path() [1/3]

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

Constructor.

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

◆ Path() [2/3]

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

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.

◆ Path() [3/3]

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

Copy constructor.

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.

◆ 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 constraints)
inline

Set constraints the path is subject to.

◆ copy()

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

Return a shared pointer to a copy of this.

Implemented in hpp::core::pathOptimization::PartialSplinePath, hpp::core::StraightPath, and hpp::core::PathVector.

◆ end()

virtual Configuration_t hpp::core::Path::end ( ) const
pure virtual

Get the final configuration.

Implemented in hpp::core::StraightPath, and hpp::core::PathVector.

◆ extract()

virtual PathPtr_t hpp::core::Path::extract ( const interval_t subInterval) const
virtual

Extraction/Reversion of a sub-path.

Parameters
subIntervalinterval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed.

Reimplemented in hpp::core::PathVector, and hpp::core::StraightPath.

◆ impl_compute()

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

Function evaluation.

Returns
true if everything went good.

Implemented in hpp::core::PathVector, hpp::core::StraightPath, and hpp::core::pathOptimization::PartialSplinePath.

◆ init()

void hpp::core::Path::init ( const PathPtr_t self)
inlineprotected

Store weak pointer to itself.

should be called at construction of derived class instances

◆ initial()

virtual Configuration_t hpp::core::Path::initial ( ) const
pure virtual

Get the initial configuration.

Implemented in hpp::core::StraightPath, and hpp::core::PathVector.

◆ length()

value_type hpp::core::Path::length ( ) const
inline

Get length of definition interval.

◆ operator()() [1/3]

Configuration_t hpp::core::Path::operator() ( const value_type t) const
throw (
)
inline

◆ operator()() [2/3]

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

◆ operator()() [3/3]

bool hpp::core::Path::operator() ( ConfigurationOut_t  result,
const value_type t 
) const
throw (
)
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.

◆ print()

virtual std::ostream& hpp::core::Path::print ( std::ostream &  os) const
protectedpure virtual

◆ reverse()

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

Reversion of a path.

Returns
a new path that is this one reversed.

◆ timeRange()

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

Get interval of definition.

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ timeRange_

interval_t hpp::core::Path::timeRange_
protected

Interval of definition.

Referenced by hpp::core::PathVector::PathVector().