muwanx 0.0.8
Browser-based MuJoCo simulation with real-time policy control
License: Apache-2.0
Requires Python: >=3.10

<p align="center">
  <img src="assets/banner.png" alt="muwanx" width="80%">
</p>
<p align="center">
  <strong><em>Real-time Interactive AI Robot Simulation in Your Browser</em></strong>
</p>

<p align="center">
  <a href="https://github.com/ttktjmt/muwanx/actions/workflows/deploy.yml"><img src="https://github.com/ttktjmt/muwanx/actions/workflows/deploy.yml/badge.svg" alt="deploy"/></a>
  <a href="https://github.com/ttktjmt/muwanx/actions/workflows/pytest.yml"><img src="https://github.com/ttktjmt/muwanx/actions/workflows/pytest.yml/badge.svg" alt="test"/></a>
  <a href="https://pypi.org/project/muwanx"><img src="https://img.shields.io/pypi/v/muwanx.svg?logo=pypi" alt="pypi version"></a>
  <a href="https://www.npmjs.com/package/muwanx"><img src="https://img.shields.io/npm/v/muwanx.svg?logo=nodedotjs" alt="npm version"></a>
</p>

<p align="center">

  muwanx is a powerful framework for creating interactive MuJoCo simulations with real-time policy control, running entirely in the browser. Built on top of <a href="https://github.com/google-deepmind/mujoco/tree/main/wasm"><strong>MU</strong>joco <strong>WA</strong>sm</a>, <a href="https://github.com/microsoft/onnxruntime">on<strong>NX</strong> runtime</a>, and <a href="https://github.com/mrdoob/three.js/">three.js</a>, it enables easy sharing of AI robot simulation demos as static sites, perfect for GitHub Pages hosting.
</p>

<p align="center">
  <a href="https://ttktjmt.github.io/muwanx/"><img src="assets/demo.gif" width="70%"/></a>
</p>

<p align="center">
  <em>Check out the demo ― <a href="https://ttktjmt.github.io/muwanx/">ttktjmt.github.io/muwanx</a></em>
</p>

<p align="center">
  <a href="https://ttktjmt.github.io/muwanx/myosuite"><img src="https://img.shields.io/badge/MyoSuite-E0E0E0?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMxNTUyNTc7fS5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sMCwwLDI2LjE4LDE1LjE4WiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIyLDUuNTJhMy42MSwzLjYxLDAsMCwwLS4xNy0yLjcyLDMuNTUsMy41NSwwLDAsMC0zLjIxLTJoMEEzLjU3LDMuNTcsMCwxLDAsMjIsNS41MloiLz48L2c+PC9zdmc+" alt="MyoSuite Demo"></a>
  &nbsp;
  <a href="https://ttktjmt.github.io/muwanx/menagerie"><img src="https://img.shields.io/badge/MuJoCo_Menagerie-E0E0E0?logo=deepmind" alt="MuJoCo Menagerie Demo"></a>
  &nbsp;
  <a href="https://ttktjmt.github.io/muwanx/playground"><img src="https://img.shields.io/badge/MuJoCo_Playground-E0E0E0?logo=deepmind" alt="MuJoCo Playground Demo"></a>
</p>

---


## Features

- **Real-time**: Run mujoco simulations and policy control in real time.
- **Interactive**: Change the state of objects by applying forces.
- **Cross-platform**: Works seamlessly on desktop and mobile devices.
- **VR Support**: Native VR viewer support with WebXR.
- **Client-only**: All computation runs in the browser. No server for simulation is required.
- **Easy Sharing**: Host as a static site for effortless demo distribution (e.g., GitHub Pages).
- **Customizable**: Visualize your mujoco models and onnx policies quickly.


## Quick Start

muwanx can be installed with `pip`:
``` sh
pip install muwanx  # or 'muwanx[dev]', 'muwanx[examples]'
```

or with `npm`:
``` sh
npm install muwanx
```

You can run the demo using the `uv` command with the python package `muwanx[examples]`:
```sh
uv run full
```

For detailed installation instructions, visit the [documentation](https://muwanx.readthedocs.io).


## Third-Party Assets

muwanx incorporates mujoco models from the external sources in its demo. See the respective submodule for full details, including individual model licenses and copyrights. All models are used under their respective licenses. Please review and comply with those terms for any use or redistribution.

[MyoSuite License](https://github.com/MyoHub/myosuite/blob/main/LICENSE) ･ [MuJoCo Menagerie License](https://github.com/google-deepmind/mujoco_menagerie/blob/main/LICENSE) ･ [MuJoCo Playground License](https://github.com/google-deepmind/mujoco_playground/blob/main/LICENSE)


## Acknowledgments

This project was greatly inspired by the [Facet project demo](https://facet.pages.dev/) from the research group at Tsinghua University.<br>
It is also built upon the excellent work of [zalo/mujoco_wasm](https://github.com/zalo/mujoco_wasm), one of the earliest efforts to run MuJoCo simulations in a browser.


## License

This project is licensed under the [Apache-2.0 License](LICENSE). When using muwanx, please retain attribution notices in the app to help other users discover this project.