Parasol Planning Library (PPL)
Rapid Class Reference

#include <RapidCollisionDetection.h>

Inheritance diagram for Rapid:
Inheritance graph
[legend]
Collaboration diagram for Rapid:
Collaboration graph
[legend]

Public Member Functions

Construction
 Rapid ()
 
virtual ~Rapid ()
 
CollisionDetectionMethod Overrides
virtual bool IsInCollision (const GMSPolyhedron &_polyhedron1, const mathtool::Transformation &_t1, const GMSPolyhedron &_polyhedron2, const mathtool::Transformation &_t2, CDInfo &_cdInfo) override
 
- Public Member Functions inherited from CollisionDetectionMethod
 CollisionDetectionMethod (const std::string &_name="CD_USER1")
 
virtual ~CollisionDetectionMethod ()
 
const std::string & GetName () const
 
virtual void Print (std::ostream &_os) const
 
virtual bool IsInsideObstacle (const mathtool::Vector3d &_point, const GMSPolyhedron &_polyhedron, const mathtool::Transformation &_transformation)
 

Static Public Member Functions

Model Construction
static RAPID_model * Build (const GMSPolyhedron &_polyhedron)
 

Additional Inherited Members

- Protected Attributes inherited from CollisionDetectionMethod
std::string m_name
 Name of the CD method. More...
 

Detailed Description

RAPID checks for polygon collisions between two meshes.

RAPID is fast, but it cannot determine any auxiliary information. The contacts (colliding triangle IDs) are stored in the CDInfo object.

Todo:
There is no reason we can't support IsInsideObstacle with RAPID. This isn't really a part of PQP either - it's auxilliary code we created with a ray-shooting test. We can do the same thing here with an added 'RapidSolid' class, or by toggling the IsInsideObstacle check with a flag both here and in PQP.

Reference: Stefan Gottschalk and Ming C. Lin and Dinesh Manocha. "OBBTree: A Hierarchical Structure for Rapid Interference Detection". SIGGRAPH 1996.

Warning
RAPID is not a thread-safe library; it uses static data as part of its internal implementation. Each call to any RAPID instance will be serialized with a mutex (so it is a bad choice for multi-threaded use like simulations with multiple planning agents).

Constructor & Destructor Documentation

◆ Rapid()

Rapid::Rapid ( )

◆ ~Rapid()

Rapid::~Rapid ( )
virtualdefault

Member Function Documentation

◆ Build()

RAPID_model * Rapid::Build ( const GMSPolyhedron _polyhedron)
static

Build a RAPID model for a GMSPolyhedron.

Parameters
_polyhedronThe polyhedron to model.
Returns
A RAPID model of _model.

◆ IsInCollision()

bool Rapid::IsInCollision ( const GMSPolyhedron _polyhedron1,
const mathtool::Transformation &  _transformation1,
const GMSPolyhedron _polyhedron2,
const mathtool::Transformation &  _transformation2,
CDInfo _cdInfo 
)
overridevirtual

Check if two polyhedrons are in collision.

Parameters
_polyhedron1The first polyhedron.
_transformation1Transformation for the first polyhedron.
_polyhedron2The second polyhedron.
_transformation2Transformation for the second polyhedron.
_cdInfoOutput information from the collision computation.
Returns
True if the polyhedrons are considered to be in collision. Some method check only intersection (i.e. Rapid, PQP) while others also check if one polyhedron is inside the other (i.e. PQPSolid).

@TODO See if we can modify RAPID to accept const values to avoid the copy here.

Reimplemented from CollisionDetectionMethod.


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