tesseract-robotics / tesseract

Motion Planning Environment
http://tesseract-docs.rtfd.io
Other
278 stars 88 forks source link

CompoundMesh does not work with FCL #1053

Open rjoomen opened 1 month ago

rjoomen commented 1 month ago

CompoundMesh does not work with the FCL collision checker. I suppose it is because for Bullet, one CompoundMesh is added as one compound object, whereas for FCL, one CompoundMesh is added a multiple objects.

I've taken a look, it seems FCL does not support compound objects, apart from BHVModel, which only supports meshes or pointclouds as submodels.

And for reference, neither does HPP-FCL: #340, #448.

Levi-Armstrong commented 1 month ago

Are you saying there is a bug? The concept of CompoundMesh has always existed just handled differently now. Previously every sub mesh was converted directly to a Geometry object but now all sub meshes are stored in the new CompoundMesh. Then the collision checker handle this new type and processes all of the sub meshes. The only difference now is the CompoundMesh is captured at the highest level.

Levi-Armstrong commented 1 month ago

Here is the code which process the CompoundMesh.

rjoomen commented 1 month ago

I checked the code indeed. There is a bug, I tested adding some meshes separately (within a link) or as a CompoundMesh, and for Bullet this works for both, but for FCL the CompoundMesh version crashes. And with my HPP-FCL version (mostly similar to the FCL version) it is the same. I did not check in detail what went wrong, but CompoundMesh is the cause.

Levi-Armstrong commented 1 month ago

I thought this was covered by a unit test but I will look into it.

Levi-Armstrong commented 4 weeks ago

There is a unit test which does confirm this is working but may not be testing everything. Do you have a backtrace or could you add a unit test which triggers the failure?

rjoomen commented 4 weeks ago

I'll take a look tomorrow. I'm not really using FCL, so I just found this by accident.