You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using FCL to perform collision detection on non-convex shapes, which I have broken down into several convex meshes. I then group together these convex meshes into fcl::BVHModel<fcl::OBBRSSd> models to create rigid bodies, and perform the collision checks using the fcl::DynamicAABBTreeCollisionManagerd broadphase collision manager (these are the settings which I have found to have the highest speed).
I recently noticed while rereading the documentation that fcl supports a fcl::Convex<> primative type. Presumably, this would use a better support function at the narrowphase level, and give a pretty significant speed boost compared to assuming the meshes may be non-convex. However, I cannot seem to find a way to add a convex mesh file into any broadphase collision managers?
Basically, my current code looks something like this:
using Model = fcl::BVHModel<fcl::OBBRSSd>;
// Creation of the collision objects:
for (int i = 0 ; i < number_of_rigid_bodies ; ++i) {
auto rigid_body = std::make_shared<Model>();
rigid_body->beginModel();
for (for const auto& mesh_file : mesh_files) {
// Load in the object_geometry geometry:
rigid_body->addSubModel(mesh_file.vertices, mesh_file.triangles);
}
rigid_body->endModel();
// Use the meshes above to create a new collision object
rigid_bodies[i] = new fcl::CollisionObjectd(rigid_body, Eigen::Matrix4d::Identity());
// Compute the axis-aligned bounding box of the new object as a whole:
rigid_bodies.back()->computeAABB();
}
And I would like to tell fcl to treat the lowest level meshes as convex, so changing this line:
With the current implementation of fcl, I don't think you are able to do:
And I would like to tell fcl to treat the lowest level meshes as convex, so changing this line:
The way I would do it is to create a bunch of fcl::CollisionObject<> using fcl::Convex<> as the collision geometry, and add these collision objects into a broadphase collision manager (e.g. fcl::DynamicAABBTreeCollisionManager<>).
I'm currently using FCL to perform collision detection on non-convex shapes, which I have broken down into several convex meshes. I then group together these convex meshes into
fcl::BVHModel<fcl::OBBRSSd>
models to create rigid bodies, and perform the collision checks using thefcl::DynamicAABBTreeCollisionManagerd
broadphase collision manager (these are the settings which I have found to have the highest speed).I recently noticed while rereading the documentation that fcl supports a
fcl::Convex<>
primative type. Presumably, this would use a better support function at the narrowphase level, and give a pretty significant speed boost compared to assuming the meshes may be non-convex. However, I cannot seem to find a way to add a convex mesh file into any broadphase collision managers?Basically, my current code looks something like this:
And I would like to tell
fcl
to treat the lowest level meshes as convex, so changing this line:to something like this:
Thanks!
The text was updated successfully, but these errors were encountered: