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

[Feature] Mujoco import requires conaffinity and contype #603

Open
danx0r opened this issue Jan 17, 2025 · 2 comments
Open

[Feature] Mujoco import requires conaffinity and contype #603

danx0r opened this issue Jan 17, 2025 · 2 comments

Comments

@danx0r
Copy link

danx0r commented Jan 17, 2025

importing a mujoco (mjcf) model like so:

gs.morphs.MJCF(file='mujocomodel.xml')

Expected result: all elements of the Mujoco model imported

Actual result: geoms are ignored (do not load) unless I explicitly define the attributes conaffinity="0" contype="0"

@Kashu7100 Kashu7100 changed the title Mujoco import requires conaffinity and contype [Feature] Mujoco import requires conaffinity and contype Jan 18, 2025
@Kashu7100
Copy link
Collaborator

Please refer to #287 (comment) for the current supported objects in mujoco.

@danx0r Can you provide an example .xml (with object file if applicable) that you meet the problem?

@danx0r
Copy link
Author

danx0r commented Jan 18, 2025

There is no need to upload an example, this behavior is exactly what is discussed in #287. It's a matter of deciding what you will support, but also what defaults to use. It is counter-intuitive to import a model and have it not visualize all the parts. At a minimum there should be some sort of warning message.

Possibly if I had RTFM closely I would have seen this caveat, but honestly I don't see why this would be the default behavior. It is in my experience standard practice to have mesh objects visualize even if they don't collide, so I would suggest that contype=conaffinity=0 be the default, and then ppl will seek out docs to explain how to add collision meshes or primitives.

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

No branches or pull requests

2 participants