Simox
2.3.74.0
|
Public Member Functions | |
CollisionChecker () | |
virtual | ~CollisionChecker () |
virtual float | calculateDistance (const SceneObjectSetPtr &model1, const SceneObjectSetPtr &model2) |
virtual float | calculateDistance (const CollisionModelPtr &model1, const SceneObjectSetPtr &model2) |
virtual float | calculateDistance (const CollisionModelPtr &model1, const CollisionModelPtr &model2) |
virtual float | calculateDistance (const SceneObjectSetPtr &model1, const SceneObjectSetPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) |
virtual float | calculateDistance (const CollisionModelPtr &model1, const SceneObjectSetPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) |
virtual float | calculateDistance (const CollisionModelPtr &model1, const CollisionModelPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) |
virtual bool | checkCollision (const SceneObjectSetPtr &model1, const SceneObjectSetPtr &model2) |
virtual bool | checkCollision (const std::vector< CollisionModelPtr > &model1, const CollisionModelPtr &model2) |
virtual bool | checkCollision (const CollisionModelPtr &model1, const SceneObjectSetPtr &model2) |
virtual bool | checkCollision (const CollisionModelPtr &model1, const CollisionModelPtr &model2) |
virtual void | getContacts (const MathTools::Plane &p, const CollisionModelPtr &colModel, std::vector< MathTools::ContactPoint > &storeContatcs, float maxDist=1.0f) |
MultiCollisionResult | checkMultipleCollisions (CollisionModelPtr const &model1, CollisionModelPtr const &model2) |
bool | isInitialized () |
void | setAutomaticSizeCheck (bool checkSizeOnColModelCreation) |
void | enableDebugOutput (bool e) |
virtual float | calculateDistance (const SceneObjectPtr &model1, const SceneObjectSetPtr &model2) |
virtual float | calculateDistance (const SceneObjectPtr &model1, const SceneObjectPtr &model2) |
virtual float | calculateDistance (const SceneObjectPtr &model1, const SceneObjectSetPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) |
virtual float | calculateDistance (const SceneObjectPtr &model1, const SceneObjectPtr &model2, Eigen::Vector3f &P1, Eigen::Vector3f &P2, int *trID1=NULL, int *trID2=NULL) |
virtual bool | checkCollision (const SceneObjectPtr &model1, const SceneObjectSetPtr &model2) |
virtual bool | checkCollision (const SceneObjectPtr &model1, const SceneObjectPtr &model2) |
virtual bool | checkCollision (const CollisionModelPtr &model, const Eigen::Vector3f &point, float tolerance) |
checks collision between a sphere (modeled by point + tolerance). The check only performs a collision check of triangles, not if the sphere is inside the given model! More... | |
virtual bool | checkCollision (const SceneObjectSetPtr &modelSet, const Eigen::Vector3f &point, float tolerance) |
std::shared_ptr< CollisionCheckerPQP > | getCollisionCheckerImplementation () |
Static Public Member Functions | |
static CollisionCheckerPtr | getGlobalCollisionChecker () |
This is the global collision checker singleton. More... | |
static bool | IsSupported_CollisionDetection () |
static bool | IsSupported_ContinuousCollisionDetection () |
static bool | IsSupported_DistanceCalculations () |
static bool | IsSupported_Multithreading_Threadsafe () |
static bool | IsSupported_Multithreading_MultipleColCheckers () |
Data Fields | |
bool | debugOutput |
Protected Member Functions | |
SceneObjectSetPtr | getRobotModels (const RobotPtr &r) |
Friends | |
class | Cleanup |
A CollisionChecker is an instance that handles collision and distance queries. Internally the requests are passed to the underlying engine (e.g. the PQP library). All objects that should be considered for collision detection (called CollisionModels) must be registered here. Usually the objects take care of registering on their own.
When collision detection should not be performed in parallel, the global CollisionChecker singleton can be used. It can be retrieved with CollisionChecker::getGlobalCollisionChecker().
VirtualRobot::CollisionChecker::CollisionChecker | ( | ) |
|
virtualdefault |
|
virtual |
Returns distance of the collision models. Returns -1.0 if no distance calculation lib was specified (-> Dummy Col Checker)
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Convenient methods
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
Test if the two models are colliding. Returns true on collision.
|
virtual |
checks collision between a sphere (modeled by point + tolerance). The check only performs a collision check of triangles, not if the sphere is inside the given model!
model | |
point | |
tolerance |
|
virtual |
MultiCollisionResult VirtualRobot::CollisionChecker::checkMultipleCollisions | ( | CollisionModelPtr const & | model1, |
CollisionModelPtr const & | model2 | ||
) |
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)
|
inline |
|
inline |
|
virtual |
Store all vertices of colModel whose distance to p is smaller than maxDist.
|
static |
This is the global collision checker singleton.
|
protected |
|
inline |
|
static |
Does the underlying collision detection library support discrete collision detection.
|
static |
Does the underlying collision detection library support continuous collision detection.
|
static |
Does the underlying collision detection library support distance calculations.
|
static |
Does the underlying collision detection library support multiple instances of the collision checker. E.g. one per thread.
|
static |
Does the underlying collision detection library support threadsafe access. E.g. multiple threads query the collision checker asynchronously.
void VirtualRobot::CollisionChecker::setAutomaticSizeCheck | ( | bool | checkSizeOnColModelCreation | ) |
Activates / Deactivates the automatic size check on col model creation. The size check can be useful when the UNITS definitions in inventor files result in different scalings of the 3D models. (Standard: true)
|
friend |
bool VirtualRobot::CollisionChecker::debugOutput |