Skip to content

[Bug]: MuJoCo backend rejects render argument from public environment factory #190

Done

Description

@alexhegit

Environment

  • Commit/version: MotrixLab caf0c94a96b689ea784db938f89909097506ae5c (workspace 0.5.0); clean checkout
  • OS and architecture: Linux 6.8.0-147-generic x86_64
  • Python and uv versions: Python 3.10.19; uv 0.9.11
  • Backend and optional extras: motrix-env-mujoco==0.5.0, MuJoCo 3.9.0, explicitly selected sim='mujoco'; workspace rocm extra installed but reproduces with the GPU hidden
  • GPU/driver: not required; reproduced with ROCR_VISIBLE_DEVICES=-1 HIP_VISIBLE_DEVICES=-1 and torch.cuda.is_available() == False

Reproduction

from motrix_env_core import registry

env = registry.make('cartpole', num_envs=1, sim='mujoco')

Expected and actual behavior

Expected: the registered MuJoCo backend can be selected for Cartpole using the public registry.make(..., sim='mujoco') entry point, with or without headless rendering.

Actual: environment construction fails before the first simulation step:

TypeError: MuJoCoSimBackend.__init__() got an unexpected keyword argument 'render'

motrix_env_core/src/motrix_env_core/direct/env.py:60-61 always constructs a RenderConfig and calls the backend factory with render=render. motrix_env_mujoco/src/motrix_env_mujoco/backend.py:29 defines MuJoCoSimBackend.__init__(self, scene, sim, num_envs) without a render parameter. The MotrixSim backend does accept it. This is a backend constructor/API mismatch and does not depend on ROCm.

Logs and additional context

The attempted MotrixSim-versus-MuJoCo Cartpole numerical comparison was blocked at construction. The one-line command above is sufficient to reproduce independently of that comparison.

Activity

  1. wlgys8 commented on Nov 27, 2026

    @wlgys8
    Contributor

    Thanks for the detailed reproduction. We confirmed the constructor mismatch in the public environment factory.

    The MuJoCo backend is currently intended for sim2sim deployment and scene compilation. It does not yet provide the live simulation capabilities required to create a DirectEnv/ManagerEnv for training (or evaluation), so selecting it through registry.make(..., sim=\"mujoco\") is now rejected early with a clear message instead of failing later on the render argument or simulator operations.

    The standalone MuJoCoSceneCompiler path remains supported for scene compilation and sim2sim tooling.

    Fixed in PR #193: #193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions