hpp-core: hpp::core::ObstacleUser Class Reference

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

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

Stores a set of obstacles (movable or static). More...

`#include <hpp/core/obstacle-user.hh>`

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

## Public Member Functions
virtual | ~ObstacleUser ()=default
const CollisionPairs_t & | pairs () const
CollisionPairs_t & | pairs ()
const CollisionRequests_t & | requests () const
CollisionRequests_t & | requests ()
coal::CollisionRequest & | defaultRequest ()
void | setRequests (const coal::CollisionRequest &r)
virtual void | addObstacle (const CollisionObjectConstPtr_t &object)
virtual void | addObstacleToJoint (const CollisionObjectConstPtr_t &object, const JointPtr_t &joint, const bool includeChildren)
virtual void | removeObstacleFromJoint (const JointPtr_t &joint, const CollisionObjectConstPtr_t &object)
virtual 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)
Public Member Functions inherited from hpp::core::ObstacleUserInterface
virtual | ~ObstacleUserInterface ()=default

## Static Public Member Functions
static bool | collide (const CollisionPairs_t &pairs, CollisionRequests_t &reqs, coal::CollisionResult &res, std::size_t &i, pinocchio::DeviceData &data)

## Protected Member Functions
| ObstacleUser (DevicePtr_t robot)
| Constructor of body pair collision.
| ObstacleUser (const ObstacleUser &other)
| Copy constructor.
void | addRobotCollisionPairs ()

## Protected Attributes
DevicePtr_t | robot_
coal::CollisionRequest | defaultRequest_
CollisionPairs_t | cPairs_
CollisionPairs_t | pPairs_
| Active collision pairs.
CollisionPairs_t | dPairs_
| Parameterized collision pairs.
CollisionRequests_t | cRequests_
| Disabled collision pairs.
CollisionRequests_t | pRequests_
| Active collision requests.
CollisionRequests_t | dRequests_
| Parameterized collision requests.

## Detailed Description

Stores a set of obstacles (movable or static).

## Constructor & Destructor Documentation

## ◆ ~ObstacleUser()

virtual hpp::core::ObstacleUser::~ObstacleUser | ( |  | ) |
| virtualdefault

## ◆ ObstacleUser() [1/2]

hpp::core::ObstacleUser::ObstacleUser | ( | DevicePtr_t | robot | ) |
| inlineprotected

Constructor of body pair collision.

## ◆ ObstacleUser() [2/2]

hpp::core::ObstacleUser::ObstacleUser | ( | const ObstacleUser & | other | ) |
| inlineprotected

Copy constructor.

## Member Function Documentation

## ◆ addObstacle()

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

Add an obstacle

Parameters

  object | obstacle added

Implements hpp::core::ObstacleUserInterface.

## ◆ addObstacleToJoint()

virtual void hpp::core::ObstacleUser::addObstacleToJoint | ( | const CollisionObjectConstPtr_t & | object,
|  | const JointPtr_t & | joint,
|  | const bool | includeChildren
| ) |  |
| virtual

Add an obstacle to a specific joint

Parameters

  object | obstacle added
  joint | concerned with obstacle addition
  includeChildren | whether to add obstacle to joint children Store obstacle and build a collision pair with each body of the robot.

## ◆ addRobotCollisionPairs()

void hpp::core::ObstacleUser::addRobotCollisionPairs | ( |  | ) |
| protected

## ◆ collide()

static bool hpp::core::ObstacleUser::collide | ( | const CollisionPairs_t & | pairs,
|  | CollisionRequests_t & | reqs,
|  | coal::CollisionResult & | res,
|  | std::size_t & | i,
|  | pinocchio::DeviceData & | data
| ) |  |
| static

## ◆ defaultRequest()

coal::CollisionRequest & hpp::core::ObstacleUser::defaultRequest | ( |  | ) |
| inline

## ◆ filterCollisionPairs()

virtual void hpp::core::ObstacleUser::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.

Todo:
  Before disabling collision pair, check if there is a collision.

Parameters

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

Implements hpp::core::ObstacleUserInterface.

## ◆ pairs() [1/2]

CollisionPairs_t & hpp::core::ObstacleUser::pairs | ( |  | ) |
| inline

## ◆ pairs() [2/2]

const CollisionPairs_t & hpp::core::ObstacleUser::pairs | ( |  | ) | const
| inline

## ◆ removeObstacleFromJoint()

virtual void hpp::core::ObstacleUser::removeObstacleFromJoint | ( | const JointPtr_t & | joint,
|  | const CollisionObjectConstPtr_t & | object
| ) |  |
| virtual

Remove a collision pair between a joint and an obstacle

Parameters

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

Implements hpp::core::ObstacleUserInterface.

## ◆ requests() [1/2]

CollisionRequests_t & hpp::core::ObstacleUser::requests | ( |  | ) |
| inline

## ◆ requests() [2/2]

const CollisionRequests_t & hpp::core::ObstacleUser::requests | ( |  | ) | const
| inline

## ◆ setRequests()

void hpp::core::ObstacleUser::setRequests | ( | const coal::CollisionRequest & | r | ) |

## ◆ setSecurityMarginBetweenBodies()

virtual void hpp::core::ObstacleUser::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::ObstacleUser::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.

## Member Data Documentation

## ◆ cPairs_

CollisionPairs_t hpp::core::ObstacleUser::cPairs_
| protected

## ◆ cRequests_

CollisionRequests_t hpp::core::ObstacleUser::cRequests_
| protected

Disabled collision pairs.

## ◆ defaultRequest_

coal::CollisionRequest hpp::core::ObstacleUser::defaultRequest_
| protected

## ◆ dPairs_

CollisionPairs_t hpp::core::ObstacleUser::dPairs_
| protected

Parameterized collision pairs.

## ◆ dRequests_

CollisionRequests_t hpp::core::ObstacleUser::dRequests_
| protected

Parameterized collision requests.

## ◆ pPairs_

CollisionPairs_t hpp::core::ObstacleUser::pPairs_
| protected

Active collision pairs.

## ◆ pRequests_

CollisionRequests_t hpp::core::ObstacleUser::pRequests_
| protected

Active collision requests.

## ◆ robot_

DevicePtr_t hpp::core::ObstacleUser::robot_
| protected

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

- include/hpp/core/obstacle-user.hh