hpp-core: hpp::core::ContinuousValidation Class Reference

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

Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
hpp::core::ContinuousValidation Class Referenceabstract
Validation of configurations and paths

`#include <hpp/core/continuous-validation.hh>`

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

## Classes
class | AddObstacle
class | Initialize

## Public Member Functions
virtual bool | validate (const PathPtr_t &path, bool reverse, PathPtr_t &validPart, PathValidationReportPtr_t &report)
virtual void | addObstacle (const CollisionObjectConstPtr_t &object)
virtual void | removeObstacleFromJoint (const JointPtr_t &joint, const CollisionObjectConstPtr_t &obstacle)
void | filterCollisionPairs (const RelativeMotion::matrix_type &relMotion)
virtual void | setSecurityMargins (const matrix_t &securityMatrix)
virtual void | setSecurityMarginBetweenBodies (const std::string &body_a, const std::string &body_b, const value_type &margin)
void | addIntervalValidation (const IntervalValidationPtr_t &intervalValidation)
value_type | tolerance () const
| Get tolerance value.
value_type | breakDistance () const
void | breakDistance (value_type distance)
DevicePtr_t | robot () const
void | initialize ()
virtual | ~ContinuousValidation ()
Delegate
template<class Delegate >
void | add (const Delegate &delegate)
template<class Delegate >
void | reset ()
Public Member Functions inherited from hpp::core::PathValidation
virtual bool | validate (ConfigurationIn_t q, ValidationReportPtr_t &report)
virtual | ~PathValidation ()
Public Member Functions inherited from hpp::core::ObstacleUserInterface
virtual | ~ObstacleUserInterface ()=default

## Protected Types
typedef continuousValidation::IntervalValidations_t | IntervalValidations_t

## Protected Member Functions
| ContinuousValidation (const DevicePtr_t &robot, const value_type &tolerance)
virtual bool | validateConfiguration (IntervalValidations_t &intervalValidations, const Configuration_t &config, const value_type &t, interval_t &interval, PathValidationReportPtr_t &report)
bool | validateIntervals (IntervalValidations_t &validations, const value_type &t, interval_t &interval, PathValidationReportPtr_t &pathReport, typename IntervalValidations_t::iterator &smallestInterval, pinocchio::DeviceData &data)
void | init (ContinuousValidationWkPtr_t weak)
| Store weak pointer to itself.
Protected Member Functions inherited from hpp::core::PathValidation
| PathValidation ()

## Static Protected Member Functions
static void | setPath (IntervalValidations_t &intervalValidations, const PathPtr_t &path, bool reverse)

## Protected Attributes
DevicePtr_t | robot_
value_type | tolerance_
value_type | breakDistance_
IntervalValidations_t | intervalValidations_
| All BodyPairValidation to validate.
IntervalValidations_t | disabledBodyPairCollisions_
| BodyPairCollision for which collision is disabled.
pinocchio::Pool< IntervalValidations_t > | bodyPairCollisionPool_
value_type | stepSize_

## Detailed Description

Continuous validation of a path

This class valides a path for various criteria. The default validation criterion is the absence of collisions between bodies of a robot and the environment.

Validation of PathVector instances is performed path by path.

A path is valid if and only if each interval validation element is valid along the whole interval of definition (class continuousValidation::IntervalValidation).

In order to validate other criteria, users can add their own derivation of class continuousValidation::IntervalValidation using method addIntervalValidation. They can also make use of two types of delegates:

- Initialize and user defined derived classes. Instances of these classes may be added to the list of initializers by calling method <ContinuousValidation::Initialize> add . Upon calling method initialize, methods `doExecute` of these instances are called sucessively.
- AddObstacle and user defined derived classes. Instances of these classes may be added to the list of obstacle adders by calling method <ContinuousValidation::AddObstacle> add . Upon calling method addObstacle, method `doExecute` of these instances are called sucessively.

Base class ContinuousValidation::Initialize initializes collision pairs between bodies of the robot.

Validation of a collision pair is based on the computation of an upper-bound of the relative velocity of objects of one joint (or of the environment) in the reference frame of the other joint. This is implemented in continuousValidation::BodyPairCollision and continuousValidation::SolidSolidCollision.

See this document for details on the continuous collision checking.

See this document for details on the architecture of the code.

## Member Typedef Documentation

