kevinzakka / obj2mjcf

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

Introduce Separate Builder (+ Moved Material files) #25

Closed kwesiRutledge closed 7 months ago

kwesiRutledge commented 7 months ago

Hey Kevin!

We introduced this small change to organize this code (and because we are working on a branch that will extend this helpful tools functionality). We were wondering if you would accept this pull request?

It doesn't change any functionality, but decomposes the different parts of building the MJCF within a "Builder" object.

Thanks again for building this helpful tool!

P.S. We are working on an extension of this tool that handles obj files that contain MULTIPLE parts. Would you be interested in having such a feature in this tool? (The main idea is to decompose each part into separate Mujoco bodies, so that collision detection is done on each item separately instead of on the convex hull of all of the parts.)

kevinzakka commented 7 months ago

Hi @kwesiRutledge, thank you for this PR. Will get reviewed asap.

P.S. We are working on an extension of this tool that handles obj files that contain MULTIPLE parts. Would you be interested in having such a feature in this tool?

Of course that would be wonderful.

FYI, I am working on a PR that will remove V-HACD and replace it with CoACD. Hopefully you can start leveraging that for your work?

kevinzakka commented 7 months ago

Hi @kwesiRutledge, could you switch to lower case for both file names to respect python conventions (i.e., mjcf_builder.py and material.py)? And then could you run make format to format with black and fix potential mypy issues?

kwesiRutledge commented 7 months ago

FYI, I am working on a PR that will remove V-HACD and replace it with CoACD. Hopefully you can start leveraging that for your work?

This is exactly what we were planning to do on our end! Let me know if you could use an assist!

Hi @kwesiRutledge, could you switch to lower case for both file names to respect python conventions (i.e., mjcf_builder.py and material.py)? And then could you run make format to format with black and fix potential mypy issues?

Ah! Sorry for creating issues. I'll make the changes now.

kwesiRutledge commented 7 months ago

Verified that make format runs to completion and renamed the new files. Let me know if anything else is missing, @kevinzakka !

kwesiRutledge commented 7 months ago

Looks like I forgot to update the imports. Whoops!

kevinzakka commented 7 months ago

Thank you @kwesiRutledge!