hpp-core: hpp::core::InterpolatedPath Class Reference

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hpp::core::InterpolatedPath Class Reference
Path

`#include <hpp/core/interpolated-path.hh>`

Inheritance diagram for hpp::core::InterpolatedPath:
[legend]
Collaboration diagram for hpp::core::InterpolatedPath:
[legend]

## Public Types
typedef std::pair< const value_type, Configuration_t > | InterpolationPoint_t
typedef std::map< value_type, Configuration_t, std::less< value_type >, Eigen::aligned_allocator< InterpolationPoint_t > > | InterpolationPoints_t
typedef Path | parent_t

## Public Member Functions
virtual | ~InterpolatedPath ()
| Destructor.
virtual PathPtr_t | copy () const
virtual PathPtr_t | copy (const ConstraintSetPtr_t &constraints) const
virtual PathPtr_t | reverse () const
DevicePtr_t | device () const
| Return the internal robot.
void | insert (const value_type &time, ConfigurationIn_t config)
| Insert interpolation point.
Configuration_t | initial () const
| Get the initial configuration.
Configuration_t | end () const
| Get the final configuration.
const InterpolationPoints_t & | interpolationPoints () const
Public Member Functions inherited from hpp::core::Path
virtual | ~Path ()
| Destructor.
template<class T >
shared_ptr< T > | as (void)
| Static cast into a derived type.
template<class T >
shared_ptr< const T > | as (void) const
| Static cast into a derived type.
PathPtr_t | extract (const interval_t &subInterval) const
PathPtr_t | extract (const value_type &tmin, const value_type &tmax) const
Configuration_t | eval (const value_type &time, bool &success) const
| Configuration at time.
bool | eval (ConfigurationOut_t result, const value_type &time) const
| Configuration at time.
bool | at (const value_type &time, ConfigurationOut_t result) const
| Get the configuration at a parameter without applying the constraints.
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
size_type | outputSize () const
| Get size of configuration space.
size_type | outputDerivativeSize () const
| Get size of velocity.
const interval_t & | timeRange () const
| Get interval of definition.
virtual value_type | length () const
| Get length of definition interval.
const ConstraintSetPtr_t & | constraints () const
| Get constraints the path is subject to.
const interval_t & | paramRange () const
const TimeParameterizationPtr_t & | timeParameterization () const
| Get the time parameterization function.
void | timeParameterization (const TimeParameterizationPtr_t &tp, const interval_t &tr)
| Set the time parameterization function.

## Static Public Member Functions
static InterpolatedPathPtr_t | create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, interval_t timeRange)
static InterpolatedPathPtr_t | create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, interval_t timeRange, ConstraintSetPtr_t constraints)
static InterpolatedPathPtr_t | create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type length)
static InterpolatedPathPtr_t | create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type length, ConstraintSetPtr_t constraints)
static InterpolatedPathPtr_t | createCopy (const InterpolatedPathPtr_t &path)
static InterpolatedPathPtr_t | create (const PathPtr_t &path, const DevicePtr_t &device, const std::size_t &nbSamples)
static InterpolatedPathPtr_t | createCopy (const InterpolatedPathPtr_t &path, const ConstraintSetPtr_t &constraints)

## Protected Member Functions
virtual std::ostream & | print (std::ostream &os) const
| Print path in a stream.
| InterpolatedPath (const DevicePtr_t &robot, ConfigurationIn_t init, ConfigurationIn_t end, interval_t timeRange)
| Constructor.
| InterpolatedPath (const DevicePtr_t &robot, ConfigurationIn_t init, ConfigurationIn_t end, interval_t timeRange, ConstraintSetPtr_t constraints)
| Constructor with constraints.
| InterpolatedPath (const PathPtr_t &path, const DevicePtr_t &device, const std::size_t &nbSamples)
| DIscretization of a given path.
| InterpolatedPath (const InterpolatedPath &path)
| Copy constructor.
| InterpolatedPath (const InterpolatedPath &path, const ConstraintSetPtr_t &constraints)
| Copy constructor with constraints.
void | init (InterpolatedPathPtr_t self)
void | initCopy (InterpolatedPathPtr_t self)
virtual bool | impl_compute (ConfigurationOut_t result, value_type param) const
| Function evaluation without applying constraints.
virtual void | impl_derivative (vectorOut_t result, const value_type &t, size_type order) const
| Virtual implementation of derivative.
virtual void | impl_velocityBound (vectorOut_t result, const value_type &t0, const value_type &t1) const
PathPtr_t | impl_extract (const interval_t &subInterval) const
Protected Member Functions inherited from hpp::core::Path
| 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.
| Path (const Path &path, const ConstraintSetPtr_t &constraints)
| Copy constructor with constraints.
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.
void | timeRange (const interval_t &timeRange)
value_type | paramLength () const
Configuration_t | configAtParam (const value_type &param, bool &success) const
| Path ()

