Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
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]
Collaboration diagram for tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector:
Collaboration graph
[legend]

Public Member Functions

 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)
 
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 setMinkowskiA (const btConvexShape *minkA)
 
void setMinkowskiB (const btConvexShape *minkB)
 
void setCachedSeparatingAxis (const btVector3 &separatingAxis)
 
const btVector3 & getCachedSeparatingAxis () const
 
btScalar getCachedSeparatingDistance () const
 
void setPenetrationDepthSolver (btConvexPenetrationDepthSolver *penetrationDepthSolver)
 
void setIgnoreMargin (bool ignoreMargin)
 don't use setIgnoreMargin, it's for Bullet's internal use More...
 

Public Attributes

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

Private Attributes

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

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.

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 
)

◆ 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 
)

Member Function Documentation

◆ getCachedSeparatingAxis()

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

◆ getCachedSeparatingDistance()

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

◆ getClosestPoints()

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

◆ 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

◆ setCachedSeparatingAxis()

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

◆ setIgnoreMargin()

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

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

◆ setMinkowskiA()

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

◆ setMinkowskiB()

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

◆ setPenetrationDepthSolver()

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

Member Data Documentation

◆ m_cachedSeparatingAxis

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

◆ m_cachedSeparatingDistance

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

◆ m_catchDegeneracies

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_catchDegeneracies

◆ m_cdata

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

◆ m_curIter

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

◆ m_degenerateSimplex

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

◆ m_fixContactNormalDirection

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_fixContactNormalDirection

◆ m_ignoreMargin

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

◆ m_lastUsedMethod

int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_lastUsedMethod

◆ m_marginA

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

◆ m_marginB

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

◆ m_minkowskiA

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

◆ m_minkowskiB

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

◆ m_penetrationDepthSolver

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

◆ m_shapeTypeA

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

◆ m_shapeTypeB

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

◆ m_simplexSolver

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

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