Skip to content

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

@HuronSPerera

Description

@HuronSPerera

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
<mujoco>
  <worldbody>
    <light pos="0 0 1"/>
    <geom type="sphere" size="1" rgba="1 0 0 1"/>
  </worldbody>
</mujoco>

Code required for reproduction

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

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