google-deepmind / google-deepmind/mujoco

Both internal and external plugins do not get loaded when running simulate executable

Open
#3,013 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### Intro

Hi!

I am a researcher at WebAI, I use MuJoCo for my research on robotics simulation. I tried to run MujocoTactileSensorPlugin using sample_tactile_sensor.xml provided with its GitHub repo. I used version 3.2.4 since that plugin uses the deprecated mju_rotVecMatT. The plugin does not get loaded and I get an XML Erro
r. Then I ran gear.xml in model\plugin\sdf with the latest mujoco version and I get the same error. I tracked down the issue to line 257 of engine_global_table.h where it is calling the function GetByKeyUnsafe() and the problem seems to be that the count() comes out as zero.

### My setup

The issue was detected in Linux Ubuntu 18.04 and the debugging was done using MS Visual Studio on Windows 11.

### What's happening? What did you expect?

Setting `rgba="1 0 0 1"` renders as **green**, I expected it to render as **red**.

Here is a screen-shot showing a green sphere:

### Steps for reproduction

1. Load the model below.
2. Run the code below.
3. See green sphere (should be red).

### Minimal model for reproduction

If you encountered the issue in a complex model, please simplify it as much as possible (while still reproducing the issue).

minimal XML

```XML




```

### Code required for reproduction

```python
import mujoco
import mediapy as media
model = mujoco.MjModel.from_xml_string(xml)
data = mujoco.MjData(model)

with mujoco.Renderer(model) as renderer:
mujoco.mj_forward(model, data)
renderer.update_scene(data)

media.show_image(renderer.render())
```

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