## Additional Inherited Members
Protected Attributes inherited from hpp::core::Path
interval_t | paramRange_
| Interval of parameters.

## Detailed Description

Piecewise linear interpolation between two configurations

This type of path is the return type of PathProjector algorithms.

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

## ◆ InterpolationPoint_t

typedef std::pair<const value_type, Configuration_t> hpp::core::InterpolatedPath::InterpolationPoint_t

## ◆ InterpolationPoints_t

typedef std::map<value_type, Configuration_t, std::less<value_type>, Eigen::aligned_allocator<InterpolationPoint_t> > hpp::core::InterpolatedPath::InterpolationPoints_t

## ◆ parent_t

typedef Path hpp::core::InterpolatedPath::parent_t

## Constructor & Destructor Documentation

## ◆ ~InterpolatedPath()

virtual hpp::core::InterpolatedPath::~InterpolatedPath | ( |  | ) |
| inlinevirtual

Destructor.

## ◆ InterpolatedPath() [1/5]

hpp::core::InterpolatedPath::InterpolatedPath | ( | const DevicePtr_t & | robot,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | interval_t | timeRange
| ) |  |
| protected

Constructor.

## ◆ InterpolatedPath() [2/5]

hpp::core::InterpolatedPath::InterpolatedPath | ( | const DevicePtr_t & | robot,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | interval_t | timeRange,
|  | ConstraintSetPtr_t | constraints
| ) |  |
| protected

Constructor with constraints.

## ◆ InterpolatedPath() [3/5]

hpp::core::InterpolatedPath::InterpolatedPath | ( | const PathPtr_t & | path,
|  | const DevicePtr_t & | device,
|  | const std::size_t & | nbSamples
| ) |  |
| protected

DIscretization of a given path.

## ◆ InterpolatedPath() [4/5]

hpp::core::InterpolatedPath::InterpolatedPath | ( | const InterpolatedPath & | path | ) |
| protected

Copy constructor.

## ◆ InterpolatedPath() [5/5]

hpp::core::InterpolatedPath::InterpolatedPath | ( | const InterpolatedPath & | path,
|  | const ConstraintSetPtr_t & | constraints
| ) |  |
| protected

Copy constructor with constraints.

## Member Function Documentation

## ◆ copy() [1/2]

virtual PathPtr_t hpp::core::InterpolatedPath::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.

## ◆ copy() [2/2]

virtual PathPtr_t hpp::core::InterpolatedPath::copy | ( | const ConstraintSetPtr_t & | constraints | ) | const
| inlinevirtual

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

Parameters

  constraints | constraints to apply to the copy

Precondition
  *this should not have constraints.

Implements hpp::core::Path.

## ◆ create() [1/5]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::create | ( | const DevicePtr_t & | device,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | interval_t | timeRange
| ) |  |
| inlinestatic

Create instance and return shared pointer

Parameters

  device | Robot corresponding to configurations
  init,end | Start and end configurations of the path
  timeRange | interval of definition

## ◆ create() [2/5]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::create | ( | const DevicePtr_t & | device,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | interval_t | timeRange,
|  | ConstraintSetPtr_t | constraints
| ) |  |
| inlinestatic

Create instance and return shared pointer

Parameters

  device | Robot corresponding to configurations
  init,end | Start and end configurations of the path
  timeRange | interval of definition
  constraints | the path is subject to

## ◆ create() [3/5]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::create | ( | const DevicePtr_t & | device,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | value_type | length
| ) |  |
| inlinestatic

Create instance and return shared pointer

Parameters

  device | Robot corresponding to configurations
  init,end | Start and end configurations of the path
  length | Distance between the configurations.

