Skip to main content

SceneConfig

Every simulation starts with a SceneConfig object that tells mujoco-react what to load and how to configure it:

Required Fields

Optional Fields

Model Sources

DeepMind Menagerie

Models from MuJoCo Menagerie can be loaded by pointing src at the raw GitHub URL for the model directory:
Available models include franka_emika_panda, universal_robots_ur5e, kuka_iiwa_14, robotiq_2f85, and many more.

Custom Server

Point src to any HTTP server hosting MJCF files:

GitHub Repositories

Use raw GitHub URLs for models hosted in your own repos:

Scene Objects

Inject dynamic objects (boxes, spheres, cylinders) into the scene without modifying MJCF files:

SceneObject Fields

Objects are injected into </worldbody> before the model is compiled.

XML Patching

For more advanced model customization, use xmlPatches to transform the MJCF XML before it reaches MuJoCo:

XmlPatch Fields

Reset Callback

Run custom logic after each simulation reset (e.g., randomize object positions for domain randomization):

Runtime Scene Loading

Swap the entire model at runtime without remounting: