hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
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:
Collaboration diagram for hpp::core::ObstacleUser:

Public Types

typedef std::pair< CollisionObjectConstPtr_t, CollisionObjectConstPtr_tCollisionPair_t
 
typedef std::vector< CollisionPair_tCollisionPairs_t
 
typedef std::vector< fcl::CollisionRequestCollisionRequests_t
 

Public Member Functions

virtual ~ObstacleUser ()
 
const CollisionPairs_tpairs () const
 
CollisionPairs_tpairs ()
 
const CollisionRequests_trequests () const
 
CollisionRequests_trequests ()
 
fcl::CollisionRequestdefaultRequest ()
 
void setRequests (const fcl::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)
 
- Public Member Functions inherited from hpp::core::ObstacleUserInterface
virtual ~ObstacleUserInterface ()
 

Static Public Member Functions

static bool collide (const CollisionPairs_t &pairs, const CollisionRequests_t &reqs, fcl::CollisionResult &res, std::size_t &i, pinocchio::DeviceData &data)
 

Protected Member Functions

 ObstacleUser (DevicePtr_t robot)
 Constructor of body pair collision. More...
 
 ObstacleUser (const ObstacleUser &other)
 Copy constructor. More...
 
void addRobotCollisionPairs ()
 

Protected Attributes

DevicePtr_t robot_
 
fcl::CollisionRequest defaultRequest_
 
CollisionPairs_t cPairs_
 
CollisionPairs_t pPairs_
 Active collision pairs. More...
 
CollisionPairs_t dPairs_
 Parameterized collision pairs. More...
 
CollisionRequests_t cRequests_
 Disabled collision pairs. More...
 
CollisionRequests_t pRequests_
 Active collision requests. More...
 
CollisionRequests_t dRequests_
 Parameterized collision requests. More...
 

Detailed Description

Stores a set of obstacles (movable or static).

Member Typedef Documentation

◆ CollisionPair_t

◆ CollisionPairs_t

◆ CollisionRequests_t

Constructor & Destructor Documentation

◆ ~ObstacleUser()

virtual hpp::core::ObstacleUser::~ObstacleUser ( )
inlinevirtual

◆ 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
objectobstacle 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
objectobstacle added
jointconcerned with obstacle addition
includeChildrenwhether 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,
const CollisionRequests_t reqs,
fcl::CollisionResult res,
std::size_t &  i,
pinocchio::DeviceData data 
)
static

◆ defaultRequest()

fcl::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
relMotionsquare symmetric matrix of RelativeMotionType of size numberDof x numberDof

Implements hpp::core::ObstacleUserInterface.

◆ pairs() [1/2]

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

◆ pairs() [2/2]

CollisionPairs_t& hpp::core::ObstacleUser::pairs ( )
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
jointthat holds the inner objects,
obstacleto remove.

Implements hpp::core::ObstacleUserInterface.

◆ requests() [1/2]

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

◆ requests() [2/2]

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

◆ setRequests()

void hpp::core::ObstacleUser::setRequests ( const fcl::CollisionRequest r)

◆ setSecurityMargins()

virtual void hpp::core::ObstacleUser::setSecurityMargins ( const matrix_t securityMatrix)
virtual

Set different security margins for collision pairs

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

See also
hpp::fcl::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_

fcl::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: