Browser-based MuJoCo simulation with real-time policy control
Project description
Real-time Interactive AI Robot Simulation in Your Browser
mjswan is a powerful framework for creating interactive MuJoCo simulations with real-time policy control, running entirely in the browser. Built on top of mujoco wasm, onnxruntime, and three.js, it enables easy sharing of AI robot simulation demos as static sites, perfect for GitHub Pages hosting.
Check out the demo ― ttktjmt.github.io/mjswan
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).
- Portable: Embed the simulation in a web page or Google Colab notebook.
- Customizable: Visualize your mujoco models and onnx policies quickly.
Quick Start
mjswan can be installed with pip:
pip install mjswan # or 'mjswan[dev]', 'mjswan[examples]'
or with npm:
npm install mjswan
You can run the demo using the uv command with the python package mjswan[examples]:
uv run main
For detailed installation instructions, visit the documentation.
Third-Party Assets
mjswan 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 ・ MuJoCo Menagerie License ・ MuJoCo Playground License
Acknowledgments
This project was greatly inspired by the Facet project demo from the research group at Tsinghua University.
It is also built upon the excellent work of 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. When using mjswan, please retain attribution notices in the app to help other users discover this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mjswan-0.2.4.tar.gz.
File metadata
- Download URL: mjswan-0.2.4.tar.gz
- Upload date:
- Size: 11.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71806947e911c0cd739919eac3f5815869663c30cf1b21a9f7ee3beaa23dd9af
|
|
| MD5 |
81680821c49fd0f1e352b62517c23d76
|
|
| BLAKE2b-256 |
e8088544217c133bf3ad6780d3b043bda5e886b6ac398dc9ce03680bb132b245
|
File details
Details for the file mjswan-0.2.4-py3-none-any.whl.
File metadata
- Download URL: mjswan-0.2.4-py3-none-any.whl
- Upload date:
- Size: 11.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50ae6433f04417f5bee65a4fd999624a1e61b7a326d8e8b00ec1642d83c1562
|
|
| MD5 |
51eef937e27bd4da750b44aa49faebd3
|
|
| BLAKE2b-256 |
1df34d3c72540c970fbd068bf759c2bf04835a66340aaf497a83f889c864c2af
|