Skip to content

Mesh Penetration Issue in MJX #2477

Open
@Stillwtm

Description

@Stillwtm

Intro

Hi!

I am a undergrad student at SJTU, I use MuJoCo for my research on robot manipulation.

My setup

mujoco 3.3.0, mujoco-mjx 3.2.7, Python, Ubuntu 20.04

What's happening? What did you expect?

I used the following command to load my model in MJX and visualize:

JAX_PLATFORM_NAME=cpu python -m mujoco.mjx.viewer --mjcf scene.xml

I noticed that a significant penetration occurs between the mesh of a bottle and a box.

2025-03-07.17.26.45.webm

However, when I removed three empty bodies from the model, this penetration issue seemed to disappear.

I am unsure why this behavior occurs, as my previous understanding was that empty bodies should not affect the physics simulation.

Steps for reproduction

  1. Run
JAX_PLATFORM_NAME=cpu python -m mujoco.mjx.viewer --mjcf scene.xml
  1. Observe penetration between bottle mesh and the box
  2. Comment out L72-74 in r0_real2sim.xml (as shown in r0_real2sim_1.xml).
      <!-- <body name='a' pos="1.05 0.25 0.97"/>
      <body name='b' pos="1.05 0.283 0.97"/>
      <body name='c' pos="1.05 0.217 0.97"/> -->
  1. Run the viewer again; observe that the mesh penetration issue disappears.

Minimal model for reproduction

demo.zip

Code required for reproduction

No response

Confirmations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions