hpp-core
4.9.0
Implement basic classes for canonical path planning for kinematic chains.
|
#include <hpp/core/path.hh>
Public Member Functions | |
Construction, destruction, copy | |
virtual | ~Path () |
Destructor. More... | |
virtual PathPtr_t | copy () const =0 |
Return a shared pointer to a copy of this. More... | |
virtual PathPtr_t | copy (const ConstraintSetPtr_t &constraints) const =0 |
template<class T > | |
boost::shared_ptr< T > | as (void) |
Static cast into a derived type. More... | |
template<class T > | |
boost::shared_ptr< const T > | as (void) const |
Static cast into a derived type. More... | |
Extraction/Reversion of a sub-path | |
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 |
Evalutation of the path | |
Configuration_t | operator() (const value_type &time) const HPP_CORE_DEPRECATED |
Configuration_t | operator() (const value_type &time, bool &success) const |
bool | operator() (ConfigurationOut_t result, const value_type &time) const |
Configuration_t | eval (const value_type &time, bool &success) const |
bool | eval (ConfigurationOut_t result, const value_type &time) const |
bool | at (const value_type &time, ConfigurationOut_t result) const |
Get the configuration at a parameter without applying the constraints. More... | |
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 |
Path definition | |
size_type | outputSize () const |
Get size of configuration space. More... | |
size_type | outputDerivativeSize () const |
Get size of velocity. More... | |
const interval_t & | timeRange () const |
Get interval of definition. More... | |
virtual value_type | length () const |
Get length of definition interval. More... | |
virtual Configuration_t | initial () const =0 |
Get the initial configuration. More... | |
virtual Configuration_t | end () const =0 |
Get the final configuration. More... | |
const ConstraintSetPtr_t & | constraints () const |
Get constraints the path is subject to. More... | |
Time parameterizarion | |
Time parameterization is handled by this class so child classes need not to handle it. | |
const interval_t & | paramRange () const |
void | timeParameterization (const TimeParameterizationPtr_t &tp, const interval_t &tr) |
Set the time parameterization function. More... | |
Protected Member Functions | |
virtual std::ostream & | print (std::ostream &os) const |
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. More... | |
Path (const Path &path, const ConstraintSetPtr_t &constraints) | |
Copy constructor with constraints. More... | |
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. More... | |
void | timeRange (const interval_t &timeRange) |
const TimeParameterizationPtr_t & | timeParameterization () const |
value_type | paramLength () const |
Configuration_t | configAtParam (const value_type ¶m, bool &success) const |
virtual bool | impl_compute (ConfigurationOut_t configuration, value_type param) const =0 |
Function evaluation without applying constraints. More... | |
virtual void | impl_derivative (vectorOut_t derivative, const value_type ¶m, size_type order) const |
virtual void | impl_velocityBound (vectorOut_t bound, const value_type ¶m0, const value_type ¶m1) const |
virtual PathPtr_t | impl_extract (const interval_t ¶mInterval) const |
Virtual implementation of extract. More... | |
Protected Attributes | |
interval_t | paramRange_ |
Interval of parameters. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Path &path) |
Abstraction of paths: mapping from time to configuration space
A path \( p \) is defined by:
\begin{eqnarray*} p : [t_0, t_1] &\to & \mathcal{C} \\ t &\mapsto & constraints.apply( q(t) ) \end{eqnarray*}
where
constraints.apply
corresponds to calling Constraint::apply to constraintsOptionally, it is possible to time-parameterize the path with a function \( s \). By default, \( s \) is the identity. The model becomes:
\begin{eqnarray*} p : [t_0, t_1] &\to & \mathcal{C} \\ t &\mapsto & constraints.apply( q(s(t)) ) \end{eqnarray*}
where \( s \) is the timeParameterization, from timeRange to paramRange.
|
inlinevirtual |
Destructor.
|
protected |
Constructor
interval | interval of definition of the path, |
outputSize | size of the output configuration, |
outputDerivativeSize | number of degrees of freedom of the underlying robot |
constraints | constraints the set is subject to, constraints are solved at each evaluation of the output configuration. |
|
protected |
Constructor
interval | interval of definition of the path, |
outputSize | size of the output configuration, |
outputDerivativeSize | number of degrees of freedom of the underlying robot |
|
protected |
Copy constructor.
|
protected |
Copy constructor with constraints.
|
inline |
Static cast into a derived type.
|
inline |
Static cast into a derived type.
|
inline |
Get the configuration at a parameter without applying the constraints.
|
protectedvirtual |
Should be called by child classes after having init.
|
inlineprotected |
|
inline |
Get constraints the path is subject to.
|
inlineprotected |
Set the constraints
|
pure virtual |
Return a shared pointer to a copy of this.
Implemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::KinodynamicPath, hpp::core::DubinsPath, hpp::core::KinodynamicOrientedPath, hpp::core::ReedsSheppPath, hpp::core::path::Hermite, hpp::core::PathVector, hpp::core::steeringMethod::ConstantCurvature, and hpp::core::SubchainPath.
|
pure virtual |
Return a shared pointer to a copy of this and set constraints
constraints | constraints to apply to the copy |
Implemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::KinodynamicPath, hpp::core::DubinsPath, hpp::core::KinodynamicOrientedPath, hpp::core::ReedsSheppPath, hpp::core::path::Hermite, hpp::core::PathVector, hpp::core::steeringMethod::ConstantCurvature, and hpp::core::SubchainPath.
void hpp::core::Path::derivative | ( | vectorOut_t | result, |
const value_type & | time, | ||
size_type | order | ||
) | const |
Get derivative with respect to parameter at given parameter
time | value of the time in the definition interval, |
order | order of the derivative |
result | derivative. Should be allocated and of correct size. |
|
pure virtual |
Get the final configuration.
Implemented in hpp::core::StraightPath, hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::InterpolatedPath, hpp::core::DubinsPath, hpp::core::ReedsSheppPath, hpp::core::PathVector, hpp::core::path::Hermite, hpp::core::SubchainPath, and hpp::core::steeringMethod::ConstantCurvature.
|
inline |
|
inline |
PathPtr_t hpp::core::Path::extract | ( | const interval_t & | subInterval | ) | const |
subInterval | interval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed. |
projection_error | is thrown when an end configuration of the returned path could not be computed due to projection failure. |
|
inline |
subInterval | interval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed. |
projection_error | is thrown when an end configuration of the returned path could not be computed due to projection failure. |
|
protectedpure virtual |
Function evaluation without applying constraints.
Implemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::PathVector, hpp::core::KinodynamicPath, hpp::core::KinodynamicOrientedPath, hpp::core::steeringMethod::ConstantCurvature, and hpp::core::SubchainPath.
|
inlineprotectedvirtual |
Virtual implementation of derivative
param | parameter within paramRange |
order | order of derivation. |
derivative |
Reimplemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::PathVector, hpp::core::ReedsSheppPath, and hpp::core::steeringMethod::ConstantCurvature.
|
protectedvirtual |
Virtual implementation of extract.
Reimplemented in hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::PathVector, hpp::core::KinodynamicOrientedPath, hpp::core::steeringMethod::ConstantCurvature, and hpp::core::KinodynamicPath.
|
inlineprotectedvirtual |
Virtual implementation of velocityBound
param0,param1 | interval of parameter |
bound |
Reimplemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, and hpp::core::steeringMethod::ConstantCurvature.
|
protected |
Store weak pointer to itself
should be called at construction of derived class instances
|
pure virtual |
Get the initial configuration.
Implemented in hpp::core::StraightPath, hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::InterpolatedPath, hpp::core::DubinsPath, hpp::core::ReedsSheppPath, hpp::core::PathVector, hpp::core::path::Hermite, hpp::core::SubchainPath, and hpp::core::steeringMethod::ConstantCurvature.
|
inlinevirtual |
Get length of definition interval.
|
inline |
|
inline |
|
inline |
|
inline |
Get size of velocity.
|
inline |
Get size of configuration space.
|
inlineprotected |
|
inline |
Get interval of parameters.
|
protectedvirtual |
Print interval of definition (and of parameters if relevant) in a stream
Reimplemented in hpp::core::path::Spline< _PolynomeBasis, _Order >, hpp::core::path::Spline< BernsteinBasis, 3 >, hpp::core::StraightPath, hpp::core::InterpolatedPath, hpp::core::KinodynamicPath, hpp::core::DubinsPath, hpp::core::PathVector, hpp::core::path::Hermite, hpp::core::ReedsSheppPath, hpp::core::KinodynamicOrientedPath, hpp::core::SubchainPath, and hpp::core::steeringMethod::ConstantCurvature.
|
virtual |
Reversion of a path
Reimplemented in hpp::core::InterpolatedPath.
|
inline |
Set the time parameterization function.
|
inlineprotected |
|
inline |
Get interval of definition.
|
inlineprotected |
|
inline |
Get an upper bound of the velocity on a sub-interval. The result is a coefficient-wise.
t0 | begin of the interval |
t1 | end of the interval |
result | maximal derivative on the sub-interval. Should be allocated and of correct size. |
|
friend |
|
protected |
Interval of parameters.