Robot simulation in the browser
A physics lab for robot simulation, built on MuJoCo and running in this tab with nothing
to install. Load a robot description, write a controller in plain JavaScript, press Run
and watch it stand up — or fall over, which is usually the more useful answer.
MuJoCo without installing MuJoCo
The physics is MuJoCo, compiled to WebAssembly by DeepMind and running in this tab.
There is no pip, no conda environment, no GPU driver and no Docker image between you
and a simulation — and no upload either: your model and your code never leave the
browser. There is a page about what that does and does not
include, MJX and the Python API among them.
Anything MuJoCo can compile runs here. If what you have is a URDF, the
converter writes the MJCF and tells you what it
could not carry across, rather than dropping it quietly.
The controller is code, not a wizard
Your controller is plain JavaScript. It runs once per control tick and returns what
each motor should aim at — the same shape as a real policy, without a runtime to
install. A movement handed over from the
motion editor arrives as its frames written into that file, so
the first thing anyone wants to do with a generated gait — change one number in it —
works.
Running a trained policy
Load an .onnx network and it drives the joints instead of hand-written
code. Inference runs in the tab alongside the physics, which is enough to answer the
question a policy is usually loaded to answer: does this thing keep its feet on a
robot whose numbers came from the description rather than from the training config.
Collision geometry is what is simulated
Simulation uses the collision geometry, not the visual meshes. That is
what a physics engine acts on, and it is where most models turn out to be wrong — a box
swallowing an arm catches on things that are not there, and no amount of looking at the
render will show it.
Tests, so a change can be compared
Watching a robot stand is a demonstration; asking it the same four questions under
conditions you can write down is a measurement. The Tests tab runs them headless and
returns numbers with a pass or a fail, which is what makes "it got better" a claim
rather than an impression.
Common questions
Do I need to install MuJoCo?
No. This is the engine itself, built to WebAssembly, running in the page. Nothing is
installed and nothing is sent anywhere.
Which formats can I open?
MJCF directly, and URDF, Xacro or SDF through the converter. Meshes come along in a
folder or a ZIP.
Why does my robot sink into the floor or explode?
Almost always the collision geometry or the inertia. Open the model in the
viewer, turn on collision and inertia, and compare the shapes to
the robot — an ellipsoid pointing the wrong way is a mass matrix that was written by
hand and never checked.
Can I use this to check a movement before hardware?
That is what the motion editor is for, and the same check runs in
a build with check-clips.mjs. It is not a
replacement for testing on a real robot; it is the thing that catches the movements that
were never going to work.