'How drake used to collision detected?
The library which drake used to collision detected is different from the FCL(https://github.com/flexible-collision-library/fcl)? Is Drake collision detection based on FCL? Or where can I find the difference?
Can I use FCL to get the contact force between sphere and box? Or can Drake achieve it?
Thanks very much!
Solution 1:[1]
Thanks for asking.
In general, the collision detection is based partly on FCL broadphase+narrowphase and partly on Drake custom code.
The contact force also depends on the contact mode: point contact, hydroelastics, hydroelastics with fallback. See set_contact_model() and Hydroelastic Contact User Guide.
Recently we added an example that includes sphere-and-box contact at https://github.com/RobotLocomotion/drake/tree/master/examples/hydroelastic/ball_plate
By default, it uses hydroelastic contact. You can use the option --contact_model=point to use point contact. In that case, I believe it will use FCL to calculate penetration between the sphere and the box. By default, the example uses hydroelastic contact, which doesn't use FCL for narrowphase collision detection but still use FCL for broadphase detection as Russ said.
I'm not sure that I answer your questions. If you could be specific to which function in this list of query functions (ComputePointPairPenetration, ComputeSignedDistancePairwiseClosestPoints, HasCollisions, etc.) or you could provide a small example, I can give more details what's happening under the hood.
Solution 2:[2]
Drake provides compete support for collision detection / contact-force computation. It currently does use FCL for one piece of that computation (broad-phase detection).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Damrong Guoy TRI |
| Solution 2 | Russ Tedrake |
