hpp-rbprm  4.12.0
Implementation of RB-PRM planner using hpp.
hpp::rbprm::ParabolaPath Class Reference

#include <hpp/rbprm/planner/parabola-path.hh>

Inheritance diagram for hpp::rbprm::ParabolaPath:
Collaboration diagram for hpp::rbprm::ParabolaPath:

Public Types

typedef Path parent_t
 

Public Member Functions

virtual ~ParabolaPath ()
 Destructor. More...
 
virtual core::PathPtr_t copy () const
 
virtual core::PathPtr_t copy (const core::ConstraintSetPtr_t &constraints) const
 
virtual core::PathPtr_t extract (const core::interval_t &subInterval) const
 
virtual core::PathPtr_t reverse () const
 
void initialConfig (core::ConfigurationIn_t initial)
 
void endConfig (core::ConfigurationIn_t end)
 
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 core::value_type length () const
 Get previously computed length. More...
 
void coefficients (core::vector_t coefs) const
 Set the three parabola coefficients. More...
 
core::vector_t coefficients () const
 Get path coefficients. More...
 
virtual core::value_type computeLength (const core::ConfigurationIn_t q1, const core::ConfigurationIn_t q2) const
 
core::vector_t evaluateVelocity (const core::value_type t) const
 Evaluate velocity vector at path abcissa t. More...
 

Static Public Member Functions

static ParabolaPathPtr_t create (const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients)
 
static ParabolaPathPtr_t create (const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients, core::vector_t V0, core::vector_t Vimp, std::vector< std::string > initialROMnames, std::vector< std::string > endROMnames)
 
static ParabolaPathPtr_t createCopy (const ParabolaPathPtr_t &path)
 
static ParabolaPathPtr_t createCopy (const ParabolaPathPtr_t &path, const core::ConstraintSetPtr_t &)
 

Public Attributes

core::value_type alpha_
 
core::value_type alphaMin_
 
core::value_type alphaMax_
 
core::value_type Xtheta_
 
core::value_type Z_
 
core::vector_t V0_
 
core::vector_t Vimp_
 
std::vector< std::string > initialROMnames_
 
std::vector< std::string > endROMnames_
 

Protected Member Functions

virtual std::ostream & print (std::ostream &os) const
 Print path in a stream. More...
 
 ParabolaPath (const core::DevicePtr_t &robot, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients)
 Constructor. More...
 
 ParabolaPath (const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefs, core::vector_t V0_, core::vector_t Vimp, std::vector< std::string > initialROMnames, std::vector< std::string > endROMnames)
 Constructor with velocities and ROMnames. More...
 
 ParabolaPath (const ParabolaPath &path)
 Copy constructor. More...
 
core::value_type lengthFunction (const core::value_type x) const
 
