This plugin contains the Bullet collision pipeline itself named BulletCollisionDetection, where broad phase and narrow phase are performed. So in the Sofa scene, you must place the element BulletCollisionDetection instead of any broad or narrow phase. An important thing to know is that this plugin works well with constraints (LMConstraintSolver for example) and no with penality contacts because it is not robust to collision models penetration. But some improvement has been done with the collision model margin to allow this for most of the primitives (if the primitives don't penetrate).
It also contains the element BulletIntersection which must replace any kind of Sofa intersection method. So it has also to be placed in the Sofa scene.
It contains models already existing in Sofa and inheriting from them:
There are also a collision model that doesn't derive from any of the Sofa collision models:
Note that BulletConvexHullModel is special because its parameterization can completely change its behaviour:
All collision models have the field called margin. It enlarges the primitives (only in bullet, not in sofa) using the value of margin.
For a box, its extents are enlarged, for a sphere or a capsule, their radius are enlarged. Only the BulletConvexHullModel and the BulletTriangleModel use a real margin, meaning that the primitives are not enlarged, and the collision closer than the value margin are detected.
You can find some examples in the folder examples:
This plugin depends on Bullet 2.82, with the following peculiarities:
If you choose to install Bullet in a non-standard location, then in order to build this plugin you should either add the installation prefix of Bullet to CMAKE_PREFIX_PATH or set Bullet_DIR to the directory containing BulletConfig.cmake (<prefix>/lib/cmake/bullet).
For reference, the following snippet downloads Bullet 2.82, compiles it with the appropriate options, and installs it in ~/bullet. One would then pass "-DBullet_DIR=~/bullet/lib/cmake/bullet" as an argument to cmake to compile this plugin: