Public Member Functions | Public Attributes | Private Attributes | List of all members
tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector Class Reference

This is a modifed Convex to Convex collision algorithm. More...

#include <tesseract_gjk_pair_detector.h>

Inheritance diagram for tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector:
Inheritance graph
[legend]

Public Member Functions

const btVector3 & getCachedSeparatingAxis () const
 
btScalar getCachedSeparatingDistance () const
 
void getClosestPoints (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false) override
 
void getClosestPointsNonVirtual (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw)
 
void setCachedSeparatingAxis (const btVector3 &separatingAxis)
 
void setIgnoreMargin (bool ignoreMargin)
 don't use setIgnoreMargin, it's for Bullet's internal use More...
 
void setMinkowskiA (const btConvexShape *minkA)
 
void setMinkowskiB (const btConvexShape *minkB)
 
void setPenetrationDepthSolver (btConvexPenetrationDepthSolver *penetrationDepthSolver)
 
 TesseractGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver, const ContactTestData *cdata)
 
 TesseractGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, int shapeTypeA, int shapeTypeB, btScalar marginA, btScalar marginB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver, const ContactTestData *cdata)
 

Public Attributes

int m_catchDegeneracies
 
int m_curIter { 0 }
 
int m_degenerateSimplex { 0 }
 
int m_fixContactNormalDirection
 
int m_lastUsedMethod
 

Private Attributes

btVector3 m_cachedSeparatingAxis
 
btScalar m_cachedSeparatingDistance { 0 }
 
const ContactTestDatam_cdata
 
bool m_ignoreMargin
 
btScalar m_marginA
 
btScalar m_marginB
 
const btConvexShape * m_minkowskiA
 
const btConvexShape * m_minkowskiB
 
btConvexPenetrationDepthSolver * m_penetrationDepthSolver
 
int m_shapeTypeA
 
int m_shapeTypeB
 
btSimplexSolverInterface * m_simplexSolver
 

Detailed Description

This is a modifed Convex to Convex collision algorithm.

This was modified to leverage the Tesseract contact request to enable and disable different parts of the algorithm. The algorithm first does a quick binary check if the two objects are in collision. If in collision it runs the penetration algorithm to get the nearest points and penetration depths. If not in collision it runs the an algorithm to get the nearest points and distance. The Tesseract contact request allow you to now decide if you need all three. Example, in the case of OMPL if you have a contact distance of zero you can get a performance increase, by disabling the penetration and distance calculation because they add no value.

Note: This will not be able to be removed.

Definition at line 50 of file tesseract_gjk_pair_detector.h.

Constructor & Destructor Documentation

◆ TesseractGjkPairDetector() [1/2]

tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::TesseractGjkPairDetector ( const btConvexShape *  objectA,
const btConvexShape *  objectB,
btSimplexSolverInterface *  simplexSolver,
btConvexPenetrationDepthSolver *  penetrationDepthSolver,
const ContactTestData cdata 
)

Definition at line 46 of file tesseract_gjk_pair_detector.cpp.

◆ TesseractGjkPairDetector() [2/2]

tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::TesseractGjkPairDetector ( const btConvexShape *  objectA,
const btConvexShape *  objectB,
int  shapeTypeA,
int  shapeTypeB,
btScalar  marginA,
btScalar  marginB,
btSimplexSolverInterface *  simplexSolver,
btConvexPenetrationDepthSolver *  penetrationDepthSolver,
const ContactTestData cdata 
)

Definition at line 67 of file tesseract_gjk_pair_detector.cpp.

Member Function Documentation

◆ getCachedSeparatingAxis()

const btVector3& tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::getCachedSeparatingAxis ( ) const
inline

Definition at line 103 of file tesseract_gjk_pair_detector.h.

◆ getCachedSeparatingDistance()

btScalar tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::getCachedSeparatingDistance ( ) const
inline

Definition at line 104 of file tesseract_gjk_pair_detector.h.

◆ getClosestPoints()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::getClosestPoints ( const ClosestPointInput &  input,
Result &  output,
class btIDebugDraw *  debugDraw,
bool  swapResults = false 
)
override

Definition at line 93 of file tesseract_gjk_pair_detector.cpp.