void init (ParabolaPathPtr_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

◆ ~ParabolaPath()

virtual hpp::rbprm::ParabolaPath::~ParabolaPath ( )
inlinevirtual

Destructor.

◆ ParabolaPath() [1/3]

hpp::rbprm::ParabolaPath::ParabolaPath ( const core::DevicePtr_t &  robot,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::vector_t  coefficients 
)
protected

Constructor.

◆ ParabolaPath() [2/3]

hpp::rbprm::ParabolaPath::ParabolaPath ( const core::DevicePtr_t &  device,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::vector_t  coefs,
core::vector_t  V0_,
core::vector_t  Vimp,
std::vector< std::string >  initialROMnames,
std::vector< std::string >  endROMnames 
)
protected

Constructor with velocities and ROMnames.

◆ ParabolaPath() [3/3]

hpp::rbprm::ParabolaPath::ParabolaPath ( const ParabolaPath path)
protected

Copy constructor.

Member Function Documentation

◆ coefficients() [1/2]

void hpp::rbprm::ParabolaPath::coefficients ( core::vector_t  coefs) const
inline

Set the three parabola coefficients.

◆ coefficients() [2/2]

core::vector_t hpp::rbprm::ParabolaPath::coefficients ( ) const
inline

Get path coefficients.

◆ computeLength()

virtual core::value_type hpp::rbprm::ParabolaPath::computeLength ( const core::ConfigurationIn_t  q1,
const core::ConfigurationIn_t  q2 
) const
virtual

◆ copy() [1/2]

virtual core::PathPtr_t hpp::rbprm::ParabolaPath::copy ( ) const
inlinevirtual

Return a shared pointer to this

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

Reimplemented in hpp::rbprm::TimedParabolaPath.

◆ copy() [2/2]

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

Reimplemented in hpp::rbprm::TimedParabolaPath.

◆ create() [1/2]

static ParabolaPathPtr_t hpp::rbprm::ParabolaPath::create ( const core::DevicePtr_t &  device,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::vector_t  coefficients 
)
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() [2/2]

static ParabolaPathPtr_t hpp::rbprm::ParabolaPath::create ( const core::DevicePtr_t &  device,
core::ConfigurationIn_t  init,
core::ConfigurationIn_t  end,
core::value_type  length,
core::vector_t  coefficients,
core::vector_t  V0,
core::vector_t  Vimp,
std::vector< std::string >  initialROMnames,
std::vector< std::string >  endROMnames 
)
inlinestatic

Create instance and return shared pointer

Parameters
deviceRobot corresponding to configurations
init,endStart and end configurations of the path
lengthDistance between the configurations.
V0,Vimpinitial and final velocity vectors
initialROMnames,endROMnamesinitial and final ROM names

◆ createCopy() [1/2]

static ParabolaPathPtr_t hpp::rbprm::ParabolaPath::createCopy ( const ParabolaPathPtr_t path)
inlinestatic

Create copy and return shared pointer

Parameters
pathpath to copy

◆ createCopy() [2/2]

static ParabolaPathPtr_t hpp::rbprm::ParabolaPath::createCopy ( const ParabolaPathPtr_t path,
const core::ConstraintSetPtr_t &   
)
inlinestatic

Create copy and return shared pointer

Parameters
pathpath to copy
constraintsthe path is subject to <!> constraints part NOT IMPLEMENTED YET

◆ device()

core::DevicePtr_t hpp::rbprm::ParabolaPath::device ( ) const

Return the internal robot.

◆ end()

core::Configuration_t hpp::rbprm::ParabolaPath::end ( ) const
inline

Get the final configuration.

◆ endConfig()

void hpp::rbprm::ParabolaPath::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

◆ evaluateVelocity()

core::vector_t hpp::rbprm::ParabolaPath::evaluateVelocity ( const core::value_type  t) const

Evaluate velocity vector at path abcissa t.

◆ extract()

virtual core::PathPtr_t hpp::rbprm::ParabolaPath::extract ( const core::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 in hpp::rbprm::TimedParabolaPath.

◆ impl_compute()

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

Param is the curvilinear abcissa [0 : pathLength] The pathLength can be computed as long as the coefficients_ are known Finally: config(0) = x(param) = (1 - param/length)*x1 + param/length*x2 config(1) = coefs(0)*x(param)^2 + coefs(1)*x(param) + coefs(2)

Reimplemented in hpp::rbprm::TimedParabolaPath.

◆ init()

void hpp::rbprm::ParabolaPath::init ( ParabolaPathPtr_t  self)
inlineprotected

◆ initial()

core::Configuration_t hpp::rbprm::ParabolaPath::initial ( ) const
inline

Get the initial configuration.

◆ initialConfig()

void hpp::rbprm::ParabolaPath::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

◆ length()

virtual core::value_type hpp::rbprm::ParabolaPath::length ( ) const
inlinevirtual

Get previously computed length.

Reimplemented in hpp::rbprm::TimedParabolaPath.

◆ lengthFunction()

core::value_type hpp::rbprm::ParabolaPath::lengthFunction ( const core::value_type  x) const
protected

◆ print()

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

Print path in a stream.

Reimplemented in hpp::rbprm::TimedParabolaPath.

◆ reverse()

virtual core::PathPtr_t hpp::rbprm::ParabolaPath::reverse ( ) const
virtual

Reversion of a path

Returns
a new path that is this one reversed.

Reimplemented in hpp::rbprm::TimedParabolaPath.

Member Data Documentation

◆ alpha_

core::value_type hpp::rbprm::ParabolaPath::alpha_

◆ alphaMax_

core::value_type hpp::rbprm::ParabolaPath::alphaMax_

◆ alphaMin_

core::value_type hpp::rbprm::ParabolaPath::alphaMin_

◆ endROMnames_

std::vector<std::string> hpp::rbprm::ParabolaPath::endROMnames_

◆ initialROMnames_

std::vector<std::string> hpp::rbprm::ParabolaPath::initialROMnames_

◆ V0_

core::vector_t hpp::rbprm::ParabolaPath::V0_

◆ Vimp_

core::vector_t hpp::rbprm::ParabolaPath::Vimp_

◆ Xtheta_

core::value_type hpp::rbprm::ParabolaPath::Xtheta_

◆ Z_

core::value_type hpp::rbprm::ParabolaPath::Z_

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