A Web viewer for robot models powered by OpenUSD WASM, with USD/USDA/USDC loading, Hydra rendering, and multithreaded WASM.
Chinese version: README.zh.md
- OpenUSD WASM runtime (
usd-wasm/src/bindings/*) - Robot model loading and visualization (Unitree, Robots, Piper, etc.)
- Hydra render delegate (
usd-wasm/src/hydra/**) - Configurable multithreading parameters (via URL query)
.
├── src/ # Frontend TS source (compiled to public/)
├── public/ # Static assets and frontend build output
├── usd-wasm/src/
│ ├── hydra/ # Hydra TS/JS runtime code
│ └── bindings/ # OpenUSD WASM build artifacts
├── third_party/OpenUSD/ # OpenUSD source code (vendored)
├── scripts/ # Build and utility scripts
├── unitree_model/ # Unitree assets
├── Robots/ # Other robot assets
└── server.ts # Fastify static server
npm installnpm startDefault address: http://127.0.0.1:3003
Example (H1):
http://127.0.0.1:3003/?file=/unitree_model/H1/h1/usd/h1.usd
npm run buildOrder:
npm run build:usd-wasm(compileusd-wasm/src/hydra/**/*.ts, emit JS in place)tsc -p tsconfig.json(src/**->public/**)scripts/sync-vendor.cjs
bash scripts/rebuild-wasm-speed.sh \
--robot-trim \
--emsdk-env ~/.localdeps/emsdk/emsdk_env.sh \
--usd-repo ./third_party/OpenUSD \
--build-dir ~/.localdeps/openusd-wasm-speedArtifacts are copied back to usd-wasm/src/bindings/.
Key mappings in server.ts:
usd-wasm/src->/usd/*unitree_model->/unitree_model/*piper_isaac_sim->/piper_isaac_sim/*Robots->/Robots/*public->/
Bindings URLs:
/usd/bindings/emHdBindings.js/usd/bindings/emHdBindings.wasm/usd/bindings/emHdBindings.worker.js/usd/bindings/emHdBindings.data
After replacing bindings, update EMHD_BINDINGS_CACHE_KEY in src/index.ts to avoid JS/WASM/data cache mismatch.
threadCap: thread capthreads: thread countprewarmWorkers: whether to prewarm worker poolprefetchStageTransforms: stage transform prefetch (enabled by default)enableProtoBlobFastPath: proto blob fast path (enabled by default)
Example:
http://127.0.0.1:3003/?file=/unitree_model/H1/h1/usd/h1.usd&threads=4&prewarmWorkers=1
- Run
npm run buildafter TS changes. - Rebuild WASM and update
EMHD_BINDINGS_CACHE_KEYafter OpenUSD C++ changes. - Verify no new errors in browser Console/Network.
- Node.js >= 16 (20 recommended)
- Python 3.x (for OpenUSD build scripts)
- Emscripten (for WASM rebuild)
Verified local paths (example):
~/.localdeps/emsdk/emsdk_env.sh./third_party/OpenUSD~/.localdeps/openusd-wasm-speed
Hard-refresh and confirm EMHD_BINDINGS_CACHE_KEY is updated to avoid old JS + new wasm mismatch.
Ensure COEP/COOP headers are present (server.ts sets them for key resources).
Check that --usd-repo contains build_scripts/build_usd.py, and verify emcc/wasm-opt are available.
OpenUSD WASM robot viewer with Hydra rendering and a fast load pipeline.
Apache-2.0 (see LICENSE.txt)