hpp::rbprm::interpolation::TimeConstraintPath Class Reference

Linear interpolation between two configurations. More...

#include <hpp/rbprm/interpolation/time-constraint-path.hh>

Inheritance diagram for hpp::rbprm::interpolation::TimeConstraintPath:
[legend]
Collaboration diagram for hpp::rbprm::interpolation::TimeConstraintPath:
[legend]

Public Types

typedef Path parent_t
 

Public Member Functions

virtual ~TimeConstraintPath () throw ()
 Destructor. More...
 
virtual core::PathPtr_t copy () const
 Return a shared pointer to this. More...
 
virtual core::PathPtr_t copy (const core::ConstraintSetPtr_t &constraints) const
 Return a shared pointer to a copy of this and set constraints. More...
 
virtual core::PathPtr_t extract (const core::interval_t &subInterval) const throw (core::projection_error)
 Extraction/Reversion of a sub-path. More...
 
void initialConfig (core::ConfigurationIn_t initial)
 Modify initial configuration. More...
 
void endConfig (core::ConfigurationIn_t end)
 Modify end configuration. More...
 
core::DevicePtr_t device () const
 Return the internal robot. More...
 
core::Configuration_t initial () const
 Get the initial configuration. More...
 
core::Configuration_t end () const
 Get the final configuration. More...
 
virtual void checkPath () const throw (core::projection_error)
 

Static Public Member Functions

static TimeConstraintPathPtr_t create (const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, const std::size_t pathDofRank, const T_TimeDependant &tds)
 Create instance and return shared pointer. More...
 
static TimeConstraintPathPtr_t create (const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::ConstraintSetPtr_t constraints, const std::size_t pathDofRank, const T_TimeDependant &tds)
 Create instance and return shared pointer. More...
 
static TimeConstraintPathPtr_t createCopy (const TimeConstraintPathPtr_t &path)
 Create copy and return shared pointer. More...
 
static TimeConstraintPathPtr_t createCopy (const TimeConstraintPathPtr_t &path, const core::ConstraintSetPtr_t &constraints)
 Create copy and return shared pointer. More...
 

Public Attributes

const std::size_t pathDofRank_
 
const T_TimeDependant tds_
 

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 Print path in a stream. More...
 
 TimeConstraintPath (const core::DevicePtr_t &robot, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, const std::size_t pathDofRank, const T_TimeDependant &tds)
 Constructor. More...
 
 TimeConstraintPath (const core::DevicePtr_t &robot, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::ConstraintSetPtr_t constraints, const std::size_t pathDofRank, const T_TimeDependant &tds)
 Constructor with constraints. More...
 
 TimeConstraintPath (const TimeConstraintPath &path)
 Copy constructor. More...
 
 TimeConstraintPath (const TimeConstraintPath &path, const core::ConstraintSetPtr_t &constraints)
 Copy constructor with constraints. More...
 
void init (TimeConstraintPathPtr_t self)
 
void initCopy (TimeConstraintPathPtr_t self)
 
virtual bool impl_compute (core::ConfigurationOut_t result, core::value_type param) const
 

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

◆ ~TimeConstraintPath()

virtual hpp::rbprm::interpolation::TimeConstraintPath::~TimeConstraintPath ( )
throw (
)
inlinevirtual

Destructor.

◆ TimeConstraintPath() [1/4]

hpp::rbprm::interpolation::TimeConstraintPath::TimeConstraintPath ( const core::DevicePtr_t robot,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
const std::size_t  pathDofRank,
const T_TimeDependant tds 
)
protected

Constructor.

◆ TimeConstraintPath() [2/4]

hpp::rbprm::interpolation::TimeConstraintPath::TimeConstraintPath ( const core::DevicePtr_t robot,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::ConstraintSetPtr_t  constraints,
const std::size_t  pathDofRank,
const T_TimeDependant tds 
)
protected

Constructor with constraints.

◆ TimeConstraintPath() [3/4]

hpp::rbprm::interpolation::TimeConstraintPath::TimeConstraintPath ( const TimeConstraintPath path)
protected

Copy constructor.

◆ TimeConstraintPath() [4/4]

hpp::rbprm::interpolation::TimeConstraintPath::TimeConstraintPath ( const TimeConstraintPath path,
const core::ConstraintSetPtr_t &  constraints 
)
protected

Copy constructor with constraints.

Member Function Documentation

◆ checkPath()

virtual void hpp::rbprm::interpolation::TimeConstraintPath::checkPath ( ) const
throw (core::projection_error
)
virtual

Referenced by create(), and createCopy().

◆ copy() [1/2]

virtual core::PathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::copy ( ) const
inlinevirtual

Return a shared pointer to this.

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

◆ copy() [2/2]

virtual core::PathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::copy ( const core::ConstraintSetPtr_t &  constraints) const
inlinevirtual

Return a shared pointer to a copy of this and set constraints.

Parameters
constraintsconstraints to apply to the copy *this should not have constraints.

◆ create() [1/2]

static TimeConstraintPathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::create ( const core::DevicePtr_t device,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
const std::size_t  pathDofRank,
const T_TimeDependant tds 
)
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 checkPath(), and init().

◆ create() [2/2]

static TimeConstraintPathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::create ( const core::DevicePtr_t device,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::ConstraintSetPtr_t  constraints,
const std::size_t  pathDofRank,
const T_TimeDependant tds 
)
inlinestatic

Create instance and return shared pointer.

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

References checkPath(), and init().

◆ createCopy() [1/2]

static TimeConstraintPathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::createCopy ( const TimeConstraintPathPtr_t path)
inlinestatic

Create copy and return shared pointer.

Parameters
pathpath to copy

References checkPath(), and initCopy().

◆ createCopy() [2/2]

static TimeConstraintPathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::createCopy ( const TimeConstraintPathPtr_t path,
const core::ConstraintSetPtr_t &  constraints 
)
inlinestatic

Create copy and return shared pointer.

Parameters
pathpath to copy
constraintsthe path is subject to

References checkPath(), and initCopy().

◆ device()

core::DevicePtr_t hpp::rbprm::interpolation::TimeConstraintPath::device ( ) const

Return the internal robot.

◆ end()

core::Configuration_t hpp::rbprm::interpolation::TimeConstraintPath::end ( ) const
inline

Get the final configuration.

◆ endConfig()

void hpp::rbprm::interpolation::TimeConstraintPath::endConfig ( core::ConfigurationIn_t  end)
inline

Modify end configuration.

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

References assert().

◆ extract()

virtual core::PathPtr_t hpp::rbprm::interpolation::TimeConstraintPath::extract ( const core::interval_t &  subInterval) const
throw (core::projection_error
)
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.

◆ impl_compute()

virtual bool hpp::rbprm::interpolation::TimeConstraintPath::impl_compute ( core::ConfigurationOut_t  result,
core::value_type  param 
) const
protectedvirtual

◆ init()

void hpp::rbprm::interpolation::TimeConstraintPath::init ( TimeConstraintPathPtr_t  self)
inlineprotected

Referenced by create().

◆ initCopy()

void hpp::rbprm::interpolation::TimeConstraintPath::initCopy ( TimeConstraintPathPtr_t  self)
inlineprotected

Referenced by createCopy().

◆ initial()

core::Configuration_t hpp::rbprm::interpolation::TimeConstraintPath::initial ( ) const
inline

Get the initial configuration.

◆ initialConfig()

void hpp::rbprm::interpolation::TimeConstraintPath::initialConfig ( core::ConfigurationIn_t  initial)
inline

Modify initial configuration.

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

References assert().

◆ print()

virtual std::ostream& hpp::rbprm::interpolation::TimeConstraintPath::print ( std::ostream &  os) const
inlineprotectedvirtual

Print path in a stream.

Member Data Documentation

◆ pathDofRank_

const std::size_t hpp::rbprm::interpolation::TimeConstraintPath::pathDofRank_

◆ tds_

const T_TimeDependant hpp::rbprm::interpolation::TimeConstraintPath::tds_