Skip to content

A small MJCF example

This model uses a plane and a free sphere. It references no external meshes, textures, or includes.

<mujoco model="falling_ball">
<worldbody>
<geom name="floor" type="plane" size="2 2 0.1" rgba="0.25 0.3 0.35 1"/>
<body name="ball" pos="0 0 1">
<freejoint/>
<geom type="sphere" size="0.15" mass="1" rgba="0.2 0.65 0.9 1"/>
</body>
</worldbody>
</mujoco>

To try it, save the text as model.xml in a new folder on your computer. Open that folder with Open folder, or create a ZIP containing model.xml at its root and use Import ZIP. Check that Entry model is model.xml. The project loads when opened; after making an edit, click Apply. Use Download ZIP or Save to folder to keep changes.