This is a modifed Convex to Convex collision algorithm. More...
#include <tesseract_gjk_pair_detector.h>
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 ContactTestData * | m_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 |
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.
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.
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.
|
inline |
Definition at line 103 of file tesseract_gjk_pair_detector.h.
|
inline |
Definition at line 104 of file tesseract_gjk_pair_detector.h.
|
override |
Definition at line 93 of file tesseract_gjk_pair_detector.cpp.
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.
|
inline |
Definition at line 101 of file tesseract_gjk_pair_detector.h.
|
inline |
don't use setIgnoreMargin, it's for Bullet's internal use
Definition at line 112 of file tesseract_gjk_pair_detector.h.
|
inline |
Definition at line 98 of file tesseract_gjk_pair_detector.h.
|
inline |
Definition at line 100 of file tesseract_gjk_pair_detector.h.
|
inline |
Definition at line 106 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 52 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 63 of file tesseract_gjk_pair_detector.h.
int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_catchDegeneracies |
Definition at line 72 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 65 of file tesseract_gjk_pair_detector.h.
int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_curIter { 0 } |
Definition at line 70 of file tesseract_gjk_pair_detector.h.
int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_degenerateSimplex { 0 } |
Definition at line 71 of file tesseract_gjk_pair_detector.h.
int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_fixContactNormalDirection |
Definition at line 73 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 62 of file tesseract_gjk_pair_detector.h.
int tesseract_collision::tesseract_collision_bullet::TesseractGjkPairDetector::m_lastUsedMethod |
Definition at line 69 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 59 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 60 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 55 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 56 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 53 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 57 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 58 of file tesseract_gjk_pair_detector.h.
|
private |
Definition at line 54 of file tesseract_gjk_pair_detector.h.