ttktjmt/mjswan
关于
使用神经网络在 WebAssembly 中运行 MuJoCo 仿真
系统与基础设施可以做什么
- 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 & AR Support: Native WebXR viewer with tracked hands that interact with objects.
实测星标增长
- 24小时
- 0
- 7天
- +5
- 15天
- +7
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
Real-time Interactive RL 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 RL 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 & AR Support: Native WebXR viewer with tracked hands that interact with objects.
- 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.
- mjlab-native: Port any mjlab task to the web with the
mjlab-to-mjswanskill. - Customizable: Visualize your mujoco models and onnx policies quickly.
News
- 2026-10-01: Released mjswan Cloud 🦢☁️ in open beta 🎉 [X, LinkedIn]
- 2026-08-17: Created mjswan_playground, a collection of mjswan demos
- 2026-08-15: Became mjlab-native, covering most mjlab tasks
- 2026-06-02: Adopted for the MuscleMimic live demo [Demo, X]
- 2026-05-06: Adopted for the GentleHumanoid live demo [Demo, X]
- 2026-04-08: Featured in the MuJoCo README
Quick Start
mjswan can be installed with pip:
pip install mjswan # or 'mjswan[dev]', 'mjswan[examples]'
or with npm:
npm install mjswan
The demos live in examples/, which the wheel does not ship, so run them with the
mjswan CLI from a clone of this repository (after pip install -e '.[demo]'):
mjswan demo # lists the bundled demos
mjswan demo simple # runs the simple demo
The minimum python script for a sanity check:
import os, mujoco, mjswan
model_path = os.path.join(os.path.dirname(mujoco.__file__), "testdata", "model.xml")
mjspec = mujoco.MjSpec.from_file(model_path)
builder = mjswan.Builder()
builder.add_project(name="Sanity Check").add_scene(name="Test Model", spec=mjspec)
app = builder.build()
app.launch()
For detailed instructions, visit the documentation.
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
mjswan is licensed under the Apache-2.0 License.
- Research and hobby use: modify freely.
- Commercial use and company pages: please keep the swan icon in the control panel and the dialog it opens.
Please consider sponsoring if you find it useful 🦢
探索相关项目
加载中…
