Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Separate Builder (+ Moved Material files) #25

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

kwesiRutledge
Copy link
Contributor

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@kwesiRutledge
Copy link
Contributor Author

Looks like I forgot to update the imports. Whoops!

Copy link
Owner

@kevinzakka kevinzakka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay left last comments to fix failing test.

Could you also rename the 2 files to have leading underscores btw? That way it matches the _cli.py. And then make the appropriate change for the imports!

Otherwise LGTM!

obj2mjcf/_cli.py Outdated Show resolved Hide resolved
obj2mjcf/mjcf_builder.py Outdated Show resolved Hide resolved
@kevinzakka
Copy link
Owner

Thank you @kwesiRutledge!

@kevinzakka kevinzakka merged commit a3802b3 into kevinzakka:main Feb 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants