RobWorkProject
Classes | Public Types | Public Member Functions | List of all members
ProximityStrategyFCL Class Reference

This is a strategy wrapper for the Flexible Collision Library (FCL) More...

#include <ProximityStrategyFCL.hpp>

Inherits CollisionStrategy, and DistanceStrategy.

Classes

struct  FCLModel
 Datatype to hold the FCL bounding volume and related geometrical data. More...
 
struct  FCLProximityModel
 Datatype to hold the proximity models. More...
 

Public Types

enum  BV {
  AABB, OBB, RSS, OBBRSS,
  kIOS, KDOP16, KDOP18, KDOP24
}
 Supported bounding volumes. More...
 
typedef rw::common::Ptr< ProximityStrategyFCLPtr
 Smart pointer type for FCL Proximity strategy.
 
typedef rw::common::Ptr< fcl::CollisionGeometry > FCLBVHModelPtr
 Type of internal collision geometry.
 
typedef std::vector< FCLModelFCLModelList
 Type for list of proximity models.
 
- Public Types inherited from CollisionStrategy
enum  QueryType { FirstContact, AllContacts }
 the type of query that is to be performed
 
typedef rw::common::Ptr< CollisionStrategyPtr
 smart pointer type to this class
 
- Public Types inherited from ProximityStrategy
typedef rw::common::Ptr< ProximityStrategyPtr
 smart pointer type to this class
 
- Public Types inherited from DistanceStrategy
typedef rw::common::Ptr< DistanceStrategyPtr
 smart pointer type to this class
 

Public Member Functions

 ProximityStrategyFCL (BV bv=BV::AABB)
 Constructor. More...
 
virtual ~ProximityStrategyFCL ()
 Destructor.
 
virtual rw::proximity::ProximityModel::Ptr createModel ()
 creates an empty ProximityModel More...
 
void destroyModel (rw::proximity::ProximityModel *model)
 deallocates the memory used for model More...
 
bool addGeometry (rw::proximity::ProximityModel *model, const rw::geometry::Geometry &geom)
 adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. More...
 
bool addGeometry (rw::proximity::ProximityModel *model, rw::common::Ptr< rw::geometry::Geometry > geom, bool forceCopy=false)
 adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. More...
 
bool removeGeometry (rw::proximity::ProximityModel *model, const std::string &geomId)
 removes a geometry from a specific proximity model More...
 
std::vector< std::string > getGeometryIDs (rw::proximity::ProximityModel *model)
 the list of all geometry ids that are associated to the proximity model model is returned More...
 
void clear ()
 Clears any stored model information. More...
 
bool doInCollision (rw::proximity::ProximityModel::Ptr a, const rw::math::Transform3D<> &wTa, rw::proximity::ProximityModel::Ptr b, const rw::math::Transform3D<> &wTb, rw::proximity::ProximityStrategyData &data)
 Checks to see if two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ are in collision. More...
 
void getCollisionContacts (std::vector< CollisionStrategy::Contact > &contacts, rw::proximity::ProximityStrategyData &data)
 this method interprets the collision query result and calculates a list of contacts to represent the collision geometry between the colliding geometries. More...
 
rw::proximity::DistanceStrategy::ResultdoDistance (rw::proximity::ProximityModel::Ptr a, const rw::math::Transform3D<> &wTa, rw::proximity::ProximityModel::Ptr b, const rw::math::Transform3D<> &wTb, class rw::proximity::ProximityStrategyData &data)
 Calculates the distance between two proximity models $ \mathcal{a} $ and $ \mathcal{b} $. More...
 
void setBV (const BV &bv)
 Set the bounding volume. More...
 
BV getBV ()
 Get the bounding volume. More...
 
fcl::CollisionRequest & getCollisionRequest ()
 Get access to the CollisionRequest that is used with FCL collision query. More...
 
fcl::DistanceRequest & getDistanceRequest ()
 Get access to the DistanceRequest that is used with FCL distance query. More...
 
void setCollectFCLResults (bool enable)
 Specify if FCL results should be collected.
 
bool getCollectFCLResults ()
 Get whether FCL results should be collected or not.
 
std::vector< fcl::CollisionResult > & getCollisionResults ()
 Get access to the collected FCL collision results.
 
fcl::CollisionResult & getCollisionResult (std::size_t index)
 Get access to the collected FCL collision result. More...
 
fcl::DistanceResult & getDistanceResult ()
 Get access to the collected FCL distance result.
 
- Public Member Functions inherited from CollisionStrategy
virtual ~CollisionStrategy ()
 Destroys object.
 
bool inCollision (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb, QueryType type=FirstContact)
 Checks to see if two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ are in collision. More...
 
bool inCollision (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb, class ProximityStrategyData &data, QueryType type=FirstContact)
 Checks to see if two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ are in collision. More...
 
bool inCollision (ProximityModel::Ptr a, const math::Transform3D<> &wTa, ProximityModel::Ptr b, const math::Transform3D<> &wTb, ProximityStrategyData &data)
 Checks to see if two proximity models are in collision. More...
 
virtual void getCollisionContacts (std::vector< CollisionStrategy::Contact > &contacts, ProximityStrategyData &data)=0
 this method interprets the collision query result and calculates a list of contacts to represent the collision geometry between the colliding geometries. More...
 
- Public Member Functions inherited from ProximityStrategy
virtual ~ProximityStrategy ()
 Destructor.
 
virtual bool addModel (rw::common::Ptr< rw::models::Object > object)
 Adds a Proximity model of a frame to this strategy. More...
 
virtual bool addModel (const rw::kinematics::Frame *frame, const rw::geometry::Geometry &faces)
 Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy. More...
 
virtual bool addModel (const rw::kinematics::Frame *frame, rw::common::Ptr< rw::geometry::Geometry > faces, bool forceCopy=false)
 Adds a Proximity model to a frame. More...
 
virtual bool hasModel (const rw::kinematics::Frame *frame)
 Tells whether the frame has a proximity model in the strategy. More...
 
virtual void clearFrame (const rw::kinematics::Frame *frame)
 Clear (remove all) model information for frame frame.
 
virtual void clearFrames ()
 Clear (remove all) model information for all frames.
 
ProximityModel::Ptr getModel (const rw::kinematics::Frame *frame)
 get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. More...
 
- Public Member Functions inherited from DistanceStrategy
virtual ~DistanceStrategy ()
 Destroys object.
 
Result distance (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $. More...
 
Resultdistance (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb, class ProximityStrategyData &data)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $. More...
 
Resultdistance (ProximityModel::Ptr a, const math::Transform3D<> &wTa, ProximityModel::Ptr b, const math::Transform3D<> &wTb, class ProximityStrategyData &data)
 Calculates the distance between two proximity models $ \mathcal{a} $ and $ \mathcal{b} $. More...
 
Result distance (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb, double threshold)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More...
 
DistanceStrategy::Resultdistance (const kinematics::Frame *a, const math::Transform3D<> &wTa, const kinematics::Frame *b, const math::Transform3D<> &wTb, double threshold, ProximityStrategyData &data)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More...
 
DistanceStrategy::Resultdistance (ProximityModel::Ptr a, const math::Transform3D<> &wTa, ProximityModel::Ptr b, const math::Transform3D<> &wTb, double threshold, ProximityStrategyData &data)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CollisionStrategy
static CollisionStrategy::Ptr make (rw::common::Ptr< CollisionToleranceStrategy > strategy, double tolerance)
 A collision strategy constructed from a collision tolerance strategy and a resolution. More...
 
static CollisionStrategy::Ptr make (rw::common::Ptr< CollisionToleranceStrategy > strategy, const rw::kinematics::FrameMap< double > &frameToTolerance, double defaultTolerance)
 A collision strategy constructed from a collision tolerance strategy and a resolution. More...
 
- Protected Member Functions inherited from CollisionStrategy
 CollisionStrategy ()
 Creates object.
 
- Protected Member Functions inherited from ProximityStrategy
 ProximityStrategy ()
 Creates object.
 
- Protected Member Functions inherited from DistanceStrategy
virtual DistanceStrategy::ResultdoDistanceThreshold (ProximityModel::Ptr a, const math::Transform3D<> &wTa, ProximityModel::Ptr b, const math::Transform3D<> &wTb, double threshold, ProximityStrategyData &data)
 Calculates the distance between two given frames $ \mathcal{F}_a $ and $ \mathcal{F}_b $ if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More...
 
 DistanceStrategy ()
 Creates object.
 

Detailed Description

This is a strategy wrapper for the Flexible Collision Library (FCL)

For further information check out https://github.com/flexible-collision-library/fcl


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