Professional robot design, assembly, visualization, and export workstation for URDF, MJCF, USD, Xacro, SDF, and .usp project workflows.
Live demo: urdf.d-robotics.cc
URDF Studio is a browser-based robot authoring environment built for editing robot topology, visual/collision geometry, hardware parameters, and multi-file workspaces without dropping down to raw XML for every operation.
The current app combines:
Skeleton,Detail, andHardwareediting modes- multi-robot assembly with bridge joints and workspace file management
- worker-assisted import/export pipelines
- USD runtime hydration, prepared export caches, and roundtrip archive flows
- AI-assisted generation, inspection, and report export
- a reusable
@urdf-studio/react-robot-canvaspackage workspace
Package identity:
- root app:
urdf-studio@2.0.0(private workspace app) - published package:
@urdf-studio/react-robot-canvas@0.1.0
Versioning policy:
- the private app and the published package use independent semantic versions
- the app version is injected into the frontend build and shown in the About dialog
- bump versions through
npm run version:bumpinstead of editing manifests by hand
- Build and edit kinematic trees with link/joint topology tools
- Author visual meshes, collision meshes, measurements, and helper overlays
- Configure motors and hardware metadata
- Switch between authoring modes through a unified viewer shell
- Import single files, folders, ZIP bundles, and
.uspproject archives - Maintain workspace file trees, source text, and selection sync
- Assemble multiple robots into one workspace with bridge joints
- Preserve history, pending edits, and prepared robot resolution caches
- React Three Fiber workspace canvas shared by the visualizer and URDF/USD viewer
- Runtime URDF/MJCF viewer plus vendored USD viewer runtime
- USD stage preparation, hydration, metadata extraction, and offscreen worker rendering paths
- Snapshot capture, helper overlays, transform controls, and collision editing workflows
- Export
URDF,MJCF,USD,SDF,Xacro, CSV/BOM, PDF, ZIP, and.usp - Workerized project archive, USD export, and USD binary archive conversion
- Roundtrip-oriented USD archive generation and prepared export caches
- Reusable
react-robot-canvaspackage for external consumers
- Frontend: React 19.2, TypeScript 5.8, Vite 6.2
- 3D: Three.js 0.181, React Three Fiber 9, Drei 10
- State: Zustand 5
- Styling: Tailwind CSS 4
- Parsing / Export: custom URDF, MJCF, USD, Xacro, SDF, and mesh pipelines under
src/core - Packaging: JSZip, jsPDF
- Package workspace:
packages/react-robot-canvas
src/
app/ App shell, orchestration, overlays, shared viewer handoff
features/ Domain features (visualizer, urdf-viewer, file-io, code-editor, ...)
store/ Zustand stores
shared/ Shared UI, 3D infrastructure, i18n, debug helpers, data
core/ Parsers, generators, loaders, robot logic
lib/ Reusable in-repo library surface
styles/ Global styles and semantic tokens
types/ Cross-module types
packages/react-robot-canvas/
Reusable package build and publish workspace
docs/
Architecture notes, runtime audits, contributor prompt context
scripts/
Regression, schema generation, comparison, and local tooling scripts
log/
Local runtime logs and retained troubleshooting output
.tmp/
Temporary build/runtime scratch artifacts used by some scripts
.worktrees/
Local git worktree area when using isolated workspaces
public/
Static assets, Monaco, USD bindings, sample robots
tmp/
Screenshots, traces, temporary validation artifacts
output/
User-facing exports and retained verification artifacts
test/
Fixture corpora, browser regression samples, and external mirrored projects
Architecture notes:
src/appis not a thin shell. It is the orchestration layer split intocomponents/,hooks/,utils/, andworkers/, and owns document loading, viewer handoff, import/export coordination, pending history, and binary/archive worker bridges.src/features/urdf-vieweris currently the heaviest feature area. It combines React UI, a vendored USD runtime, adapter/util layers, prepared-open/export helpers, and worker-backed offscreen rendering.
- Node.js 18 or newer
- npm
- A modern Chromium-based browser for local USD validation
git clone https://github.com/OpenLegged/URDF-Studio.git
cd URDF-Studio
npm installThe app can run without AI credentials. If you want AI generation / inspection enabled, set the environment variables that vite.config.ts injects into the frontend runtime:
OPENAI_API_KEY=your_api_key
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4.1-mini
# Optional alternative source used by the current Vite define shim
GEMINI_API_KEY=
# Optional Monaco override
VITE_MONACO_VS_PATH=You can place them in .env.local.
npm run devOpen:
http://127.0.0.1:3000
The Vite dev server is intentionally bound to 127.0.0.1 and serves the cross-origin isolation headers required by the USD WASM runtime.
USD loading depends on SharedArrayBuffer, so the page must be cross-origin isolated.
- Use
npm run devfor development - Use
npm run previewto validate the production build locally - Prefer
127.0.0.1/localhostor HTTPS - Do not serve
dist/with a plain static server that omits these headers:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: same-siteIf those headers are missing, the app shell may load but USD import / stage open will fail.
# App
npm run dev
npm run build
npm run preview
# Versioning
npm run version:show
npm run version:bump -- --app minor
npm run version:bump -- --package patch
# Reusable package workspace
npm run build:package:react-robot-canvas
npm run pack:package:react-robot-canvas
# Schema / comparison helpers
npm run code-editor:generate-urdf-schema
npm run mjcf:compare
npm run sdf:compare
# Regression helpers
npm run regression:shadow-hand-hover
npx tsx scripts/regression/validate_unitree_model_roundtrip_archive.ts
# Codex resilience / key-router helpers
npm run codex:retry
npm run codex:gui
npm run codex:key-router:deploy:dryAdditional script families under scripts/ include URDF inspection helpers, robot preview generation, MuJoCo/MJCF comparison utilities, regression runners, and local Codex support tooling.
This repository now exposes root quality commands for formatting, linting, and CI validation:
npm run formatnpm run format:checknpm run lintnpm run typecheck:qualitynpm run check
npm run typecheck remains available as the full-repo TypeScript debt check. CI and npm run check use npm run typecheck:quality, which currently excludes test/spec files so runtime compilation can stay green while test fixtures are still being updated.
Git hooks are wired through Husky + lint-staged + Commitlint:
pre-commit: formats staged files and runs ESLint / Stylelint on the staged diffcommit-msg: validates Conventional Commit messages
The repository still does not force a single root npm test command because verification remains module- and fixture-driven.
Validation is typically done through:
- targeted
node --test/npx tsx --testruns next to the changed module - focused regression scripts under
scripts/regression/ npm run build- package workspace builds when touching
src/liborpackages/react-robot-canvas - fixture-driven checks against large corpora under
test/, especiallytest/unitree_model,test/gazebo_models,test/awesome_robot_descriptions_repos, andtest/usd-viewer
- Changelog
- Release Process
- Architecture Boundaries
- Robot Canvas Library
- Runtime Fallback Audit
- Contributor Prompt Context
- Agent Instructions
The repository also contains the publishable package workspace:
This package currently provides a reusable RobotCanvas surface for external React apps that need URDF/MJCF viewing without the full URDF Studio shell.
- Keep dependency direction aligned with
app -> features -> store -> shared -> core -> types - Prefer existing hooks / utilities over duplicating viewer or export logic
- Follow the runtime and style constraints documented in AGENTS.md
- Put temporary screenshots, traces, and browser artifacts under
tmp/
This project is licensed under the Apache License 2.0. See LICENSE.
Supported by D-Robotics.