◆ getClosestPointsNonVirtual()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::getClosestPointsNonVirtual ( const ClosestPointInput &  input,
Result &  output,
class btIDebugDraw *  debugDraw 
)

this is another degenerate case, where the initial GJK calculation reports a degenerate case EPA reports no penetration, and the second GJK (using the supporting vector without margin) reports a valid positive distance. Use the results of the second GJK instead of failing. thanks to Jacob.Langford for the reproduction case http://code.google.com/p/bullet/issues/detail?id=250

todo: need to track down this EPA penetration solver degeneracy the penetration solver reports penetration but the contact normal connecting the contact points is pointing in the opposite direction until then, detect the issue and revert the normal

Definition at line 669 of file tesseract_gjk_pair_detector.cpp.

◆ setCachedSeparatingAxis()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::setCachedSeparatingAxis ( const btVector3 &  separatingAxis)
inline

Definition at line 101 of file tesseract_gjk_pair_detector.h.

◆ setIgnoreMargin()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::setIgnoreMargin ( bool  ignoreMargin)
inline

don't use setIgnoreMargin, it's for Bullet's internal use

Definition at line 112 of file tesseract_gjk_pair_detector.h.

◆ setMinkowskiA()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::setMinkowskiA ( const btConvexShape *  minkA)
inline

Definition at line 98 of file tesseract_gjk_pair_detector.h.

◆ setMinkowskiB()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::setMinkowskiB ( const btConvexShape *  minkB)
inline

Definition at line 100 of file tesseract_gjk_pair_detector.h.

◆ setPenetrationDepthSolver()

void tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::setPenetrationDepthSolver ( btConvexPenetrationDepthSolver *  penetrationDepthSolver)
inline

Definition at line 106 of file tesseract_gjk_pair_detector.h.

Member Data Documentation

◆ m_cachedSeparatingAxis

btVector3 tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_cachedSeparatingAxis
private

Definition at line 52 of file tesseract_gjk_pair_detector.h.

◆ m_cachedSeparatingDistance

btScalar tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_cachedSeparatingDistance { 0 }
private

Definition at line 63 of file tesseract_gjk_pair_detector.h.

◆ m_catchDegeneracies

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_catchDegeneracies

Definition at line 72 of file tesseract_gjk_pair_detector.h.

◆ m_cdata

const ContactTestData* tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_cdata
private

Definition at line 65 of file tesseract_gjk_pair_detector.h.

◆ m_curIter

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_curIter { 0 }

Definition at line 70 of file tesseract_gjk_pair_detector.h.

◆ m_degenerateSimplex

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_degenerateSimplex { 0 }

Definition at line 71 of file tesseract_gjk_pair_detector.h.

◆ m_fixContactNormalDirection

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_fixContactNormalDirection

Definition at line 73 of file tesseract_gjk_pair_detector.h.

◆ m_ignoreMargin

bool tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_ignoreMargin
private

Definition at line 62 of file tesseract_gjk_pair_detector.h.

◆ m_lastUsedMethod

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_lastUsedMethod

Definition at line 69 of file tesseract_gjk_pair_detector.h.

◆ m_marginA

btScalar tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_marginA
private

Definition at line 59 of file tesseract_gjk_pair_detector.h.

◆ m_marginB

btScalar tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_marginB
private

Definition at line 60 of file tesseract_gjk_pair_detector.h.

◆ m_minkowskiA

const btConvexShape* tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_minkowskiA
private

Definition at line 55 of file tesseract_gjk_pair_detector.h.

◆ m_minkowskiB

const btConvexShape* tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_minkowskiB
private

Definition at line 56 of file tesseract_gjk_pair_detector.h.

◆ m_penetrationDepthSolver

btConvexPenetrationDepthSolver* tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_penetrationDepthSolver
private

Definition at line 53 of file tesseract_gjk_pair_detector.h.

◆ m_shapeTypeA

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_shapeTypeA
private

Definition at line 57 of file tesseract_gjk_pair_detector.h.

◆ m_shapeTypeB

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_shapeTypeB
private

Definition at line 58 of file tesseract_gjk_pair_detector.h.

◆ m_simplexSolver

btSimplexSolverInterface* tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_simplexSolver
private

Definition at line 54 of file tesseract_gjk_pair_detector.h.


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


tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:53