Skip to main content

Browser-based MuJoCo simulation with real-time policy control

Project description

mjswan

Real-time Interactive AI Robot Simulation in Your Browser

deploy test docs pypi version npm version

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

MyoSuite Demo   MuJoCo Menagerie Demo   MuJoCo Playground Demo


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

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 LicenseMuJoCo Menagerie LicenseMuJoCo 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mjswan-0.1.1.tar.gz (11.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mjswan-0.1.1-py3-none-any.whl (11.6 MB view details)

Uploaded Python 3

File details

Details for the file mjswan-0.1.1.tar.gz.

File metadata

  • Download URL: mjswan-0.1.1.tar.gz
  • Upload date:
  • Size: 11.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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

Hashes for mjswan-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1113c4ffc684618869d76b196352cd5fa29085464b77fac6991c4a069a8ee09f
MD5 5bd2b4ec345710515b8f4d098bef4a1e
BLAKE2b-256 6c47be2ed5c88bf235fd63e0123fc57dee2d27a9bf5947f62f788efea4ecd95d

See more details on using hashes here.

File details

Details for the file mjswan-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mjswan-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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

Hashes for mjswan-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00a801c5efe46bc805d44bccb7a6190c195b533f3cce6e4472b826bf55a14b3b
MD5 fe030ae17b651fb12f6244e124bfb603
BLAKE2b-256 df374f06a0cf86357b5ff9b750bfec5a90548afbead3abdb59fa264de650d682

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page