SarahWeiii / CoACD

[SIGGRAPH2022] Approximate Convex Decomposition for 3D Meshes with Collision-Aware Concavity and Tree Search
https://colin97.github.io/CoACD/
MIT License
483 stars 64 forks source link

Can't apply convex decomposition to a hollow cylinder (STL file) in Python? #53

Open kurtenkera opened 4 months ago

kurtenkera commented 4 months ago

Hi,

I am trying to use the example script python/package/bin/coacd on an STL file of a hollow cylinder (attached: hollowcyl.zip).

image

I want to decompose this cylinder into a union of convex objects so I can accurately simulate collision detection in MuJoCo. The picture above shows the hollow cylinder in a MuJoCo simulation. The video below shows that a small sphere is unable to fall through the hollow cylinder as its convex hull doesn't allow this.

Screencast from 02-08-24 11:50:29.webm

When I execute the code:

cd python
python package/bin/coacd -i hollowcyl.stl -o hollowcyl_coacd.stl

I still get the same issues, whereas I was expecting this to produce an STL file that allows the sphere to fall through the cylinder? I have read the code in python/package/bin/coacd line-by-line and I don't know why I am encountering this issue. Can anyone help?

Thanks in advance!

SarahWeiii commented 4 months ago

Hi here are the .obj and .stl files that coacd generated, by visualization I feel the results are reasonble, can you show the coacd result you generate to compare? I also attached the files.

Screenshot 2024-08-01 at 23 15 33 Screenshot 2024-08-01 at 23 15 45

out.zip