## ◆ create() [4/5]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::create | ( | const DevicePtr_t & | device,
|  | ConfigurationIn_t | init,
|  | ConfigurationIn_t | end,
|  | value_type | length,
|  | ConstraintSetPtr_t | constraints
| ) |  |
| inlinestatic

Create instance and return shared pointer

Parameters

  device | Robot corresponding to configurations
  init,end | Start and end configurations of the path
  length | Distance between the configurations.
  constraints | the path is subject to

## ◆ create() [5/5]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::create | ( | const PathPtr_t & | path,
|  | const DevicePtr_t & | device,
|  | const std::size_t & | nbSamples
| ) |  |
| static

Create an interpolation of this path

Parameters

  path | path to interpolate
  nbSamples | number of samples between the initial and end configuration

Note
  it is assume that the constraints are constant along the path

## ◆ createCopy() [1/2]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::createCopy | ( | const InterpolatedPathPtr_t & | path | ) |
| inlinestatic

Create copy and return shared pointer

Parameters

  path | path to copy

## ◆ createCopy() [2/2]

static InterpolatedPathPtr_t hpp::core::InterpolatedPath::createCopy | ( | const InterpolatedPathPtr_t & | path,
|  | const ConstraintSetPtr_t & | constraints
| ) |  |
| inlinestatic

Create copy and return shared pointer

Parameters

  path | path to copy
  constraints | the path is subject to

## ◆ device()

DevicePtr_t hpp::core::InterpolatedPath::device | ( |  | ) | const

Return the internal robot.

## ◆ end()

Configuration_t hpp::core::InterpolatedPath::end | ( |  | ) | const
| inlinevirtual

Get the final configuration.

Implements hpp::core::Path.

## ◆ impl_compute()

virtual bool hpp::core::InterpolatedPath::impl_compute | ( | ConfigurationOut_t | configuration,
|  | value_type | param
| ) |  | const
| protectedvirtual

Function evaluation without applying constraints.

Returns
  true if everything went good.

Implements hpp::core::Path.

## ◆ impl_derivative()

virtual void hpp::core::InterpolatedPath::impl_derivative | ( | vectorOut_t | result,
|  | const value_type & | t,
|  | size_type | order
| ) |  | const
| protectedvirtual

Virtual implementation of derivative.

Reimplemented from hpp::core::Path.

## ◆ impl_extract()

PathPtr_t hpp::core::InterpolatedPath::impl_extract | ( | const interval_t & | subInterval | ) | const
| protectedvirtual

Extraction/Reversion of a sub-path See Path::extract

Reimplemented from hpp::core::Path.

## ◆ impl_velocityBound()

virtual void hpp::core::InterpolatedPath::impl_velocityBound | ( | vectorOut_t | bound,
|  | const value_type & | param0,
|  | const value_type & | param1
| ) |  | const
| protectedvirtual

Virtual implementation of velocityBound

Parameters

  param0,param1 | interval of parameter

Return values

  bound |

Reimplemented from hpp::core::Path.

## ◆ init()

void hpp::core::InterpolatedPath::init | ( | InterpolatedPathPtr_t | self | ) |
| protected

## ◆ initCopy()

void hpp::core::InterpolatedPath::initCopy | ( | InterpolatedPathPtr_t | self | ) |
| protected

## ◆ initial()

Configuration_t hpp::core::InterpolatedPath::initial | ( |  | ) | const
| inlinevirtual

Get the initial configuration.

Implements hpp::core::Path.

## ◆ insert()

void hpp::core::InterpolatedPath::insert | ( | const value_type & | time,
|  | ConfigurationIn_t | config
| ) |  |
| inline

Insert interpolation point.

## ◆ interpolationPoints()

const InterpolationPoints_t & hpp::core::InterpolatedPath::interpolationPoints | ( |  | ) | const
| inline

## ◆ print()

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

Print path in a stream.

Reimplemented from hpp::core::Path.

## ◆ reverse()

virtual PathPtr_t hpp::core::InterpolatedPath::reverse | ( |  | ) | const
| virtual

Reversion of a path

Returns
  a new path that is this one reversed.

Reimplemented from hpp::core::Path.

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

- include/hpp/core/interpolated-path.hh