hpp-core 7.0.0
Implement basic classes for canonical path planning for kinematic chains.
Loading...
Searching...
No Matches
hpp::core::StraightPath Class Reference

#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 ()
 Destructor.
virtual PathPtr_t copy () const
virtual PathPtr_t copy (const ConstraintSetPtr_t &constraints) const
void initialConfig (ConfigurationIn_t initial)
void endConfig (ConfigurationIn_t end)
Configuration_t initial () const
 Get the initial configuration.
Configuration_t end () const
 Get the final configuration.
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
virtual PathPtr_t reverse () 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_ttimeRange () const
 Get interval of definition.
virtual value_type length () const
 Get length of definition interval.
const ConstraintSetPtr_tconstraints () const
 Get constraints the path is subject to.
const interval_tparamRange () const
const TimeParameterizationPtr_ttimeParameterization () 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 StraightPathPtr_t create (LiegroupSpacePtr_t space, vectorIn_t init, vectorIn_t end, interval_t interval, ConstraintSetPtr_t constraints=ConstraintSetPtr_t())
static StraightPathPtr_t create (LiegroupElementConstRef init, LiegroupElementConstRef end, interval_t interval, ConstraintSetPtr_t constraints=ConstraintSetPtr_t())
static StraightPathPtr_t create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type length, ConstraintSetPtr_t constraints=ConstraintSetPtr_t())
static StraightPathPtr_t create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, interval_t interval, ConstraintSetPtr_t constraints=ConstraintSetPtr_t())
static StraightPathPtr_t createCopy (const StraightPathPtr_t &path)
static StraightPathPtr_t createCopy (const StraightPathPtr_t &path, const ConstraintSetPtr_t &constraints)

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 Print path in a stream.
 StraightPath (LiegroupSpacePtr_t space, vectorIn_t init, vectorIn_t end, interval_t interval)
 Constructor.
 StraightPath (LiegroupSpacePtr_t space, vectorIn_t init, vectorIn_t end, interval_t interval, ConstraintSetPtr_t constraints)
 Constructor.
 StraightPath (const StraightPath &path)
 Copy constructor.
 StraightPath (const StraightPath &path, const ConstraintSetPtr_t &constraints)
 Copy constructor with constraints.
void init (StraightPathPtr_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 &, const value_type &) const
PathPtr_t impl_extract (const interval_t &subInterval) const
 StraightPath ()
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 ()

Protected Attributes

LiegroupSpacePtr_t space_
Configuration_t initial_
Configuration_t end_
Protected Attributes inherited from hpp::core::Path
interval_t paramRange_
 Interval of parameters.

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

Destructor.

◆ StraightPath() [1/5]

hpp::core::StraightPath::StraightPath(LiegroupSpacePtr_tspace,
vectorIn_tinit,
vectorIn_tend,
interval_tinterval )
protected

Constructor.

◆ StraightPath() [2/5]

hpp::core::StraightPath::StraightPath(LiegroupSpacePtr_tspace,
vectorIn_tinit,
vectorIn_tend,
interval_tinterval,
ConstraintSetPtr_tconstraints )
protected

Constructor.

◆ StraightPath() [3/5]

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

Copy constructor.

◆ StraightPath() [4/5]

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

Copy constructor with constraints.

◆ StraightPath() [5/5]

hpp::core::StraightPath::StraightPath()
inlineprotected

Member Function Documentation

◆ copy() [1/2]

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.

Reimplemented in hpp::core::KinodynamicOrientedPath, and hpp::core::KinodynamicPath.

◆ copy() [2/2]

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

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

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

Implements hpp::core::Path.

Reimplemented in hpp::core::KinodynamicOrientedPath, and hpp::core::KinodynamicPath.

◆ create() [1/4]

StraightPathPtr_t hpp::core::StraightPath::create(const DevicePtr_t &device,
ConfigurationIn_tinit,
ConfigurationIn_tend,
interval_tinterval,
ConstraintSetPtr_tconstraints = ConstraintSetPtr_t() )
static

Create instance and return shared pointer

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

◆ create() [2/4]

StraightPathPtr_t hpp::core::StraightPath::create(const DevicePtr_t &device,
ConfigurationIn_tinit,
ConfigurationIn_tend,
value_typelength,
ConstraintSetPtr_tconstraints = ConstraintSetPtr_t() )
inlinestatic

Create instance and return shared pointer

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

◆ create() [3/4]

StraightPathPtr_t hpp::core::StraightPath::create(LiegroupElementConstRefinit,
LiegroupElementConstRefend,
interval_tinterval,
ConstraintSetPtr_tconstraints = ConstraintSetPtr_t() )
inlinestatic

Create instance and return shared pointer

Parameters
init,endStart and end configurations of the path
intervalinterval of definition
constraintsthe path is subject to.

◆ create() [4/4]

StraightPathPtr_t hpp::core::StraightPath::create(LiegroupSpacePtr_tspace,
vectorIn_tinit,
vectorIn_tend,
interval_tinterval,
ConstraintSetPtr_tconstraints = ConstraintSetPtr_t() )
inlinestatic

Create instance and return shared pointer

Parameters
init,endStart and end configurations of the path,
intervalinterval of definition
constraintsthe path is subject to.

◆ createCopy() [1/2]

StraightPathPtr_t hpp::core::StraightPath::createCopy(const StraightPathPtr_t &path)
inlinestatic

Create copy and return shared pointer

Parameters
pathpath to copy

◆ createCopy() [2/2]

StraightPathPtr_t hpp::core::StraightPath::createCopy(const StraightPathPtr_t &path,
const ConstraintSetPtr_t &constraints )
inlinestatic

Create copy and return shared pointer

Parameters
pathpath to copy
constraintsthe path is subject to

◆ end()

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

Get the final configuration.

Implements hpp::core::Path.

◆ endConfig()

void hpp::core::StraightPath::endConfig(ConfigurationIn_tend)
inline

Modify end configuration

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

◆ impl_compute()

virtual bool hpp::core::StraightPath::impl_compute(ConfigurationOut_tconfiguration,
value_typeparam ) const
protectedvirtual

Function evaluation without applying constraints.

Returns
true if everything went good.

Implements hpp::core::Path.

Reimplemented in hpp::core::KinodynamicOrientedPath, and hpp::core::KinodynamicPath.

◆ impl_derivative()

virtual void hpp::core::StraightPath::impl_derivative(vectorOut_tresult,
const value_type &t,
size_typeorder ) const
protectedvirtual

Virtual implementation of derivative.

Reimplemented from hpp::core::Path.

◆ impl_extract()

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

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

virtual void hpp::core::StraightPath::impl_velocityBound(vectorOut_tbound,
const value_type &param0,
const value_type &param1 ) const
protectedvirtual

Virtual implementation of velocityBound

Parameters
param0,param1interval of parameter
Return values
bound

Reimplemented from hpp::core::Path.

◆ init()

void hpp::core::StraightPath::init(StraightPathPtr_tself)
inlineprotected

◆ initial()

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

Get the initial configuration.

Implements hpp::core::Path.

◆ initialConfig()

void hpp::core::StraightPath::initialConfig(ConfigurationIn_tinitial)
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
protectedvirtual

Print path in a stream.

Reimplemented from hpp::core::Path.

Reimplemented in hpp::core::KinodynamicOrientedPath, and hpp::core::KinodynamicPath.

Member Data Documentation

◆ end_

Configuration_t hpp::core::StraightPath::end_
protected

◆ initial_

Configuration_t hpp::core::StraightPath::initial_
protected

◆ space_

LiegroupSpacePtr_t hpp::core::StraightPath::space_
protected

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