Headers and definitions of the interface with the collision detection engine.
- See Also
- cd.c
Definition in file cd.h.
|
void | InitCD (unsigned int engine, boolean parallel, Tmechanism *m, Tenvironment *e, boolean **checkCollisionsLL, boolean **checkCollisionsLO, TworldCD *cd) |
| Initializes the collision detector. More...
|
|
boolean | LinkCanCollide (unsigned int l, unsigned int nl, unsigned int no, boolean **checkCollisionsLL, boolean **checkCollisionsLO) |
| Identifies links than can collide. More...
|
|
boolean | ObstacleCanCollide (unsigned int o, unsigned int nl, boolean **checkCollisionsLO) |
| Identifies obstacles than can collide. More...
|
|
unsigned int | GetCDEngine (TworldCD *cd) |
| Determines the collision engine. More...
|
|
boolean | CheckCollision (boolean all, THTransform *tl, THTransform *tlPrev, TworldCD *cd) |
| Determines if there is a collision. More...
|
|
void | StoreCollisionInfo (FILE *f, char *fname, unsigned int objectID, Tmechanism *m, TworldCD *cd) |
| Stores the information collected during last collision check into a file. More...
|
|
void | PrintCollisionInfo (THTransform *tl, Tmechanism *m, TworldCD *cd) |
| Prints some information collected during last collision check. More...
|
|
void | DeleteCD (TworldCD *cd) |
| Collision information destructor. More...
|
|
Initializes the collision detector.
- Parameters
-
engine | The engine to use |
parallel | TRUE if we are in a contex of parallel execution, where different collision queries can be executed in parallel. |
m | The machanism. |
e | The enviroment. |
checkCollisionsLL | Link-link collision to be checked. |
checkCollisionsLO | Link-obstacle collision to be checked. |
cd | The collision information to define. |
Definition at line 2126 of file cd.c.
References BULLET, TworldCD::bullet, C_BULLET, C_FCL, TworldCD::engine, Error(), FCL, TworldCD::fcl, InitPQPCD(), InitSolidCD(), InitVcollideCD(), NEW, NOCD, PQP, TworldCD::pqp, RIGIDCLL, TworldCD::rigidCLL, SOLID, TworldCD::solid, VCOLLIDE, and TworldCD::vcollide.
Referenced by InitWorldCD().
boolean LinkCanCollide |
( |
unsigned int |
l, |
|
|
unsigned int |
nl, |
|
|
unsigned int |
no, |
|
|
boolean ** |
checkCollisionsLL, |
|
|
boolean ** |
checkCollisionsLO |
|
) |
| |
Identifies links that can collide either with other links or with obstacles.
- Parameters
-
l | The identifier of the link to check. |
nl | Number of links. |
no | Number of obstacles. |
checkCollisionsLL | Allowed collisions between links. |
checkCollisionsLO | Allowed collisions between links and obstacles. |
- Returns
- TRUE if the link collision is activated with respect to any other link or obstacle.
Definition at line 2209 of file cd.c.
References FALSE.
Referenced by AnyCollision(), InitPQPCD(), InitSolidCD(), and InitVcollideCD().
boolean ObstacleCanCollide |
( |
unsigned int |
o, |
|
|
unsigned int |
nl, |
|
|
boolean ** |
checkCollisionsLO |
|
) |
| |
Identifies obstacles that can collide a given link..
- Parameters
-
o | The identifier of the obstacle to check. |
nl | Number of obstacles. |
checkCollisionsLO | Allowed collisions between links and obstacles. |
- Returns
- TRUE if the obstacle collision is activated with respect to any link.
Definition at line 2231 of file cd.c.
References FALSE.
Referenced by InitPQPCD(), InitSolidCD(), and InitVcollideCD().
unsigned int GetCDEngine |
( |
TworldCD * |
cd | ) |
|
Determines if there is a collision.
- Parameters
-
all | TRUE if we want to detect all the collision. FALSE just to detect the first one. Right now this flag is only honored when using the Solid or the FCL collision libraries. The rest only detect the first collision and stop irrespectively of the value of this paramater. |
tl | The transforms to apply to the links. |
tlPrev | The transforms to apply to the links in the previous configuration. Only used for the continuous collision checker (C_FCL). The rest of collision detection libraries are discrete and ignore this parameter. |
cd | The collision information to use in the check. |
- Returns
- TRUE if there is a collision.
Definition at line 2251 of file cd.c.
References BULLET, TworldCD::bullet, C_BULLET, C_FCL, CheckCollisionPQP(), CheckCollisionSolid(), CheckCollisionVcollide(), TworldCD::engine, Error(), FALSE, FCL, TworldCD::fcl, NOCD, PQP, TworldCD::pqp, RIGIDCLL, TworldCD::rigidCLL, SOLID, TworldCD::solid, VCOLLIDE, and TworldCD::vcollide.
Referenced by MoveAndCheckCDFromTransforms().
void StoreCollisionInfo |
( |
FILE * |
f, |
|
|
char * |
fname, |
|
|
unsigned int |
objectID, |
|
|
Tmechanism * |
m, |
|
|
TworldCD * |
cd |
|
) |
| |
Stores information collected during last collision check into a file. This is only used from the cuikmove application, when using the "save" option. The information to be stored is collected during the collision detection and latter compleated in a call to PrintCollisionInfo. In other words, this function can only be used after detecting a collision and after calling PrintCollisionInfo. The cuikmove alrady coordinates these steps: it first uses MoveWorldDOF and if the user press the "Save" button, it then calls this function.
Up to now this only works for the SOLID collision engine.
See StoreCollisionInfoInt for more deatils.
- Parameters
-
f | File where to write the collision script. |
fname | File from where we obtained the world information. The last part of the filename (from the last '_' to the end) is assumed to be the name of the object. This name is the one used to call the sub-matlab scripts giving contact points and normals on the object. |
objectID | Identifier of the object being manipulated. This is assumed to be a link. Use NO_UINT to print all the information without any filtering. |
m | The mechanism description. |
cd | The collision information. |
Definition at line 2334 of file cd.c.
References BULLET, TworldCD::bullet, TsolidCD::collision, TworldCD::engine, Error(), FCL, TworldCD::fcl, TsolidCD::nc, SOLID, TworldCD::solid, and StoreCollisionInfoInt().
Referenced by PrintWorldCollisionInfo().
Prints some information collected during last collision check.
Up to now this only works for the SOLID collision engine.
This is used when obtain contact information while interactively moving the robots.
- Parameters
-
tl | The transforms positioning the links. |
m | The mechanism description. |
cd | The collision information. |
Definition at line 2362 of file cd.c.
References BULLET, TworldCD::bullet, TsolidCD::collision, TworldCD::engine, Error(), FCL, TworldCD::fcl, TsolidCD::nc, PrintCollisionInfoInt(), SOLID, and TworldCD::solid.
Referenced by MoveWorldDOF().
Releases the structures used for collision detection.
- Parameters
-
cd | The collision detection information to be released. |
Definition at line 2391 of file cd.c.
References BULLET, TworldCD::bullet, C_BULLET, C_FCL, DeletePQPCD(), DeleteSolidCD(), DeleteVcollideCD(), TworldCD::engine, Error(), FCL, TworldCD::fcl, NOCD, PQP, TworldCD::pqp, RIGIDCLL, TworldCD::rigidCLL, SOLID, TworldCD::solid, VCOLLIDE, and TworldCD::vcollide.
Referenced by DeleteWorldCD(), and InitWorldCD().
|
Follow us!