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:

List of all members.

Public Types

typedef Path parent_t

Public Member Functions

virtual ~StraightPath () throw ()
 Destructor.
virtual PathPtr_t copy () const
 Return a shared pointer to this.
virtual PathPtr_t extract (const interval_t &subInterval) const
 Extraction/Reversion of a sub-path.
void initialConfig (ConfigurationIn_t initial)
 Modify initial configuration.
void endConfig (ConfigurationIn_t end)
 Modify end configuration.
DevicePtr_t device () const
 Return the internal robot.
Configuration_t initial () const
 Get the initial configuration.
Configuration_t end () const
 Get the final configuration.

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.

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 Print path in a stream.
 StraightPath (const DevicePtr_t &robot, ConfigurationIn_t init, ConfigurationIn_t end, value_type length)
 Constructor.
 StraightPath (const StraightPath &path)
 Copy constructor.
void init (StraightPathPtr_t self)
virtual bool impl_compute (ConfigurationOut_t result, value_type param) const
 Function evaluation.

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


Constructor & Destructor Documentation

virtual hpp::core::StraightPath::~StraightPath ( ) throw () [inline, virtual]

Destructor.

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

Constructor.

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

Copy constructor.


Member Function Documentation

virtual PathPtr_t hpp::core::StraightPath::copy ( ) const [inline, virtual]

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.

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

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().

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

Return the internal robot.

Configuration_t hpp::core::StraightPath::end ( ) const [inline, virtual]

Get the final configuration.

Implements hpp::core::Path.

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
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.

virtual bool hpp::core::StraightPath::impl_compute ( ConfigurationOut_t  configuration,
value_type  t 
) const [protected, virtual]

Function evaluation.

Returns:
true if everything went good.

Implements hpp::core::Path.

void hpp::core::StraightPath::init ( StraightPathPtr_t  self) [inline, protected]

Referenced by create().

Configuration_t hpp::core::StraightPath::initial ( ) const [inline, virtual]

Get the initial configuration.

Implements hpp::core::Path.

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
virtual std::ostream& hpp::core::StraightPath::print ( std::ostream &  os) const [inline, protected, virtual]

Print path in a stream.

Implements hpp::core::Path.