hpp::core::StraightPath Class Reference

Linear interpolation between two configurations. More...

#include <hpp/core/straight-path.hh>

Inheritance diagram for hpp::core::StraightPath:
Collaboration diagram for hpp::core::StraightPath:

Public Types

typedef Path parent_t
 

Public Member Functions

virtual ~StraightPath () throw ()
 Destructor. More...
 
virtual PathPtr_t copy () const
 Return a shared pointer to this. More...
 
virtual PathPtr_t extract (const interval_t &subInterval) const
 Extraction/Reversion of a sub-path. More...
 
void initialConfig (ConfigurationIn_t initial)
 Modify initial configuration. More...
 
void endConfig (ConfigurationIn_t end)
 Modify end configuration. More...
 
DevicePtr_t device () const
 Return the internal robot. More...
 
Configuration_t initial () const
 Get the initial configuration. More...
 
Configuration_t end () const
 Get the final configuration. More...
 
- Public Member Functions inherited from hpp::core::Path
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 ~Path () throw ()
 Destructor. 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 reverse () const
 Reversion of a path. More...
 
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...
 

Static Public Member Functions

static StraightPathPtr_t create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type length)
 Create instance and return shared pointer. More...
 

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 Print path in a stream. More...
 
 StraightPath (const DevicePtr_t &robot, ConfigurationIn_t init, ConfigurationIn_t end, value_type length)
 Constructor. More...
 
 StraightPath (const StraightPath &path)
 Copy constructor. More...
 
void init (StraightPathPtr_t self)
 
virtual bool impl_compute (ConfigurationOut_t result, value_type param) const
 Function evaluation. More...
 
- Protected Member Functions inherited from hpp::core::Path
 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...
 

Additional Inherited Members

- Protected Attributes inherited from hpp::core::Path
interval_t timeRange_
 Interval of definition. More...
 

Detailed Description

Linear interpolation between two configurations.

Degrees of freedom are interpolated depending on the type of joint they parameterize:

  • linear interpolation for translation joints, bounded rotation joints, and translation part of freeflyer joints,
  • angular interpolation for unbounded rotation joints,
  • constant angular velocity for SO(3) part of freeflyer joints.

Member Typedef Documentation

◆ parent_t

Constructor & Destructor Documentation

◆ ~StraightPath()

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

Destructor.

◆ StraightPath() [1/2]

hpp::core::StraightPath::StraightPath ( const DevicePtr_t robot,
ConfigurationIn_t  init,
ConfigurationIn_t  end,
value_type  length 
)
protected

Constructor.

◆ StraightPath() [2/2]

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

Copy constructor.

Member Function Documentation

◆ copy()

virtual PathPtr_t hpp::core::StraightPath::copy ( ) const
inlinevirtual

Return a shared pointer to this.

As StaightPath are immutable, and refered to by shared pointers, they do not need to be copied.

Implements hpp::core::Path.

◆ create()

static StraightPathPtr_t hpp::core::StraightPath::create ( const DevicePtr_t device,
ConfigurationIn_t  init,
ConfigurationIn_t  end,
value_type  length 
)
inlinestatic

Create instance and return shared pointer.

Parameters
deviceRobot corresponding to configurations
init,endStart and end configurations of the path
lengthDistance between the configurations.

References init().

Referenced by hpp::core::SteeringMethodStraight::impl_compute().

◆ device()

DevicePtr_t hpp::core::StraightPath::device ( ) const

Return the internal robot.

◆ end()

Configuration_t hpp::core::StraightPath::end ( ) const
inlinevirtual

Get the final configuration.

Implements hpp::core::Path.

◆ endConfig()

void hpp::core::StraightPath::endConfig ( ConfigurationIn_t  end)
inline

Modify end configuration.

Parameters
endnew end configuration
Precondition
input configuration should be of the same size as current end configuration

◆ extract()

virtual PathPtr_t hpp::core::StraightPath::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 from hpp::core::Path.

◆ impl_compute()

virtual bool hpp::core::StraightPath::impl_compute ( ConfigurationOut_t  configuration,
value_type  t 
) const
protectedvirtual

Function evaluation.

Returns
true if everything went good.

Implements hpp::core::Path.

◆ init()

void hpp::core::StraightPath::init ( StraightPathPtr_t  self)
inlineprotected

Referenced by create().

◆ initial()

Configuration_t hpp::core::StraightPath::initial ( ) const
inlinevirtual

Get the initial configuration.

Implements hpp::core::Path.

◆ initialConfig()

void hpp::core::StraightPath::initialConfig ( ConfigurationIn_t  initial)
inline

Modify initial configuration.

Parameters
initialnew initial configuration
Precondition
input configuration should be of the same size as current initial configuration

◆ print()

virtual std::ostream& hpp::core::StraightPath::print ( std::ostream &  os) const
inlineprotectedvirtual

Print path in a stream.

Implements hpp::core::Path.