## ◆ IntervalValidations_t

typedef continuousValidation::IntervalValidations_t hpp::core::ContinuousValidation::IntervalValidations_t
| protected

## Constructor & Destructor Documentation

## ◆ ~ContinuousValidation()

virtual hpp::core::ContinuousValidation::~ContinuousValidation | ( |  | ) |
| virtual

## ◆ ContinuousValidation()

hpp::core::ContinuousValidation::ContinuousValidation | ( | const DevicePtr_t & | robot,
|  | const value_type & | tolerance
| ) |  |
| protected

Constructor

Parameters

  robot | the robot for which validation is performed,
  tolerance | maximal penetration allowed.

## Member Function Documentation

## ◆ add()

template<class Delegate >

void hpp::core::ContinuousValidation::add | ( | const Delegate & | delegate | ) |

Add a delegate

Template Parameters

  Delegate | type of delegate.

Parameters

  instance | of delegate class.

Delegates are used to enable users to specialize some actions of the class without deriving the class. This class supports two types of delegates:

- Initialize: method doExecute of instances of this class and of user defined derived classes are called successively upon call of method , AddObstacle: method ContinuousValidation::AddObstacle::doExecute doExecute of instances of this class and of user defined derived classes are called successively upon call of method ,

## ◆ addIntervalValidation()

void hpp::core::ContinuousValidation::addIntervalValidation | ( | const IntervalValidationPtr_t & | intervalValidation | ) |

Add interval validation instance

## ◆ addObstacle()

virtual void hpp::core::ContinuousValidation::addObstacle | ( | const CollisionObjectConstPtr_t & | object | ) |
| virtual

Iteratively call method doExecute of delegate classes AddObstacle

Parameters

  object | new obstacle.

See also
  ContinuousValidation::add, ContinuousValidation::AddObstacle.

Implements hpp::core::ObstacleUserInterface.

## ◆ breakDistance() [1/2]

value_type hpp::core::ContinuousValidation::breakDistance | ( |  | ) | const
| inline

Get the break distance passed to collision checking.

See also
  coal::CollisionRequest::break_distance

## ◆ breakDistance() [2/2]

void hpp::core::ContinuousValidation::breakDistance | ( | value_type | distance | ) |

Set the break distance passed to collision checking.

See also
  value_type breakDistance() const

## ◆ filterCollisionPairs()

void hpp::core::ContinuousValidation::filterCollisionPairs | ( | const RelativeMotion::matrix_type & | relMotion | ) |
| virtual

Filter collision pairs.

Remove pairs of object that cannot be in collision. This effectively disables collision detection between objects that have no possible relative motion due to the constraints.

Parameters

  relMotion | square symmetric matrix of RelativeMotionType of size numberDof x numberDof

Implements hpp::core::ObstacleUserInterface.

## ◆ init()

void hpp::core::ContinuousValidation::init | ( | ContinuousValidationWkPtr_t | weak | ) |
| protected

Store weak pointer to itself.

## ◆ initialize()

void hpp::core::ContinuousValidation::initialize | ( |  | ) |

Iteratively call method doExecute of delegate classes Initialize

See also
  ContinuousValidation::add, ContinuousValidation::Initialize.

## ◆ removeObstacleFromJoint()

virtual void hpp::core::ContinuousValidation::removeObstacleFromJoint | ( | const JointPtr_t & | joint,
|  | const CollisionObjectConstPtr_t & | obstacle
| ) |  |
| virtual

Remove a collision pair between a joint and an obstacle

Parameters

  joint | the joint that holds the inner objects,
  obstacle | the obstacle to remove.

Note
  collision configuration validation needs to know about obstacles. This virtual method does nothing for configuration validation methods that do not care about obstacles.

Implements hpp::core::ObstacleUserInterface.

## ◆ reset()

template<class Delegate >

void hpp::core::ContinuousValidation::reset | ( |  | ) |

Reset delegates of a type

Template Parameters

  delegate | type of delegate

## ◆ robot()

DevicePtr_t hpp::core::ContinuousValidation::robot | ( |  | ) | const
| inline

## ◆ setPath()

static void hpp::core::ContinuousValidation::setPath | ( | IntervalValidations_t & | intervalValidations,
|  | const PathPtr_t & | path,
|  | bool | reverse
| ) |  |
| staticprotected

## ◆ setSecurityMarginBetweenBodies()

virtual void hpp::core::ContinuousValidation::setSecurityMarginBetweenBodies | ( | const std::string & | body_a,
|  | const std::string & | body_b,
|  | const value_type & | margin
| ) |  |
| virtual

Set security margin for collision pair between the two bodies.

See also
  coal::CollisionRequest::security_margin.

Implements hpp::core::ObstacleUserInterface.

## ◆ setSecurityMargins()

virtual void hpp::core::ContinuousValidation::setSecurityMargins | ( | const matrix_t & | securityMatrix | ) |
| virtual

Set different security margins for collision pairs

This function works joint-wise. If you need a finer control, use setSecurityMarginBetweenBodies

This method enables users to choose different security margins for each pair of robot joint or each pair robot joint - obstacle.

See also
  coal::CollisionRequest::security_margin.

Implements hpp::core::ObstacleUserInterface.

## ◆ tolerance()

value_type hpp::core::ContinuousValidation::tolerance | ( |  | ) | const
| inline

Get tolerance value.

## ◆ validate()

virtual bool hpp::core::ContinuousValidation::validate | ( | const PathPtr_t & | path,
|  | bool | reverse,
|  | PathPtr_t & | validPart,
|  | PathValidationReportPtr_t & | report
| ) |  |
| virtual

Compute the largest valid interval starting from the path beginning

Parameters

  path | the path to check for validity,
  reverse | if true check from the end,

Return values

  validPart | the extracted valid part of the path, pointer to path if path is valid.
  report | information about the validation process. A report is allocated if the path is not valid.

Returns
  true if the whole path is valid.

Implements hpp::core::PathValidation.

## ◆ validateConfiguration()

virtual bool hpp::core::ContinuousValidation::validateConfiguration | ( | IntervalValidations_t & | intervalValidations,
|  | const Configuration_t & | config,
|  | const value_type & | t,
|  | interval_t & | interval,
|  | PathValidationReportPtr_t & | report
| ) |  |
| protectedvirtual

Validate interval centered on a path parameter

Parameters

  intervalValidations | collision to consider
  config | Configuration at abscissa t on the path.
  t | parameter value in the path interval of definition

Return values

  interval | interval over which the path is collision-free, not necessarily included in definition interval

Returns
  true if the body pair is collision free for this parameter value, false if the body pair is in collision.

Note
  object should be in the positions defined by the configuration of parameter t on the path.

## ◆ validateIntervals()

bool hpp::core::ContinuousValidation::validateIntervals | ( | IntervalValidations_t & | validations,
|  | const value_type & | t,
|  | interval_t & | interval,
|  | PathValidationReportPtr_t & | pathReport,
|  | typename IntervalValidations_t::iterator & | smallestInterval,
|  | pinocchio::DeviceData & | data
| ) |  |
| inlineprotected

Validate a set of intervals for a given parameter along a path

Template Parameters

  IntervalValidation | type of container of validation elements (for instance validation for collision between a pair of bodies),
  ValidationReportTypePtr_t | type of validation report produced in case non validation. Should derive from ValidationReport.

Parameters

  objects | able to validate an interval for collision,
  t | center of the interval to be validated,

Return values

  interval | interval validated for all objects,
  smallestInterval | iterator to the validation element that returned the smallest interval.

## Member Data Documentation

## ◆ bodyPairCollisionPool_

pinocchio::Pool<IntervalValidations_t> hpp::core::ContinuousValidation::bodyPairCollisionPool_
| protected

## ◆ breakDistance_

value_type hpp::core::ContinuousValidation::breakDistance_
| protected

## ◆ disabledBodyPairCollisions_

IntervalValidations_t hpp::core::ContinuousValidation::disabledBodyPairCollisions_
| protected

BodyPairCollision for which collision is disabled.

## ◆ intervalValidations_

IntervalValidations_t hpp::core::ContinuousValidation::intervalValidations_
| protected

All BodyPairValidation to validate.

## ◆ robot_

DevicePtr_t hpp::core::ContinuousValidation::robot_
| protected

## ◆ stepSize_

value_type hpp::core::ContinuousValidation::stepSize_
| protected

## ◆ tolerance_

value_type hpp::core::ContinuousValidation::tolerance_
| protected

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

- include/hpp/core/continuous-validation.hh