google-deepmind / google-deepmind/mujoco

Mesh Penetration Issue in MJX

Open
#2,477 5 comments 1 reaction 1 assignee Claimed by @btaba View on GitHub
bug MJX
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### 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.

https://github.com/user-attachments/assets/3be3db77-5a1c-4fdc-881f-1b1e090c0a13

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
```
2. Observe penetration between bottle mesh and the box
3. Comment out L72-74 in r0_real2sim.xml (as shown in r0_real2sim_1.xml).
```xml

```
4. Run the viewer again; observe that the mesh penetration issue disappears.

### Minimal model for reproduction

[demo.zip](https://github.com/user-attachments/files/19123920/demo.zip)

### Code required for reproduction

_No response_

### Confirmations

- [x] I searched the [latest documentation](https://mujoco.readthedocs.io/en/latest/overview.html) thoroughly before posting.
- [x] I searched previous [Issues](https://github.com/google-deepmind/mujoco/issues) and [Discussions](https://github.com/google-deepmind/mujoco/discussions), I am certain this has not been raised before.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.