Simox  2.3.74.0
VirtualRobot::CollisionCheckerPQP Class Reference
Inheritance diagram for VirtualRobot::CollisionCheckerPQP:
VirtualRobot::CollisionCheckerImplementation

Public Member Functions

 CollisionCheckerPQP ()
 
 ~CollisionCheckerPQP () override
 
float calculateDistance (const CollisionModelPtr &model1, const CollisionModelPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) final
 
bool checkCollision (const CollisionModelPtr &model1, const CollisionModelPtr &model2) final
 
bool checkCollision (const CollisionModelPtr &model1, const Eigen::Vector3f &point, float tolerance=0.0f) final
 
MultiCollisionResult checkMultipleCollisions (CollisionModelPtr const &model1, CollisionModelPtr const &model2)
 
float getMinDistance (std::shared_ptr< PQP::PQP_Model > m1, std::shared_ptr< PQP::PQP_Model > m2, const Eigen::Matrix4f &mat1, const Eigen::Matrix4f &mat2)
 
float getMinDistance (std::shared_ptr< PQP::PQP_Model > m1, std::shared_ptr< PQP::PQP_Model > m2, const Eigen::Matrix4f &mat1, const Eigen::Matrix4f &mat2, Eigen::Vector3f &storeP1, Eigen::Vector3f &storeP2, int *storeID1, int *storeID2)
 
void GetPQPDistance (const std::shared_ptr< PQP::PQP_Model > &model1, const std::shared_ptr< PQP::PQP_Model > &model2, const Eigen::Matrix4f &matrix1, const Eigen::Matrix4f &matrix2, PQP::PQP_DistanceResult &pqpResult)
 
- Public Member Functions inherited from VirtualRobot::CollisionCheckerImplementation
 CollisionCheckerImplementation ()
 
virtual ~CollisionCheckerImplementation ()
 
virtual void setAutomaticSizeCheck (bool checkSizeOnColModelCreation)
 
virtual void enableDebugOutput (bool e)
 

Static Public Member Functions

static bool IsSupported_CollisionDetection ()
 
static bool IsSupported_ContinuousCollisionDetection ()
 
static bool IsSupported_DistanceCalculations ()
 
static bool IsSupported_Multithreading_Threadsafe ()
 
static bool IsSupported_Multithreading_MultipleColCheckers ()
 

Protected Attributes

PQP::PQP_Checker * pqpChecker
 
std::unique_ptr< PQP::PQP_Model > pointModel
 
- Protected Attributes inherited from VirtualRobot::CollisionCheckerImplementation
bool automaticSizeCheck
 

Friends

class CollisionChecker
 

Additional Inherited Members

- Data Fields inherited from VirtualRobot::CollisionCheckerImplementation
bool debugOutput
 

Detailed Description

This implementation encapsulates the PQP collision checker.

Constructor & Destructor Documentation

◆ CollisionCheckerPQP()

VirtualRobot::CollisionCheckerPQP::CollisionCheckerPQP ( )

◆ ~CollisionCheckerPQP()

VirtualRobot::CollisionCheckerPQP::~CollisionCheckerPQP ( )
override

Member Function Documentation

◆ calculateDistance()

float VirtualRobot::CollisionCheckerPQP::calculateDistance ( const CollisionModelPtr model1,
const CollisionModelPtr model2,
Eigen::Vector3f &  P1,
Eigen::Vector3f &  P2,
int *  trID1 = NULL,
int *  trID2 = NULL 
)
finalvirtual

◆ checkCollision() [1/2]

bool VirtualRobot::CollisionCheckerPQP::checkCollision ( const CollisionModelPtr model1,
const CollisionModelPtr model2 
)
finalvirtual

◆ checkCollision() [2/2]

bool VirtualRobot::CollisionCheckerPQP::checkCollision ( const CollisionModelPtr model1,
const Eigen::Vector3f &  point,
float  tolerance = 0.0f 
)
finalvirtual

◆ checkMultipleCollisions()

MultiCollisionResult VirtualRobot::CollisionCheckerPQP::checkMultipleCollisions ( CollisionModelPtr const &  model1,
CollisionModelPtr const &  model2 
)

◆ getMinDistance() [1/2]

float VirtualRobot::CollisionCheckerPQP::getMinDistance ( std::shared_ptr< PQP::PQP_Model >  m1,
std::shared_ptr< PQP::PQP_Model >  m2,
const Eigen::Matrix4f &  mat1,
const Eigen::Matrix4f &  mat2 
)

If continuous collision detection (CCD) is supported, this method can be used to detect collisions on the path from the current pose of the collision models to the goal poses. true -> collision (then the time of contact [0..1] is stored to fStoreTOC)

◆ getMinDistance() [2/2]

float VirtualRobot::CollisionCheckerPQP::getMinDistance ( std::shared_ptr< PQP::PQP_Model >  m1,
std::shared_ptr< PQP::PQP_Model >  m2,
const Eigen::Matrix4f &  mat1,
const Eigen::Matrix4f &  mat2,
Eigen::Vector3f &  storeP1,
Eigen::Vector3f &  storeP2,
int *  storeID1,
int *  storeID2 
)

◆ GetPQPDistance()

void VirtualRobot::CollisionCheckerPQP::GetPQPDistance ( const std::shared_ptr< PQP::PQP_Model > &  model1,
const std::shared_ptr< PQP::PQP_Model > &  model2,
const Eigen::Matrix4f &  matrix1,
const Eigen::Matrix4f &  matrix2,
PQP::PQP_DistanceResult &  pqpResult 
)

◆ IsSupported_CollisionDetection()

static bool VirtualRobot::CollisionCheckerPQP::IsSupported_CollisionDetection ( )
inlinestatic

Does the underlying collision detection library support discrete collision detection.

◆ IsSupported_ContinuousCollisionDetection()

static bool VirtualRobot::CollisionCheckerPQP::IsSupported_ContinuousCollisionDetection ( )
inlinestatic

Does the underlying collision detection library support continuous collision detection.

◆ IsSupported_DistanceCalculations()

static bool VirtualRobot::CollisionCheckerPQP::IsSupported_DistanceCalculations ( )
inlinestatic

Does the underlying collision detection library support distance calculations.

◆ IsSupported_Multithreading_MultipleColCheckers()

static bool VirtualRobot::CollisionCheckerPQP::IsSupported_Multithreading_MultipleColCheckers ( )
inlinestatic

Does the underlying collision detection library support multiple instances of the collision checker. E.g. one per thread.

◆ IsSupported_Multithreading_Threadsafe()

static bool VirtualRobot::CollisionCheckerPQP::IsSupported_Multithreading_Threadsafe ( )
inlinestatic

Does the underlying collision detection library support threadsafe access. E.g. multiple threads query the collision checker asynchronously.

Friends And Related Function Documentation

◆ CollisionChecker

friend class CollisionChecker
friend

Field Documentation

◆ pointModel

std::unique_ptr<PQP::PQP_Model> VirtualRobot::CollisionCheckerPQP::pointModel
protected

◆ pqpChecker

PQP::PQP_Checker* VirtualRobot::CollisionCheckerPQP::pqpChecker
protected