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

Seemingly unrelated defaults make model compilation non-idempotent #2479

Open
2 tasks done
jjyyxx opened this issue Mar 7, 2025 · 1 comment
Open
2 tasks done

Seemingly unrelated defaults make model compilation non-idempotent #2479

jjyyxx opened this issue Mar 7, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jjyyxx
Copy link
Contributor

jjyyxx commented Mar 7, 2025

Intro

Hi!

I am a graduate student at HKU, I use MuJoCo for my research on robotic manipulation.

My setup

MuJoCo 3.3.0, Python and C, Linux

What's happening? What did you expect?

By having an unrelated and unused <geom density="0" /> default entry (density attribute is necessary here), the model compilation becomes non-idempotent — it throws error Error: eigenvalue of mesh inertia must be positive: a on the second invocation.

Steps for reproduction

Run snippet below.

Minimal model for reproduction

No response

Code required for reproduction

import mujoco
spec = mujoco.MjSpec.from_string("""
<mujoco>
  <default>
    <geom density="0" />
    <mesh/>
  </default>
  <asset>
    <mesh name="a" vertex="0 0 0 1 0 0 0 1 0 0 0 1" scale="10 10 10" />
  </asset>
  <worldbody/>
</mujoco>
""")
model = spec.compile()
model = spec.compile()  # Error: eigenvalue of mesh inertia must be positive: a

Confirmations

@jjyyxx jjyyxx added the bug Something isn't working label Mar 7, 2025
@yuvaltassa
Copy link
Collaborator

This indeed looks like a bug. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants