kevinzakka / obj2mjcf

A CLI for processing composite Wavefront OBJ files for use in MuJoCo.
MIT License
164 stars 18 forks source link

On the problem of not being able to decompose "nonconvex shapes" into associations of "convex shapes" #10

Closed miyukin73 closed 1 year ago

miyukin73 commented 2 years ago

Hello, I'd like to simulate pouring objects into a cup. So, I created the STL file of the cup in CAD.

However, since the cup stl file is a non-convex geometry, it must be broken down into convex geom unions and they must all be attached to the same body in order to simulate in Mujoco.

So I was taught here before how to convert from stl files to obj files.

It worked that time, but when I tried again, when I ran the code A, only one file was generated and it was still a non-convex geometry.

What is the problem? I would like to know .... Thank you in advance. Cup (2).zip

kevinzakka commented 1 year ago

Hi @miyukin73,

You need to set --vhacd-args.enable when processing this mesh. You'll probably want to tweak the parameters of V-HACD though since it might not generate a good approximation with the default args.