Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a8be5e0134 | |||
| 57b3108ab3 | |||
| 09f7b02c3e | |||
| fc5ee4f2c6 | |||
| 8d74cdbf26 |
@@ -29,12 +29,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.f32 filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
*.stl filter=lfs diff=lfs merge=lfs -text
|
||||
*.STL filter=lfs diff=lfs merge=lfs -text
|
||||
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.webp filter=lfs diff=lfs merge=lfs -text
|
||||
*.webm filter=lfs diff=lfs merge=lfs -text
|
||||
*.glb filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -9,144 +9,130 @@ pinned: false
|
||||
license: apache-2.0
|
||||
---
|
||||
|
||||
# Microduck RL playground
|
||||
# Browser robot simulation platform
|
||||
|
||||
Real trained RL policies for the Microduck robot, running fully in the
|
||||
browser: MuJoCo compiled to WebAssembly steps the physics, onnxruntime-web
|
||||
runs the policy network at 50 Hz. No server, no backend.
|
||||
MuJoCo WASM + onnxruntime-web + three.js, with **Microduck** (legs / rollers), **Microban**, and **RP1** Robot Packages. Physics and ONNX inference run locally in the browser; no simulation backend is required.
|
||||
|
||||
Two locomotion variants of the same robot are included: **legs** (walking,
|
||||
the default) and **rollers** (the wheeled skating variant). Press `M` (or
|
||||
hold D-pad up ~1 s on a gamepad) to switch; the roller model, meshes and
|
||||
policies are lazy-loaded on the first switch.
|
||||
The application opens directly into simulation, defaults to Microduck, and keeps pause, reset, robot selection and a collapsible keyboard reference on that same screen. There is no welcome / RESUME menu or BIOS animation. Anton is bundled locally, so the default interface does not wait for an external font service.
|
||||
|
||||
## Policies
|
||||
## v0.5
|
||||
|
||||
| Mode | Checkpoint | What it does |
|
||||
|--------|-----------|--------------|
|
||||
| Run (legs) | `BEST_alpha_walking.onnx` | Velocity-tracking locomotion (arrows / WASD to steer) |
|
||||
| Sit | `BEST_alpha_sitstand.onnx` | Sits down on its hull, stands back up |
|
||||
| Roll | `roulade.onnx` | Rolls over and recovers |
|
||||
| Kick | `ball_kick_left.onnx` / `ball_kick_right.onnx` | Blind one-shot kick (0.5 s window, zeroed commands), left or right leg |
|
||||
| Drive (rollers) | `BEST_roller.onnx` | Velocity-tracking skating on 4 passive wheels (higher top speed: 0.6 m/s) |
|
||||
| Crouch (rollers) | `BEST_roller_crouch.onnx` | One-shot crouch-glide: sinks low over ~3.5 s and stands back up (phase-encoded command) |
|
||||
- Brighter shared lighting and the original four-swatch **Line color** control for every robot.
|
||||
- One session-wide layout of 5–7 physical, draggable geometries replaces the football and scales consistently across robots.
|
||||
- RP1 uses the supplied textured GLBs, including fixed-hand detail, without changing its 24-DOF physics or trained skills.
|
||||
- Verified with 66 unit tests, 55 browser tests and production-build checks. See [shared environment](docs/superpowers/verification/shared-robot-environment.md) and [RP1 materials](docs/superpowers/verification/rp1-glb-materials.md) verification records.
|
||||
|
||||
Policies and MJCF model from
|
||||
[pollen-robotics/microduck](https://github.com/pollen-robotics/microduck)
|
||||
and [pollen-robotics/microduck_rl](https://github.com/pollen-robotics/microduck_rl).
|
||||
## Robots
|
||||
|
||||
## Controls
|
||||
| Robot | Default scene / presentation | Controls |
|
||||
|---|---|---|
|
||||
| Microduck | Shared 4.5 × 4.5 m bounded arena, 5–7 random interactive geometries, original GLB/comic effects | Existing walking, skating, skills and recovery |
|
||||
| Microban | Shared robot-scaled 5.5 × 5.5 m arena, interactive geometries, textured per-body GLB visuals | Walking policy + independent head rotation |
|
||||
| RP1 | Shared robot-scaled 22 × 22 m arena, interactive geometries, user-supplied textured GLB visuals on original 24-DOF physics | Completed walking policy; trained 10 s dance segment (J) and full 4.36 s wave (H) |
|
||||
|
||||
- Arrows or WASD / ZQSD: forward / back + turn
|
||||
- M: switch legs <-> rollers
|
||||
- Q / E (A / E on AZERTY): kick left / right (legs only)
|
||||
- F: alternate left / right kicks (legs only)
|
||||
- R: sit / stand (legs) / crouch-glide (rollers)
|
||||
- G: ground pick (legs only)
|
||||
- C: toggle the chase camera (on by default; dragging detaches it)
|
||||
- Space: reset
|
||||
- Drag to orbit, scroll to zoom
|
||||
- Colour dots: repaint the duck (it quacks)
|
||||
Switch robots using **Robot** in the toolbar. Returning to Microduck restores the session's scene-line colour and feet / rollers choice, but initializes a fresh physical state. Failed loads keep the previous robot available and show an inline retry action.
|
||||
|
||||
In roller mode the legs-only actions (kicks, sit) are disabled and their
|
||||
hints fade out; play the ball by driving into it.
|
||||
Microduck policies / assets originate from [pollen-robotics/microduck](https://github.com/pollen-robotics/microduck) and [pollen-robotics/microduck_rl](https://github.com/pollen-robotics/microduck_rl). Microban physics / policy assets originate from [Rhoban/microban](https://github.com/Rhoban/microban); its textured visual replacement comes from the user-supplied `microban2.zip`. Exact hashes, dirty-worktree provenance and license caveats are included in its [Package source notes](app/public/robots/microban/SOURCE.md).
|
||||
|
||||
### URL parameters
|
||||
### Shared scene controls (all robots)
|
||||
|
||||
- `?boot=1`: skip the welcome modal and land straight on the BIOS console,
|
||||
which then shows the real loading progress live (honest loader) before
|
||||
the normal entrance plays. Boot failures (missing asset, policy fetch
|
||||
error...) freeze the console on a `SYSTEM HALTED` screen with the error
|
||||
detail - handy for debugging.
|
||||
The scene has brighter ambient / environment illumination plus a hemisphere fill light. The lower-left **Line color** palette retains the original Cream / Graphite / Lavender / Sky swatches and square comic buttons, but now changes **floor and wall grid lines**, not robot materials. The same palette is available for every robot, and its selection is global across robot switches, reset and feet / rollers changes.
|
||||
|
||||
The ball's physics are local to your tab, but its pose is broadcast with
|
||||
your duck's, so other visitors see a translucent copy of your ball next
|
||||
to your ghost (and you see theirs). A square arena (3 x 3 m) fences the
|
||||
play area so neither the ball nor the duck can wander off.
|
||||
The football is removed. One browser session randomly generates **5–7 lightweight boxes, spheres, cylinders and capsules** shared by **all robots**, clear of both bundled spawn anchors and each other. Their types, colours and relative layout stay identical when switching robots; geometry and positions scale with the existing arena-to-robot ratio. They have real MuJoCo free joints: every robot can push them, they collide with one another, the floor and walls, and the mouse can grab / lift them using spring forces. Reset, locomotion changes and robot switches restore the same session layout; refreshing generates a new layout. Escaped toys are returned individually. This shares environment configuration/layout, not live object momentum between different-scale robot simulations.
|
||||
|
||||
### Gamepad
|
||||
## Keyboard and mouse
|
||||
|
||||
Plug in a controller and the same mapping as the real robot runtime applies:
|
||||
| Action | Binding |
|
||||
|---|---|
|
||||
| Forward / backward / turn | Arrow keys or physical WASD positions (layout labels adapt when supported) |
|
||||
| Pause / continue | Esc or toolbar |
|
||||
| Reset current robot | Space or toolbar |
|
||||
| Orbit / zoom | Mouse drag / wheel |
|
||||
| Microduck left / right kick | Q / E |
|
||||
| Microduck alternate kick | F |
|
||||
| Microduck sit / stand; roller crouch | R |
|
||||
| Microduck ground pick | G |
|
||||
| Microduck forward roll; roller crouch | T |
|
||||
| Microduck feet / rollers | M or quickbar |
|
||||
| Restore rear chase camera (all robots) | C |
|
||||
| Microban independent head rotation | H |
|
||||
| RP1 trained dance (10 s segment) / wave (4.36 s) | J / H |
|
||||
|
||||
- Left stick: forward / back + turn
|
||||
- Right stick: orbit the camera (detaches the chase cam)
|
||||
- R3 (right stick click): toggle the chase cam back on
|
||||
- X or D-pad down: sit / stand (legs) / crouch-glide (rollers)
|
||||
- A: ground pick (legs only)
|
||||
- Y: toggle head control
|
||||
- RB / LB: right / left kick (legs only)
|
||||
- D-pad up: hold ~1 s to switch legs <-> rollers (the real robot uses a 3 s hold)
|
||||
- Right trigger: mouth (analog) + quack
|
||||
- Left trigger: hold for wheee
|
||||
- A: enter / resume the game while the title or pause overlay is up
|
||||
- Menu/Start (or Select): exit back to the title overlay while in-game
|
||||
The on-screen reference comes from the same Package bindings as the keyboard, and its skill entries are also clickable buttons. Text fields / selectors retain their normal keyboard behavior. Focused buttons retain native Space / Enter behavior without also resetting the robot. Losing focus, pausing, resetting or switching clears held movement keys.
|
||||
|
||||
## Multiplayer ghosts
|
||||
All bundled robots, and future Packages omitting `presentation.world`, use the same **robot-scaled arena template**. Microduck remains at **4.5 × 4.5 m**, with 0.25 m high / 0.05 m thick collision walls. World lengths scale by `dimensions.height / 0.27`: Microban gets **5.5 × 5.5 m**, walls ≈0.306 m high; RP1 gets **22 × 22 m**, walls ≈1.222 m high. Wall thickness, visual geometry, grid spacing and fade distances scale together, preserving Microduck's scene-to-body proportions. Nominal standing height is fixed per package, not inferred from the live pose or root spawn height; missing dimensions retain the reference scale. Interiors stay flat; no relief or automatic coordinate clamping is added. Explicit `world: "flat"` remains available for generic-runtime diagnostics. All robots start with the camera behind the body. Mouse orbit detaches chase mode; **C** restores rear following and the default zoom, including while paused (pressing C again does not detach). Dragging any robot or interactive geometry applies physical forces; dragging empty space orbits the camera, consistently for all three robots. Gamepad / touch are not part of this release's acceptance scope.
|
||||
|
||||
Other people visiting the Space at the same time show up as translucent
|
||||
ducks, live. Peer-to-peer WebRTC via [Trystero](https://github.com/dmotz/trystero)
|
||||
(serverless signaling over public Nostr relays), so it works from a static
|
||||
Space with no backend. Each tab broadcasts its duck's pose (trunk + 14
|
||||
joints + jaw + colour + locomotion variant) at 10 Hz; up to 3 ghosts are
|
||||
rendered, extra peers stay connected but invisible. The camcorder-style OSD
|
||||
in the top-right corner shows "N ONLINE" when peers are around.
|
||||
## Microban fidelity and limits
|
||||
|
||||
Ghost limitations in v1: a peer in roller mode renders with the roller rig
|
||||
only if your tab has already loaded it (otherwise it falls back to the leg
|
||||
rig), and ghost wheels don't spin (passive wheel joints aren't broadcast).
|
||||
Old clients simply ignore the new variant flag.
|
||||
- Actual ONNX interface: `obs [1, 63]` → `actions [1, 18]`.
|
||||
- The model has 19 actuated joints; the policy controls 18 body joints, **not head**. Metadata's 19 names are resolved by name, not mistaken for actor output order.
|
||||
- Projected gravity uses the trunk frame; the gyro retains the original IMU-site frame. Current policy has no extra reference-phase input.
|
||||
- Physics timestep: 0.005 s; control decimation: 4 (50 Hz).
|
||||
- **Simplified actuation**, not BAM: joint PD at every physics substep, kp=0.3, kd=0.02, torque limit=0.65 Nm.
|
||||
- Default commands: forward 0.15 m/s, backward −0.1 m/s, turn ±0.6 rad/s. These are commanded, not guaranteed measured tracking speeds. Drift remains possible.
|
||||
- Head follows the source's 0.35 Hz / ±π/4 sinusoid, with 0.5 s start / stop blending. It does not restart the walking controller.
|
||||
- Falling stops policy updates and requests manual reset. There is no automatic stand-up policy for Microban.
|
||||
|
||||
## How it works
|
||||
BAM battery / friction / delay modeling, Placo squat, training, hardware control, ROS, camera observations, external Packages and online sharing are **not implemented** in this release. Ghost networking, stickers and celebration / entrance sequences are deferred. Audio retains the existing `SOUND_DISABLED=true` master setting; simulation never waits for an audio-unlock gesture.
|
||||
|
||||
The app is a Vite + React + MUI shell around an imperative game core:
|
||||
React/MUI renders the UI chrome (title menu, BIOS console, HUD, touch
|
||||
overlay), react-three-fiber owns the canvas/lights/environment, and the
|
||||
physics/policy/rig loop lives in framework-agnostic modules under
|
||||
`app/src/game/`. A zustand store bridges the two (game state out,
|
||||
UI intents in).
|
||||
## RP1 trained skills
|
||||
|
||||
- `app/src/game/game.js` fetches the MJCF (`robot_allcollisions.xml`, or
|
||||
`robot_allcollisions_rollers.xml` for the roller variant), strips the
|
||||
visual geoms, injects a floor, arena walls, a ball, a collision box for
|
||||
the arcade cabinet row and a STAND keyframe, and compiles it with the
|
||||
official `@mujoco/mujoco` WASM bindings.
|
||||
- Both variants share the exact same policy interface: 61D observation
|
||||
(gyro, projected gravity, 14 joint pos/vel, last action, 13D command)
|
||||
and 14 position-targets, matching [`microduck_rl/scripts/infer_policy.py`](https://github.com/pollen-robotics/microduck_rl/blob/main/scripts/infer_policy.py).
|
||||
The roller variant adds 4 passive wheel hinges that appear in `qpos`
|
||||
(zeroed in the keyframe) but not in the observation.
|
||||
- Rendering is a three.js rig built from `kinematics.json` /
|
||||
`kinematics_rollers.json` + decimated STL meshes, driven directly from
|
||||
MuJoCo `qpos` (including the passive wheel spin).
|
||||
- Switching variants swaps the compiled model + data + rig + ONNX sessions
|
||||
wholesale; both stay resident after the first load so toggling back and
|
||||
forth is instant.
|
||||
Walking uses final `model_9000.pt` from `rp1_24dof_flat/2026-10-28_15-47-49`, float32 `[1,243]` (three term-major history frames) → `[1,24]`. Dance uses resumed `2026-10-29_11-05-14_dance_resume/model_23998.pt`; wave retains its separate final `model_7999.pt`. Their actual actor branch is **student**, float32 `[1,126]` → `[1,24]`, with joint-reference position/velocity commands. All exports include the empirical normalizer and use their own reference defaults, named joint order and action history.
|
||||
|
||||
Independent ONNX skills share `load/reset/run/dispose` and an exclusive full-body FSM: walk → settle → blend in → play → blend back to walk. Release movement keys before requesting a skill; movement interrupts it. Reference playback is simulation-clocked, freezes on pause, restarts on each activation, and never writes kinematic poses. **Wave plays its complete 4.36 s clip. Dance exposes only the validated first 10 s**: the previous dance checkpoint fell near 20 s during full 131.46 s playback; full-length playback of the updated checkpoint has not been qualified. These are trained policies, not scripted motion substitutes. Completed training does not imply exact training-simulator or hardware equivalence. See [RP1 integration and weight updates](docs/robots/rp1.md) and [completed-skills verification](docs/superpowers/verification/2026-10-29-rp1-completed-skills.md), plus the [23998 dance update](docs/superpowers/verification/2026-10-29-rp1-dance-23998.md).
|
||||
|
||||
**RP1 description asset licensing is not supplied in the upstream checkout. Local evaluation only; confirm rights before public deployment/redistribution.** Provenance and caveats are recorded in [the package SOURCE.md](app/public/robots/rp1/SOURCE.md).
|
||||
|
||||
## Development
|
||||
|
||||
Large binary assets (robot meshes, GLB models, ONNX policies) are stored
|
||||
with [Git LFS](https://git-lfs.com/). Clone with LFS installed, or pull
|
||||
the real files after a plain clone - otherwise the app boots against
|
||||
text pointer files and fails with errors like
|
||||
`SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON`
|
||||
(that string is the start of an LFS pointer, not your model):
|
||||
Binary robot meshes, ONNX policies and `.f32` motion samples use Git LFS:
|
||||
|
||||
```bash
|
||||
git lfs install # once per machine
|
||||
git lfs pull # fetch the actual binaries in an existing clone
|
||||
git lfs install
|
||||
git lfs pull
|
||||
cd app
|
||||
npm ci
|
||||
npm run dev # http://localhost:5173
|
||||
npm run build # app/dist/
|
||||
npm run preview # production bundle
|
||||
```
|
||||
|
||||
Use a Node version supported by Vite (this revision was tested with Node 24). The Dockerfile builds with Node 22 and serves the static bundle through nginx on port 8080; a Docker build itself is not part of the local browser verification.
|
||||
|
||||
### Verification
|
||||
|
||||
```bash
|
||||
cd app
|
||||
npm install
|
||||
npm run dev # dev server on http://localhost:5173
|
||||
npm run build # production bundle in app/dist/
|
||||
npm test # pure logic tests
|
||||
npm run validate:packages # schemas, World, paths, source hashes
|
||||
npx playwright install chromium
|
||||
npm run test:e2e # real browser / WASM + UI + regression + ownership tests
|
||||
npm run test:regression # accepted Microduck golden trajectories only
|
||||
npm run format:check
|
||||
npm audit
|
||||
```
|
||||
|
||||
The Space builds with the included `Dockerfile` (Vite build, served by
|
||||
nginx-unprivileged on port 8080). Static assets (meshes, policies, audio,
|
||||
images) live in `app/public/` and keep their historical URLs.
|
||||
`npm run baseline:record` writes **candidates** under `app/test-results/baseline-candidates/`; it never overwrites accepted fixtures. Review changes before accepting any new baseline. See [baseline provenance](app/test/fixtures/microduck/README.md).
|
||||
|
||||
For a running production server, set `TEST_BASE_URL` and run the product-facing tests, e.g. `TEST_BASE_URL=http://127.0.0.1:5175 npm run test:e2e -- chase-camera deployment simulation-shell robot-switching microban-walking microban-observation microduck-regression runtime-smoke`. Development-only fixture pages are deliberately not shipped in `dist/`.
|
||||
|
||||
For prefixed hosting, build and preview with `VITE_BASE=/play/`; `DEPLOY_PATH=/play/` selects that entry path for `deployment.spec.js`. Private HF authentication behavior beyond the retained same-origin asset signing has not been independently deployment-tested.
|
||||
|
||||
`?test=1` is an internal deterministic-step hook, not a normal launch mode. `?boot=1` is no longer required. Legacy `?move`, `?policy` and `?session` requests remain limited to the Microduck adapter; they do not load arbitrary Robot Packages or replace Microban's controller.
|
||||
|
||||
## Architecture and extension
|
||||
|
||||
- `app/public/robots/*/robot.json`: model, joint groups, observations, actions, skills, bindings and presentation.
|
||||
- `app/public/worlds/`: arena / flat World manifests.
|
||||
- `app/src/platform/`: schemas / loading, SimCore, observation and action pipelines, term registries, ONNX, PD backend, overlay skills, input, MJCF renderer and transactional runtime manager.
|
||||
- `app/src/robots/registry.js`: trusted bundled adapters; no remote JS execution.
|
||||
- `app/src/robots/microduck/runtime.js`: compatibility adapter retaining original skill / recovery quirks and GLB presentation while using shared runtimes, scheduler, input, observation / action mapping and actuation.
|
||||
- `app/src/game/worlds/arena/`: arena physics composition and rendering. `game/game.js` and `game/arena.js` are compatibility entry points, not generic engines.
|
||||
|
||||
A robot expressible with existing capabilities can be added by a Package and index entry, without a robot-id branch in the platform. Current generic scope is floating-base robots with scalar joint groups, unit-gear actuators, supported proprioceptive / joint-reference terms, ONNX primary control, independent episodic policies, simulation-clocked motion references, position targets and optional sinusoidal overlays. Unsupported capabilities are rejected, not silently simulated incorrectly. New capabilities require explicit registry / schema work.
|
||||
|
||||
See [Package authoring](docs/robots/package-authoring.md), [Microban details](docs/robots/microban.md), [approved design](docs/superpowers/specs/2026-10-27-multi-robot-platform-design.md), [implementation plan](docs/superpowers/plans/2026-10-27-multi-robot-platform-implementation.md) and [initial verification](docs/superpowers/verification/2026-10-27-multi-robot-platform.md) and [style/camera verification](docs/superpowers/verification/2026-10-28-style-and-chase-camera.md), plus [arena-style verification](docs/superpowers/verification/2026-10-28-arena-presentation.md) and [initial bounded-default verification](docs/superpowers/verification/2026-10-28-default-bounded-arena.md). Current size-adaptive behavior is documented in [robot-scaled arena verification](docs/superpowers/verification/2026-10-28-robot-scaled-arena.md).
|
||||
|
||||
## License
|
||||
|
||||
The app code is released under the [Apache License 2.0](LICENSE).
|
||||
The original application code is [Apache-2.0](LICENSE). Bundled third-party models, meshes, policies and samples retain their respective licenses; do **not** assume that every asset is Apache-2.0. Microban's copied XML retains its Apache-2.0 notice, and its upstream repository's mixed-license text, provenance and additional Apache notice are included in [`app/public/robots/microban/`](app/public/robots/microban/). Review those file-specific terms before redistribution. The bundled Anton font is SIL OFL-1.1; its notice is included at [`app/public/licenses/Anton-OFL.txt`](app/public/licenses/Anton-OFL.txt).
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
node_modules/
|
||||
dist/
|
||||
test-results/
|
||||
playwright-report/
|
||||
.playwright-cli/
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
test("arena appearance matches Microduck while Microban physics stays flat and World visuals dispose on switch", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
page.on("console", (m) => {
|
||||
if (m.type() === "error") errors.push(m.text());
|
||||
});
|
||||
await bootDuck(page);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
|
||||
).toBe(true);
|
||||
await page.evaluate(() => window.__gameApi.resume());
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.rl.data.time))
|
||||
.toBeGreaterThan(1);
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
await expect
|
||||
.poll(() =>
|
||||
page.evaluate(
|
||||
() => !!window.rl.scene.getObjectByName("arena-floor-presentation"),
|
||||
),
|
||||
)
|
||||
.toBe(true);
|
||||
const state = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
grid = r.scene.getObjectByName("arena-grid"),
|
||||
u = grid.material.uniforms,
|
||||
id = r.model.geom("platform_floor").id;
|
||||
let floor;
|
||||
r.scene.traverse((o) => {
|
||||
if (o.userData.geomId === id) floor = o;
|
||||
});
|
||||
window.__retiredArena = r.scene.getObjectByName("arena-floor-presentation");
|
||||
window.__arenaReleased = [];
|
||||
grid.geometry.addEventListener("dispose", () =>
|
||||
window.__arenaReleased.push("geometry"),
|
||||
);
|
||||
grid.material.addEventListener("dispose", () =>
|
||||
window.__arenaReleased.push("material"),
|
||||
);
|
||||
return {
|
||||
cell: u.uCell.value,
|
||||
section: u.uSection.value,
|
||||
color: u.uSectionColor.value.getHex(),
|
||||
reveal: u.uReveal.value,
|
||||
topo: u.uTopoScale.value,
|
||||
hiddenFloor: !floor.visible,
|
||||
floorType: r.model.geom_type[id],
|
||||
friction: Array.from(r.model.geom_friction.slice(id * 3, id * 3 + 3)),
|
||||
gravity: Array.from(r.model.opt.gravity),
|
||||
heightfields: r.model.nhfield,
|
||||
finite: Array.from(r.data.qpos).every(Number.isFinite),
|
||||
fallen: r.fallen,
|
||||
};
|
||||
});
|
||||
expect(state).toEqual({
|
||||
cell: 0.1 * (0.33 / 0.27),
|
||||
section: 0.6 * (0.33 / 0.27),
|
||||
color: 0xf7e6cb,
|
||||
reveal: 1,
|
||||
topo: 0,
|
||||
hiddenFloor: true,
|
||||
floorType: 0,
|
||||
friction: [1, 0.005, 0.0001],
|
||||
gravity: [0, 0, -9.81],
|
||||
heightfields: 0,
|
||||
finite: true,
|
||||
fallen: false,
|
||||
});
|
||||
await page.screenshot({ path: info.outputPath("microban-arena.png") });
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[0] = 4;
|
||||
r.data.qpos[1] = -3;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
await expect
|
||||
.poll(() =>
|
||||
page.evaluate(() => {
|
||||
const g = window.rl.scene.getObjectByName("arena-grid");
|
||||
return [
|
||||
g.position.x,
|
||||
g.position.z,
|
||||
g.material.uniforms.uFocus.value.x,
|
||||
g.material.uniforms.uFocus.value.z,
|
||||
];
|
||||
}),
|
||||
)
|
||||
.toEqual([4, 3, 4, 3]);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microduck-legs")),
|
||||
).toBe(true);
|
||||
expect(await page.evaluate(() => window.__arenaReleased.sort())).toEqual([
|
||||
"geometry",
|
||||
"material",
|
||||
]);
|
||||
expect(await page.evaluate(() => window.__retiredArena.parent === null)).toBe(
|
||||
true,
|
||||
);
|
||||
expect(await page.evaluate(() => window.rl.chaseCam)).toBe(true);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
@@ -0,0 +1,183 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
import { arenaWalls } from "../src/platform/worlds/arena.js";
|
||||
const boundary = { half_extent: 2.25, wall_height: 0.25, wall_thickness: 0.05 };
|
||||
test("all three robots keep Microduck's arena-to-body proportions; visual and physical walls agree", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await bootDuck(page);
|
||||
for (const [id, scale] of [
|
||||
["microduck-legs", 1],
|
||||
["microban", 0.33 / 0.27],
|
||||
["rp1", 1.32 / 0.27],
|
||||
]) {
|
||||
if (id !== "microduck-legs")
|
||||
expect(
|
||||
await page.evaluate((id) => window.__gameApi.switchRobot(id), id),
|
||||
).toBe(true);
|
||||
const fitted = Object.fromEntries(
|
||||
Object.entries(boundary).map(([k, v]) => [k, v * scale]),
|
||||
);
|
||||
const state = await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return {
|
||||
id: r.world.id,
|
||||
boundary: r.world.boundary,
|
||||
scale: r.world.scale,
|
||||
following: r.chaseCam,
|
||||
grid: r.scene.getObjectByName("arena-grid")
|
||||
? {
|
||||
cell: r.scene.getObjectByName("arena-grid").material.uniforms
|
||||
.uCell.value,
|
||||
fade: r.scene.getObjectByName("arena-grid").material.uniforms
|
||||
.uFadeDist.value,
|
||||
}
|
||||
: null,
|
||||
walls: ["wall_px", "wall_nx", "wall_py", "wall_ny"].map((name) => {
|
||||
const g = r.model.geom(name).id;
|
||||
return {
|
||||
name,
|
||||
pos: Array.from(r.model.geom_pos.slice(g * 3, g * 3 + 3)),
|
||||
size: Array.from(r.model.geom_size.slice(g * 3, g * 3 + 3)),
|
||||
type: r.model.geom_type[g],
|
||||
body: r.model.geom_bodyid[g],
|
||||
};
|
||||
}),
|
||||
visuals: [0, 1, 2, 3].map((i) =>
|
||||
r.scene.getObjectByName(`arena-boundary-${i}`).position.toArray(),
|
||||
),
|
||||
};
|
||||
});
|
||||
expect(state.id).toBe("arena");
|
||||
expect(state.boundary).toEqual(fitted);
|
||||
expect(state.scale).toBe(scale);
|
||||
expect(state.following).toBe(true);
|
||||
expect(state.walls).toEqual(
|
||||
arenaWalls(fitted).map((w) => ({ ...w, type: 6, body: 0 })),
|
||||
);
|
||||
expect(state.visuals).toEqual([
|
||||
[fitted.half_extent, fitted.wall_height / 2, 0],
|
||||
[-fitted.half_extent, fitted.wall_height / 2, 0],
|
||||
[0, fitted.wall_height / 2, fitted.half_extent],
|
||||
[0, fitted.wall_height / 2, -fitted.half_extent],
|
||||
]);
|
||||
if (state.grid) {
|
||||
expect(state.grid.cell).toBeCloseTo(0.1 * scale, 8);
|
||||
expect(state.grid.fade).toBeCloseTo(3 * scale, 8);
|
||||
}
|
||||
}
|
||||
// QA overview only; normal entry remains the rear chase framing above.
|
||||
await page.locator("canvas").click({ position: { x: 1000, y: 700 } });
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
const scale = r.world.scale;
|
||||
r.controls.maxDistance = 8 * scale;
|
||||
r.camera.position.set(-3 * scale, 3 * scale, 3 * scale);
|
||||
r.controls.target.set(0, 0, 0);
|
||||
r.controls.update();
|
||||
});
|
||||
await page.screenshot({ path: info.outputPath("bounded-arena.png") });
|
||||
});
|
||||
test("a future Package with no world field automatically loads the bounded default", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.route("**/robots/index.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
entries = await response.json();
|
||||
entries.push({
|
||||
id: "future-bot",
|
||||
family: "future-bot",
|
||||
name: "Future Robot",
|
||||
manifest: "microban/robot.json?future=1",
|
||||
});
|
||||
await route.fulfill({ response, json: entries });
|
||||
});
|
||||
await page.route("**/robots/microban/robot.json?future=1", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
config.id = config.family = "future-bot";
|
||||
delete config.presentation.world;
|
||||
await route.fulfill({ response, json: config });
|
||||
});
|
||||
await bootDuck(page);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("future-bot")),
|
||||
).toBe(true);
|
||||
expect(
|
||||
await page.evaluate(() => ({
|
||||
id: window.__store.getState().robotId,
|
||||
world: window.rl.world.id,
|
||||
bounds: window.rl.world.boundary,
|
||||
})),
|
||||
).toEqual({
|
||||
id: "future-bot",
|
||||
world: "arena",
|
||||
bounds: Object.fromEntries(
|
||||
Object.entries(boundary).map(([k, v]) => [k, v * (0.33 / 0.27)]),
|
||||
),
|
||||
});
|
||||
});
|
||||
for (const robot of [
|
||||
{ id: "microban", forward: 0.15, pad: 0.2 },
|
||||
{ id: "rp1", forward: 0.4, pad: 0.35 },
|
||||
])
|
||||
test(`${robot.id}: real scaled wall contacts block motion on all four sides without coordinate clamping`, async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await bootDuck(page);
|
||||
expect(
|
||||
await page.evaluate((id) => window.__gameApi.switchRobot(id), robot.id),
|
||||
).toBe(true);
|
||||
const results = await page.evaluate(async (robot) => {
|
||||
const r = window.rl,
|
||||
report = [],
|
||||
half = r.world.boundary.half_extent;
|
||||
for (const [name, axis, sign, yaw] of [
|
||||
["wall_px", 0, 1, 0],
|
||||
["wall_nx", 0, -1, Math.PI],
|
||||
["wall_py", 1, 1, Math.PI / 2],
|
||||
["wall_ny", 1, -1, -Math.PI / 2],
|
||||
]) {
|
||||
await r.resetSim();
|
||||
const id = r.model.geom(name).id;
|
||||
r.data.qpos[axis] = sign * (half - robot.pad);
|
||||
r.data.qpos[3] = Math.cos(yaw / 2);
|
||||
r.data.qpos[6] = Math.sin(yaw / 2);
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
r.command.set([robot.forward, 0, 0]);
|
||||
let contacts = 0,
|
||||
max = sign * r.data.qpos[axis];
|
||||
for (let tick = 0; tick < 30; tick++) {
|
||||
await r.step(5);
|
||||
max = Math.max(max, sign * r.data.qpos[axis]);
|
||||
const list = r.data.contact;
|
||||
for (let i = 0; i < r.data.ncon; i++) {
|
||||
const c = list.get(i);
|
||||
if (c.geom1 === id || c.geom2 === id) contacts++;
|
||||
c.delete();
|
||||
}
|
||||
list.delete();
|
||||
}
|
||||
report.push({
|
||||
name,
|
||||
contacts,
|
||||
max,
|
||||
half,
|
||||
time: r.data.time,
|
||||
fallen: r.fallen,
|
||||
finite: Array.from(r.data.qpos).every(Number.isFinite),
|
||||
});
|
||||
}
|
||||
return report;
|
||||
}, robot);
|
||||
for (const r of results) {
|
||||
expect(r.contacts, JSON.stringify(r)).toBeGreaterThan(0);
|
||||
expect(r.max, JSON.stringify(r)).toBeLessThan(r.half);
|
||||
expect(r.time).toBeCloseTo(3, 6);
|
||||
expect(r.finite).toBe(true);
|
||||
}
|
||||
await info.attach("wall-contacts.json", {
|
||||
body: JSON.stringify(results, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,129 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
async function pose(page) {
|
||||
return page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
q = r.data.qpos,
|
||||
offset = r.camera.position.clone().sub(r.controls.target),
|
||||
h = Math.hypot(offset.x, offset.z),
|
||||
yaw = Math.atan2(
|
||||
2 * (q[3] * q[6] + q[4] * q[5]),
|
||||
1 - 2 * (q[5] ** 2 + q[6] ** 2),
|
||||
);
|
||||
return {
|
||||
rear: (-Math.cos(yaw) * offset.x + Math.sin(yaw) * offset.z) / h,
|
||||
pitch: Math.atan2(offset.y, h),
|
||||
distance: offset.length(),
|
||||
following: r.chaseCam,
|
||||
time: r.data.time,
|
||||
};
|
||||
});
|
||||
}
|
||||
async function rear(page) {
|
||||
await expect
|
||||
.poll(async () => {
|
||||
const p = await pose(page);
|
||||
return (
|
||||
p.following &&
|
||||
p.rear > 0.999 &&
|
||||
Math.abs(p.pitch - 0.42) < 0.005 &&
|
||||
Math.abs(p.distance - 0.8) < 0.005
|
||||
);
|
||||
})
|
||||
.toBe(true);
|
||||
}
|
||||
async function orbit(page) {
|
||||
const canvas = page.locator("canvas"),
|
||||
rect = await canvas.boundingBox();
|
||||
await page.mouse.move(rect.x + rect.width * 0.7, rect.y + rect.height * 0.55);
|
||||
await page.mouse.down();
|
||||
await page.mouse.move(
|
||||
rect.x + rect.width * 0.85,
|
||||
rect.y + rect.height * 0.7,
|
||||
{ steps: 8 },
|
||||
);
|
||||
await page.mouse.up();
|
||||
expect((await pose(page)).following).toBe(false);
|
||||
}
|
||||
test("both robots default to the same rear camera and comic UI; Microban keeps flat World and valid controls", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await bootDuck(page);
|
||||
await rear(page);
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban"));
|
||||
await rear(page);
|
||||
expect(
|
||||
await page.evaluate(() => window.__store.getState().presentationTheme),
|
||||
).toBe("comic");
|
||||
await expect(
|
||||
page.getByRole("navigation", { name: "Simulation controls" }),
|
||||
).toHaveCSS("border-top-width", "2px");
|
||||
await expect(
|
||||
page.getByRole("group", { name: "Scene line colours" }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Rollers", exact: true }),
|
||||
).toHaveCount(0);
|
||||
await expect(
|
||||
page.getByText("Drag robot / geometry: apply force"),
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole("status")).toContainText("Simplified actuation");
|
||||
expect(
|
||||
await page.evaluate(() => window.rl.model.geom("platform_floor").id),
|
||||
).toBeGreaterThanOrEqual(0);
|
||||
await page.screenshot({ path: info.outputPath("microban-chase.png") });
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microduck-legs"));
|
||||
await rear(page);
|
||||
await expect(
|
||||
page.getByRole("group", { name: "Scene line colours" }),
|
||||
).toBeVisible();
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
for (const id of ["microban", "microduck-legs"])
|
||||
test(`${id}: orbit detaches; C restores behind current heading, repeatedly and while paused`, async ({
|
||||
page,
|
||||
}) => {
|
||||
await bootDuck(page);
|
||||
if (id === "microban")
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban"));
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
await orbit(page);
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[0] = 1.25;
|
||||
r.data.qpos[1] = -0.5;
|
||||
r.data.qpos[3] = Math.cos(Math.PI / 4);
|
||||
r.data.qpos[4] = r.data.qpos[5] = 0;
|
||||
r.data.qpos[6] = Math.sin(Math.PI / 4);
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
const time = (await pose(page)).time;
|
||||
await page.keyboard.press("c");
|
||||
await rear(page);
|
||||
expect((await pose(page)).time).toBe(time);
|
||||
await page.keyboard.press("c");
|
||||
await rear(page);
|
||||
await orbit(page);
|
||||
await page
|
||||
.getByRole("button", { name: "Restore chase camera", exact: false })
|
||||
.click();
|
||||
await rear(page);
|
||||
expect(await page.evaluate(() => window.__store.getState().paused)).toBe(
|
||||
true,
|
||||
);
|
||||
if (id === "microban") {
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[3] = 0;
|
||||
r.data.qpos[6] = 1;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
// Microduck-style yaw hysteresis suppresses gait wobble; continuous
|
||||
// following may settle a few degrees off yaw. C above is exact.
|
||||
await expect
|
||||
.poll(async () => (await pose(page)).rear)
|
||||
.toBeGreaterThan(0.99);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test.use({ video: { mode: "on", size: { width: 1280, height: 800 } } });
|
||||
test("deployed assets respect the base path and all three Robot Packages boot", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const failures = [],
|
||||
errors = [],
|
||||
requests = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
page.on("response", (r) => {
|
||||
if (
|
||||
r.status() >= 400 &&
|
||||
new URL(r.url()).origin === new URL(page.url()).origin
|
||||
)
|
||||
failures.push(`${r.status()} ${r.url()}`);
|
||||
});
|
||||
page.on("request", (r) => requests.push(r.url()));
|
||||
const prefix = process.env.DEPLOY_PATH || "/";
|
||||
await page.goto(prefix);
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.waitForTimeout(500); // let the physical toys settle
|
||||
const toys = await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return {
|
||||
count: r.interactiveProps.length,
|
||||
visible: r.scene.getObjectByName("interactive-props").visible,
|
||||
hasBall:
|
||||
r.mujoco.mj_name2id(
|
||||
r.model,
|
||||
r.mujoco.mjtObj.mjOBJ_BODY.value,
|
||||
"ball",
|
||||
) >= 0,
|
||||
};
|
||||
});
|
||||
expect(toys.count).toBeGreaterThanOrEqual(5);
|
||||
expect(toys.count).toBeLessThanOrEqual(7);
|
||||
expect(toys.visible).toBe(true);
|
||||
expect(toys.hasBall).toBe(false);
|
||||
await page.screenshot({ path: info.outputPath("microduck.png") });
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microban");
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe("microban");
|
||||
await expect(page.getByRole("status")).toContainText("Simplified actuation");
|
||||
await page.waitForTimeout(500);
|
||||
await page.screenshot({ path: info.outputPath("microban.png") });
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("rp1");
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe("rp1");
|
||||
await expect(page.getByRole("status")).toContainText("Skill: walk");
|
||||
await page.screenshot({ path: info.outputPath("rp1.png") });
|
||||
expect(errors).toEqual([]);
|
||||
expect(failures).toEqual([]);
|
||||
const origin = new URL(page.url()).origin;
|
||||
expect(requests.filter((url) => new URL(url).origin !== origin)).toEqual([]);
|
||||
expect(
|
||||
requests.filter(
|
||||
(url) =>
|
||||
url.startsWith(origin) && !new URL(url).pathname.startsWith(prefix),
|
||||
),
|
||||
).toEqual([]);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Microban WASM physics probe</title>
|
||||
</head>
|
||||
<body>
|
||||
<pre id="status">Loading actual MuJoCo and ONNX WASM…</pre>
|
||||
<script type="module" src="./microban-probe.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
// Render-free integration probe uses the SAME runtime as the product; no
|
||||
// second observation builder/PD implementation can drift from production.
|
||||
import * as THREE from "three";
|
||||
import { RobotRuntime } from "../../src/platform/runtime/RobotRuntime.js";
|
||||
import {
|
||||
loadPackage,
|
||||
loadWorld,
|
||||
} from "../../src/platform/loader/PackageLoader.js";
|
||||
window.probeReady = (async () => {
|
||||
const pkg = await loadPackage(
|
||||
`${import.meta.env.BASE_URL}robots/microban/robot.json`,
|
||||
),
|
||||
world = await loadWorld("flat");
|
||||
const runtime = await RobotRuntime.load({
|
||||
pkg,
|
||||
world,
|
||||
scene: new THREE.Group(),
|
||||
camera: new THREE.PerspectiveCamera(),
|
||||
renderer: null,
|
||||
});
|
||||
const { sim, ctx } = runtime;
|
||||
const state = () => {
|
||||
const a = sim.rootQpos,
|
||||
q = sim.data.qpos,
|
||||
b = sim.root * 4,
|
||||
quat = sim.data.xquat,
|
||||
w = quat[b],
|
||||
x = quat[b + 1],
|
||||
y = quat[b + 2],
|
||||
z = quat[b + 3];
|
||||
return {
|
||||
time: sim.data.time,
|
||||
pos: Array.from(q.slice(a, a + 3)),
|
||||
gravity: [
|
||||
2 * (w * y - x * z),
|
||||
-2 * (y * z + w * x),
|
||||
-(1 - 2 * (x * x + y * y)),
|
||||
],
|
||||
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
|
||||
};
|
||||
};
|
||||
window.probe = {
|
||||
model: sim.model,
|
||||
data: sim.data,
|
||||
command: runtime.input.command,
|
||||
state,
|
||||
buildObs: () => {
|
||||
ctx.command.set(runtime.input.command);
|
||||
return runtime.obs.write().obs;
|
||||
},
|
||||
reset: () => runtime.reset(),
|
||||
step: async (count) => {
|
||||
await runtime.scheduler.step(count);
|
||||
if (runtime.fallen) throw new Error(`Fallen at ${sim.data.time}`);
|
||||
return state();
|
||||
},
|
||||
dispose: () => runtime.dispose(),
|
||||
};
|
||||
document.querySelector("#status").textContent =
|
||||
"Ready: generic runtime / 19 joints / 18 actor / 63 obs";
|
||||
})().catch((error) => {
|
||||
window.probeError = error.stack;
|
||||
document.querySelector("#status").textContent = error.stack;
|
||||
throw error;
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<script type="module">
|
||||
import { loadRuntimes } from "../../src/platform/runtime/runtimes.js";
|
||||
import { RigRenderer } from "../../src/platform/render/RigRenderer.js";
|
||||
import { resolveAddresses } from "../../src/platform/sim/SimCore.js";
|
||||
import * as THREE from "three";
|
||||
try {
|
||||
const { mujoco } = await loadRuntimes();
|
||||
const xml = `<mujoco><asset><mesh name="tetra" scale="2 1 1" vertex="0 0 0 .04 0 0 0 .04 0 0 0 .04" face="0 2 1 0 1 3 0 3 2 1 2 3"/></asset><worldbody><geom type="plane" size="1 1 .01"/><body pos="0 0 .4"><freejoint/><geom group="2" type="box" size=".02 .03 .04" rgba=".1 .2 .3 1"/><geom group="2" type="sphere" pos=".1 0 0" size=".02"/><geom group="2" type="mesh" pos=".2 0 0" mesh="tetra"/><geom group="2" type="capsule" pos=".3 0 0" size=".01 .03"/><geom group="2" type="cylinder" pos=".4 0 0" size=".02 .04"/><body pos="0 .1 0"><joint name="a"/><geom group="2" type="sphere" size=".01"/><body pos="0 .1 0"><joint name="b"/><geom group="2" type="sphere" size=".01"/></body></body></body></worldbody><actuator><motor name="motor_b" joint="b"/><motor name="motor_a" joint="a"/></actuator></mujoco>`;
|
||||
const model = mujoco.MjModel.from_xml_string(xml),
|
||||
data = new mujoco.MjData(model);
|
||||
data.qpos.set([1, 2, 3, Math.cos(0.3), 0, 0, Math.sin(0.3)], 0);
|
||||
mujoco.mj_forward(model, data);
|
||||
const rig = new RigRenderer(model, data, { groups: [2] });
|
||||
rig.root.updateMatrixWorld(true);
|
||||
let maxError = 0;
|
||||
for (const { id, mesh } of rig.items) {
|
||||
const p = new THREE.Vector3();
|
||||
mesh.getWorldPosition(p);
|
||||
const expected = new THREE.Vector3(
|
||||
data.geom_xpos[id * 3],
|
||||
data.geom_xpos[id * 3 + 2],
|
||||
-data.geom_xpos[id * 3 + 1],
|
||||
);
|
||||
maxError = Math.max(maxError, p.distanceTo(expected));
|
||||
if (model.geom_type[id] === 7) {
|
||||
const attr = mesh.geometry.getAttribute("position"),
|
||||
v = new THREE.Vector3(attr.getX(0), attr.getY(0), attr.getZ(0)),
|
||||
r = data.geom_xmat,
|
||||
a = id * 9,
|
||||
b = id * 3;
|
||||
const raw = new THREE.Vector3(
|
||||
r[a] * v.x + r[a + 1] * v.y + r[a + 2] * v.z + data.geom_xpos[b],
|
||||
r[a + 3] * v.x +
|
||||
r[a + 4] * v.y +
|
||||
r[a + 5] * v.z +
|
||||
data.geom_xpos[b + 1],
|
||||
r[a + 6] * v.x +
|
||||
r[a + 7] * v.y +
|
||||
r[a + 8] * v.z +
|
||||
data.geom_xpos[b + 2],
|
||||
);
|
||||
const actual = mesh.localToWorld(v);
|
||||
maxError = Math.max(
|
||||
maxError,
|
||||
actual.distanceTo(new THREE.Vector3(raw.x, raw.z, -raw.y)),
|
||||
);
|
||||
}
|
||||
}
|
||||
const addresses = resolveAddresses(mujoco, model, ["a", "b"]);
|
||||
let missing = "";
|
||||
try {
|
||||
resolveAddresses(mujoco, model, ["absent"]);
|
||||
} catch (e) {
|
||||
missing = e.message;
|
||||
}
|
||||
window.renderResult = {
|
||||
maxError,
|
||||
count: rig.items.length,
|
||||
a: addresses.get("a").actuator,
|
||||
b: addresses.get("b").actuator,
|
||||
missing,
|
||||
color: rig.items[1].mesh.material.color.toArray(),
|
||||
};
|
||||
rig.dispose();
|
||||
data.delete();
|
||||
model.delete();
|
||||
} catch (e) {
|
||||
window.renderError = e.stack;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test("mounted IMU gyro stays in site frame while projected gravity uses trunk frame", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microban");
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe("microban");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
const obs = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.pause();
|
||||
r.data.qpos.set([Math.cos(Math.PI / 8), 0, Math.sin(Math.PI / 8), 0], 3);
|
||||
r.data.qvel.set([1, 2, 3], 3);
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
return Array.from(r.buildObs());
|
||||
});
|
||||
expect(obs.length).toBe(63);
|
||||
for (const [i, value] of [2, -3, -1].entries())
|
||||
expect(obs[i]).toBeCloseTo(value, 5);
|
||||
expect(obs[3]).toBeCloseTo(Math.SQRT1_2, 5);
|
||||
expect(obs[4]).toBeCloseTo(0, 5);
|
||||
expect(obs[5]).toBeCloseTo(-Math.SQRT1_2, 5);
|
||||
});
|
||||
@@ -0,0 +1,37 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test("Microban actual WASM simplified PD stands, walks and turns without reset", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
await page.goto("/e2e/fixtures/microban-probe.html");
|
||||
await page.waitForFunction(() => window.probe || window.probeError);
|
||||
expect(await page.evaluate(() => window.probeError)).toBeUndefined();
|
||||
const result = await page.evaluate(async () => {
|
||||
const p = window.probe,
|
||||
segments = [];
|
||||
for (const [name, seconds, vx, wz] of [
|
||||
["stand", 10, 0, 0],
|
||||
["forward", 20, 0.15, 0],
|
||||
["rest", 3, 0, 0],
|
||||
["backward", 10, -0.1, 0],
|
||||
["rest", 3, 0, 0],
|
||||
["left", 10, 0, 0.6],
|
||||
["rest", 3, 0, 0],
|
||||
["right", 10, 0, -0.6],
|
||||
]) {
|
||||
const before = p.state();
|
||||
p.command.set([vx, 0, wz]);
|
||||
await p.step(seconds * 50);
|
||||
segments.push({ name, before, after: p.state() });
|
||||
}
|
||||
return segments;
|
||||
});
|
||||
await testInfo.attach("microban-probe.json", {
|
||||
body: JSON.stringify(result, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
const forward = result.find((s) => s.name === "forward");
|
||||
expect(forward.after.pos[0] - forward.before.pos[0]).toBeGreaterThan(0.5);
|
||||
const backward = result.find((s) => s.name === "backward");
|
||||
expect(backward.after.pos[0] - backward.before.pos[0]).toBeLessThan(-0.2);
|
||||
console.log(JSON.stringify(result));
|
||||
});
|
||||
@@ -0,0 +1,212 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
async function boot(page) {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
}
|
||||
test("20 textured GLBs replace only Microban visuals, align to original geometry and follow all bodies", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (error) => errors.push(error.message));
|
||||
await boot(page);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
|
||||
).toBe(true);
|
||||
const inspect = () =>
|
||||
page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
layer = r.scene.getObjectByName("body-visuals"),
|
||||
rig = layer.parent;
|
||||
rig.updateMatrixWorld(true);
|
||||
let maxFrameError = 0,
|
||||
maxBoundsError = 0,
|
||||
maps = 0,
|
||||
colorMaps = 0,
|
||||
meshes = 0,
|
||||
hidden = 0;
|
||||
const bounds = (objects, frame) => {
|
||||
const lo = [Infinity, Infinity, Infinity],
|
||||
hi = [-Infinity, -Infinity, -Infinity];
|
||||
const inverse = frame.matrixWorld.clone().invert(),
|
||||
vector = frame.position.clone();
|
||||
for (const mesh of objects) {
|
||||
const transform = inverse.clone().multiply(mesh.matrixWorld),
|
||||
attr = mesh.geometry.attributes.position;
|
||||
for (let i = 0; i < attr.count; i++) {
|
||||
vector.fromBufferAttribute(attr, i).applyMatrix4(transform);
|
||||
const v = vector.toArray();
|
||||
for (let axis = 0; axis < 3; axis++) {
|
||||
lo[axis] = Math.min(lo[axis], v[axis]);
|
||||
hi[axis] = Math.max(hi[axis], v[axis]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return [...lo, ...hi];
|
||||
};
|
||||
for (const frame of layer.children) {
|
||||
const body = frame.name.slice("body-visual:".length),
|
||||
id = r.mujoco.mj_name2id(
|
||||
r.model,
|
||||
r.mujoco.mjtObj.mjOBJ_BODY.value,
|
||||
body,
|
||||
);
|
||||
const p = Array.from(r.data.xpos.slice(id * 3, id * 3 + 3));
|
||||
const q = Array.from(r.data.xquat.slice(id * 4, id * 4 + 4));
|
||||
maxFrameError = Math.max(
|
||||
maxFrameError,
|
||||
...p.map((v, i) => Math.abs(v - frame.position.toArray()[i])),
|
||||
...[q[1], q[2], q[3], q[0]].map((v, i) =>
|
||||
Math.abs(v - frame.quaternion.toArray()[i]),
|
||||
),
|
||||
);
|
||||
const originals = rig.children.filter(
|
||||
(mesh) =>
|
||||
mesh.userData.geomId !== undefined &&
|
||||
r.model.geom_bodyid[mesh.userData.geomId] === id,
|
||||
);
|
||||
const replacements = [];
|
||||
frame.traverse((object) => {
|
||||
if (!object.isMesh) return;
|
||||
meshes++;
|
||||
replacements.push(object);
|
||||
const materials = [object.material].flat();
|
||||
maps += materials.filter(
|
||||
(material) => material.normalMap?.image?.width > 0,
|
||||
).length;
|
||||
colorMaps += materials.filter(
|
||||
(material) => material.map?.image?.width > 0,
|
||||
).length;
|
||||
});
|
||||
hidden += originals.filter((mesh) => !mesh.visible).length;
|
||||
const oldBounds = bounds(originals, frame),
|
||||
newBounds = bounds(replacements, frame);
|
||||
maxBoundsError = Math.max(
|
||||
maxBoundsError,
|
||||
...oldBounds.map((v, i) => Math.abs(v - newBounds[i])),
|
||||
);
|
||||
}
|
||||
return {
|
||||
count: layer.children.length,
|
||||
maps,
|
||||
colorMaps,
|
||||
meshes,
|
||||
hidden,
|
||||
maxFrameError,
|
||||
maxBoundsError,
|
||||
obs: r.buildObs().length,
|
||||
};
|
||||
});
|
||||
const initial = await inspect();
|
||||
console.log("Microban visual alignment", initial);
|
||||
expect(initial.count).toBe(20);
|
||||
expect(initial.maps).toBeGreaterThanOrEqual(20);
|
||||
expect(initial.colorMaps).toBeGreaterThanOrEqual(1);
|
||||
expect(initial.hidden).toBeGreaterThan(20);
|
||||
expect(initial.maxFrameError).toBeLessThan(1e-12);
|
||||
expect(initial.maxBoundsError).toBeLessThan(0.0031);
|
||||
expect(initial.obs).toBe(63);
|
||||
// Change root yaw and every hinge, including head: no bind-pose-only rig.
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[3] = Math.cos(0.4);
|
||||
r.data.qpos[6] = Math.sin(0.4);
|
||||
for (let i = 7; i < r.model.nq; i++) r.data.qpos[i] += 0.12;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
await page.waitForTimeout(150);
|
||||
const articulated = await inspect();
|
||||
expect(articulated.maxFrameError).toBeLessThan(1e-12);
|
||||
expect(articulated.maxBoundsError).toBeLessThan(0.0031);
|
||||
await page.evaluate(() => window.rl.resetSim());
|
||||
await page.waitForTimeout(150);
|
||||
// Front 3/4 view for a useful visual acceptance artifact.
|
||||
await page.evaluate(() => {
|
||||
window.rl.camera.position.set(0.58, 0.38, 0.58);
|
||||
window.rl.controls.target.set(0, 0.17, 0);
|
||||
window.rl.controls.update();
|
||||
});
|
||||
await page.waitForTimeout(200);
|
||||
const screenshot = info.outputPath("textured-microban.png");
|
||||
await page.screenshot({ path: screenshot });
|
||||
await info.attach("textured-microban.png", {
|
||||
path: screenshot,
|
||||
contentType: "image/png",
|
||||
});
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
test("failed visual candidate rolls back without hiding the old robot; retry loads textures", async ({
|
||||
page,
|
||||
}) => {
|
||||
await boot(page);
|
||||
const before = await page.evaluate(
|
||||
() => window.__gameApi.diagnostics().sceneChildren,
|
||||
);
|
||||
let fail = true;
|
||||
await page.route(
|
||||
"**/robots/microban/visuals/LINK10__visual_0__LINK10.glb",
|
||||
(route) =>
|
||||
fail
|
||||
? route.fulfill({ status: 404, body: "missing visual" })
|
||||
: route.continue(),
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
|
||||
).toBe(false);
|
||||
expect(await page.evaluate(() => window.__store.getState().robotId)).toBe(
|
||||
"microduck-legs",
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.diagnostics().sceneChildren),
|
||||
).toBe(before);
|
||||
expect(
|
||||
await page.evaluate(
|
||||
() => window.rl.scene.getObjectByName("body-visuals") === undefined,
|
||||
),
|
||||
).toBe(true);
|
||||
fail = false;
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
|
||||
).toBe(true);
|
||||
expect(
|
||||
await page.evaluate(
|
||||
() => window.rl.scene.getObjectByName("body-visuals").children.length,
|
||||
),
|
||||
).toBe(20);
|
||||
});
|
||||
test("visual replacement leaves deterministic physics and ONNX actions unchanged", async ({
|
||||
page,
|
||||
}) => {
|
||||
await boot(page);
|
||||
let textured = false;
|
||||
await page.route("**/robots/microban/robot.json", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
if (!textured) delete config.render.body_visuals;
|
||||
await route.fulfill({ json: config });
|
||||
});
|
||||
async function run() {
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
|
||||
).toBe(true);
|
||||
return page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.resetSim();
|
||||
await r.step(80);
|
||||
return {
|
||||
qpos: Array.from(r.data.qpos),
|
||||
qvel: Array.from(r.data.qvel),
|
||||
action: Array.from(r.lastAction),
|
||||
};
|
||||
});
|
||||
}
|
||||
const white = await run();
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microduck-legs")),
|
||||
).toBe(true);
|
||||
textured = true;
|
||||
const visual = await run();
|
||||
expect(visual).toEqual(white);
|
||||
});
|
||||
@@ -0,0 +1,181 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
const boot = async (page, world) => {
|
||||
if (world)
|
||||
await page.route("**/robots/microban/robot.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
config.presentation.world = world;
|
||||
await route.fulfill({ response, json: config });
|
||||
});
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microban");
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe("microban");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
};
|
||||
for (const mode of [
|
||||
{ id: "bounded", forward: 8, back: 8, seconds: 70 },
|
||||
{
|
||||
id: "unbounded-diagnostic",
|
||||
forward: 20,
|
||||
back: 10,
|
||||
seconds: 84,
|
||||
world: "flat",
|
||||
},
|
||||
])
|
||||
test(`three ${mode.seconds}s physics trials (${mode.id}): stand, forward, back, turn, and parallel head`, async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await boot(page, mode.world);
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
const report = await page.evaluate(async (mode) => {
|
||||
const results = [],
|
||||
r = window.rl;
|
||||
const pose = () => {
|
||||
const [w, x, y, z] = r.data.qpos.slice(3, 7);
|
||||
return {
|
||||
time: r.data.time,
|
||||
pos: Array.from(r.data.qpos.slice(0, 3)),
|
||||
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
|
||||
head: r.data.qpos[r.model.jnt("head").qposadr],
|
||||
};
|
||||
};
|
||||
for (let trial = 0; trial < 3; trial++) {
|
||||
await r.resetSim();
|
||||
const segments = [];
|
||||
for (const [name, seconds, vx, wz] of [
|
||||
["stand", 10, 0, 0],
|
||||
["forward", mode.forward, 0.15, 0],
|
||||
["rest", 3, 0, 0],
|
||||
["backward", mode.back, -0.1, 0],
|
||||
["rest", 3, 0, 0],
|
||||
["left", 10, 0, 0.6],
|
||||
["rest", 3, 0, 0],
|
||||
["right", 10, 0, -0.6],
|
||||
["rest", 3, 0, 0],
|
||||
["head_walk", 10, 0.15, 0],
|
||||
["head_stop", 2, 0.15, 0],
|
||||
]) {
|
||||
const before = pose();
|
||||
r.command.set([vx, 0, wz]);
|
||||
if (name.startsWith("head_")) {
|
||||
const previous = Array.from(r.lastAction);
|
||||
r.toggle("head");
|
||||
if (previous.some((v, i) => v !== r.lastAction[i]))
|
||||
throw new Error("head toggle mutated policy history");
|
||||
}
|
||||
let yaw = 0,
|
||||
previous = before.yaw,
|
||||
minHead = Infinity,
|
||||
maxHead = -Infinity,
|
||||
minHeight = Infinity;
|
||||
for (let i = 0; i < seconds * 10; i++) {
|
||||
await r.step(5);
|
||||
const p = pose();
|
||||
let delta = p.yaw - previous;
|
||||
while (delta > Math.PI) delta -= 2 * Math.PI;
|
||||
while (delta < -Math.PI) delta += 2 * Math.PI;
|
||||
yaw += delta;
|
||||
previous = p.yaw;
|
||||
minHead = Math.min(minHead, p.head);
|
||||
maxHead = Math.max(maxHead, p.head);
|
||||
minHeight = Math.min(minHeight, p.pos[2]);
|
||||
if (r.fallen)
|
||||
throw new Error(`Fallen trial ${trial} ${name} at ${p.time}`);
|
||||
if (
|
||||
mode.id === "bounded" &&
|
||||
Math.max(Math.abs(p.pos[0]), Math.abs(p.pos[1])) >
|
||||
r.world.boundary.half_extent - 0.05
|
||||
)
|
||||
throw new Error(
|
||||
`Bounded gait trial reached a wall: ${name} ${p.pos}`,
|
||||
);
|
||||
}
|
||||
const after = pose(),
|
||||
dx = after.pos[0] - before.pos[0],
|
||||
dy = after.pos[1] - before.pos[1];
|
||||
segments.push({
|
||||
name,
|
||||
before,
|
||||
after,
|
||||
localDisplacement:
|
||||
dx * Math.cos(before.yaw) + dy * Math.sin(before.yaw),
|
||||
yaw,
|
||||
minHead,
|
||||
maxHead,
|
||||
minHeight,
|
||||
});
|
||||
}
|
||||
results.push({ trial, segments, actuation: r.actuationStats });
|
||||
}
|
||||
return results;
|
||||
}, mode);
|
||||
for (const trial of report) {
|
||||
const find = (name) => trial.segments.find((s) => s.name === name);
|
||||
expect(find("forward").localDisplacement).toBeGreaterThan(0.5);
|
||||
expect(find("backward").localDisplacement).toBeLessThan(-0.2);
|
||||
expect(find("left").yaw).toBeGreaterThan(1);
|
||||
expect(find("right").yaw).toBeLessThan(-1);
|
||||
expect(
|
||||
find("head_walk").maxHead - find("head_walk").minHead,
|
||||
).toBeGreaterThan(1);
|
||||
expect(Math.abs(find("head_stop").after.head)).toBeLessThan(0.05);
|
||||
expect(trial.actuation.longestSaturatedSeconds).toBeLessThan(0.5);
|
||||
}
|
||||
await info.attach(`microban-${mode.id}-three-trials.json`, {
|
||||
body: JSON.stringify(report, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
console.log(
|
||||
`Microban: 3 × ${mode.seconds}s ${mode.id}, no falls/resets, correct motion and independent head.`,
|
||||
);
|
||||
});
|
||||
test("keyboard H toggles head, fallen Space resets, and real-time control runs near 50Hz", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await boot(page);
|
||||
await page
|
||||
.locator("canvas")
|
||||
.first()
|
||||
.click({ position: { x: 700, y: 600 } });
|
||||
await page.keyboard.press("h");
|
||||
expect(
|
||||
await page.evaluate(() => window.rl.skills.overlays.get("head").enabled),
|
||||
).toBe(true);
|
||||
const first = await page.evaluate(() => ({
|
||||
sim: window.rl.data.time,
|
||||
wall: performance.now(),
|
||||
}));
|
||||
await page.waitForTimeout(5000);
|
||||
const second = await page.evaluate(() => ({
|
||||
sim: window.rl.data.time,
|
||||
wall: performance.now(),
|
||||
fallen: window.rl.fallen,
|
||||
}));
|
||||
const ratio = (second.sim - first.sim) / ((second.wall - first.wall) / 1000);
|
||||
expect(second.fallen).toBe(false);
|
||||
expect(ratio).toBeGreaterThan(0.85);
|
||||
expect(ratio).toBeLessThan(1.15);
|
||||
await info.attach("real-time.json", {
|
||||
body: JSON.stringify({ first, second, ratio }),
|
||||
contentType: "application/json",
|
||||
});
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[3] = Math.SQRT1_2;
|
||||
r.data.qpos[4] = Math.SQRT1_2;
|
||||
r.data.qpos[5] = 0;
|
||||
r.data.qpos[6] = 0;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
await expect.poll(() => page.evaluate(() => window.rl.fallen)).toBe(true);
|
||||
await expect(page.getByRole("status")).toContainText("Robot fallen");
|
||||
await page.keyboard.press("Space");
|
||||
await expect.poll(() => page.evaluate(() => window.rl.fallen)).toBe(false);
|
||||
});
|
||||
@@ -0,0 +1,67 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
test("orbit camera stays synchronized with waypoint picking and physical drag", async ({
|
||||
page,
|
||||
}) => {
|
||||
await bootDuck(page);
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.chaseCam = false;
|
||||
r.camera.position.set(-0.5, 0.6, 1.2);
|
||||
r.controls.target.set(-0.6, 0.12, 0);
|
||||
r.controls.update();
|
||||
r.camera.updateMatrixWorld();
|
||||
});
|
||||
await page.evaluate(
|
||||
() =>
|
||||
new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))),
|
||||
);
|
||||
const floor = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
p = r.controls.target.clone().set(-0.95, 0, 0.25).project(r.camera),
|
||||
rect = document.querySelector("canvas").getBoundingClientRect();
|
||||
return {
|
||||
x: rect.left + ((p.x + 1) * rect.width) / 2,
|
||||
y: rect.top + ((1 - p.y) * rect.height) / 2,
|
||||
};
|
||||
});
|
||||
await page.mouse.click(floor.x, floor.y);
|
||||
const target = await page.evaluate(
|
||||
() => window.rl.controller.sources.find((s) => s.id === "waypoint").target,
|
||||
);
|
||||
expect(target[0]).toBeCloseTo(-0.95, 3);
|
||||
expect(target[1]).toBeCloseTo(-0.25, 3);
|
||||
await page.evaluate(() =>
|
||||
window.rl.controller.sources.find((s) => s.id === "waypoint").cancel(),
|
||||
);
|
||||
const robot = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
q = r.data.qpos,
|
||||
p = r.controls.target
|
||||
.clone()
|
||||
.set(q[0], q[2] + 0.02, -q[1])
|
||||
.project(r.camera),
|
||||
rect = document.querySelector("canvas").getBoundingClientRect();
|
||||
return {
|
||||
x: rect.left + ((p.x + 1) * rect.width) / 2,
|
||||
y: rect.top + ((1 - p.y) * rect.height) / 2,
|
||||
};
|
||||
});
|
||||
await page.mouse.move(robot.x, robot.y);
|
||||
await page.mouse.down();
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(false);
|
||||
await page.mouse.move(robot.x, robot.y - 40, { steps: 3 });
|
||||
await page.evaluate(() => window.rl.step(2));
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.data.xfrc_applied).some((v) => Math.abs(v) > 1e-6),
|
||||
),
|
||||
).toBe(true);
|
||||
await page.mouse.up();
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(true);
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.data.xfrc_applied).every((v) => v === 0),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import fs from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { bootDuck, snapshot } from "./support/simulation.js";
|
||||
|
||||
const fixtures = fileURLToPath(
|
||||
new URL("../test/fixtures/microduck/", import.meta.url),
|
||||
);
|
||||
for (const scenario of [
|
||||
"stand",
|
||||
"walk",
|
||||
"kick",
|
||||
"sitstand",
|
||||
"groundpick",
|
||||
"roll",
|
||||
"recovery",
|
||||
"rollers",
|
||||
"crouch",
|
||||
]) {
|
||||
test(`Microduck deterministic ${scenario}`, async ({ page }) => {
|
||||
// Keep the ORIGINAL 3m World for the accepted original-code oracle.
|
||||
// The current 4.5m production default is independently tested in bounded-world.
|
||||
await page.route("**/worlds/arena/world.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
world = await response.json();
|
||||
world.boundary.half_extent = 1.5;
|
||||
await route.fulfill({ response, json: world });
|
||||
});
|
||||
const errors = await bootDuck(page, { legacyPhysics: true });
|
||||
await page.evaluate(async (scenario) => {
|
||||
const r = window.rl;
|
||||
if (scenario === "rollers" || scenario === "crouch") {
|
||||
await r.setLoco("rollers", { force: true });
|
||||
await r.prepareTest();
|
||||
}
|
||||
r.resetSim();
|
||||
await r.prepareTest();
|
||||
await r.step(50);
|
||||
if (scenario === "walk" || scenario === "rollers")
|
||||
r.velCmd[0] = scenario === "walk" ? 0.1 : 0.2;
|
||||
if (scenario === "kick") r.triggerKick("left");
|
||||
if (scenario === "sitstand") r.setMode("sit");
|
||||
if (scenario === "groundpick") r.triggerGroundPick();
|
||||
if (scenario === "roll") r.triggerRoll();
|
||||
if (scenario === "crouch") r.triggerCrouch();
|
||||
if (scenario === "recovery") {
|
||||
r.data.qpos[3] = Math.SQRT1_2;
|
||||
r.data.qpos[4] = Math.SQRT1_2;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
}
|
||||
}, scenario);
|
||||
// Preserve the accepted input sequence: latch the sit flag before the
|
||||
// recorded physics interval. Timers now use a controllable sim clock.
|
||||
if (scenario === "sitstand")
|
||||
await page.evaluate(() => window.rl.advanceTimers(0.85));
|
||||
const trajectory = [];
|
||||
for (let i = 0; i < 6; i++) {
|
||||
await page.evaluate(() => window.rl.step(25));
|
||||
trajectory.push(await snapshot(page));
|
||||
}
|
||||
const path = `${fixtures}${scenario}.json`;
|
||||
if (process.env.RECORD_BASELINE === "1") {
|
||||
const candidates = fileURLToPath(
|
||||
new URL("../test-results/baseline-candidates/", import.meta.url),
|
||||
);
|
||||
await fs.mkdir(candidates, { recursive: true });
|
||||
// Never overwrite accepted goldens: candidates require explicit review.
|
||||
await fs.writeFile(
|
||||
`${candidates}${scenario}.json`,
|
||||
JSON.stringify(
|
||||
{
|
||||
scenario,
|
||||
backend: "mujoco-3.11.0/ort-wasm-single-thread",
|
||||
trajectory,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
) + "\n",
|
||||
);
|
||||
} else {
|
||||
const expected = JSON.parse(await fs.readFile(path, "utf8"));
|
||||
expect(trajectory).toEqual(expected.trajectory);
|
||||
}
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test("compiled mesh/primitive transforms and reversed actuator order are resolved correctly", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/e2e/fixtures/render-fixture.html");
|
||||
await page.waitForFunction(() => window.renderResult || window.renderError);
|
||||
expect(await page.evaluate(() => window.renderError)).toBeUndefined();
|
||||
const result = await page.evaluate(() => window.renderResult);
|
||||
expect(result.maxError).toBeLessThan(1e-12);
|
||||
expect(result.count).toBe(8);
|
||||
expect(result.a).toBe(1);
|
||||
expect(result.b).toBe(0);
|
||||
expect(result.missing).toContain("absent");
|
||||
expect(result.color[0]).toBeCloseTo(0.1, 6);
|
||||
expect(result.color[1]).toBeCloseTo(0.2, 6);
|
||||
expect(result.color[2]).toBeCloseTo(0.3, 6);
|
||||
});
|
||||
@@ -0,0 +1,64 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
async function ready(page) {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
}
|
||||
test("Microduck → Microban → Microduck restores theme, colours and locomotion", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await ready(page);
|
||||
await page.getByRole("button", { name: "Lavender scene lines" }).click();
|
||||
await page.getByRole("button", { name: "Rollers", exact: true }).click();
|
||||
await page.waitForFunction(() => window.rl?.loco === "rollers");
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microban");
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
window.__store.getState().robotId === "microban" ||
|
||||
window.__store.getState().runtimeError,
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__store.getState().runtimeError),
|
||||
).toBeNull();
|
||||
await expect(
|
||||
page.getByText("Toggle head rotation", { exact: false }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("group", { name: "Scene line colours" }),
|
||||
).toBeVisible();
|
||||
expect(await page.evaluate(() => window.rl.buildObs().length)).toBe(63);
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microduck");
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
window.__store.getState().presentationTheme === "comic" &&
|
||||
window.rl?.loco === "rollers",
|
||||
);
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Lavender scene lines" }),
|
||||
).toHaveAttribute("aria-pressed", "true");
|
||||
expect(await page.evaluate(() => window.rl.data.time)).toBeLessThan(3);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
test("failed switch rolls back and retry does not reload the page", async ({
|
||||
page,
|
||||
}) => {
|
||||
await ready(page);
|
||||
let fail = true;
|
||||
await page.route("**/robots/microban/policies/walk.onnx", (route) =>
|
||||
fail ? route.fulfill({ status: 404, body: "missing" }) : route.continue(),
|
||||
);
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("microban");
|
||||
await expect(page.getByRole("alert")).toContainText("404");
|
||||
expect(await page.evaluate(() => window.__store.getState().robotId)).toBe(
|
||||
"microduck-legs",
|
||||
);
|
||||
expect(await page.evaluate(() => window.rl.running)).toBe(true);
|
||||
fail = false;
|
||||
await page.getByRole("button", { name: "Retry", exact: true }).click();
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe("microban");
|
||||
});
|
||||
@@ -0,0 +1,347 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
async function allowStaged(page) {
|
||||
// Qualification can exercise disabled candidates; normal CI uses the actual manifest.
|
||||
if (process.env.RP1_TEST_STAGED) {
|
||||
await page.route("**/robots/rp1/robot.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
for (const skill of config.skills.filter((s) => s.kind === "episodic")) {
|
||||
skill.available = true;
|
||||
config.input.bindings.find(
|
||||
(b) => b.action === `skill:${skill.id}`,
|
||||
).disabled = false;
|
||||
}
|
||||
await route.fulfill({ response, json: config });
|
||||
});
|
||||
}
|
||||
}
|
||||
async function boot(page) {
|
||||
await allowStaged(page);
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
true,
|
||||
);
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
}
|
||||
|
||||
for (const skill of ["wave", "dance"]) {
|
||||
test(`trained ${skill}: three headings, configured segment, physical walk→skill→walk`, async ({
|
||||
page,
|
||||
}, info) => {
|
||||
test.setTimeout(240000);
|
||||
await boot(page);
|
||||
const reports = [];
|
||||
for (const turn of [0, 1.8, -1.8]) {
|
||||
const report = await page.evaluate(
|
||||
async ({ skill, turn }) => {
|
||||
const r = window.rl;
|
||||
await r.resetSim();
|
||||
if (turn) {
|
||||
r.command.set([0, 0, Math.sign(turn) * 0.6]);
|
||||
await r.step(Math.round(Math.abs(turn) * 50));
|
||||
}
|
||||
r.command.set([0.4, 0, 0]);
|
||||
await r.step(50);
|
||||
r.command.fill(0);
|
||||
await r.step(100);
|
||||
const before = Array.from(r.data.qpos.slice(0, 3));
|
||||
if (!r.policyState.request(skill, r.data.time))
|
||||
throw new Error("request refused");
|
||||
const states = [],
|
||||
samples = [];
|
||||
let entered = false,
|
||||
fallen = null,
|
||||
completed = false,
|
||||
minHeight = Infinity;
|
||||
let previousState = "",
|
||||
previousPosition = before,
|
||||
maxStep = 0,
|
||||
maxAction = 0,
|
||||
maxFrame = 0;
|
||||
const duration = r.policyState.episodes.get(skill).duration;
|
||||
for (let i = 0; i < (duration + 10) * 50; i++) {
|
||||
await r.step(1);
|
||||
const state = r.policyState.state;
|
||||
if (state !== previousState) {
|
||||
states.push({
|
||||
state,
|
||||
time: r.data.time,
|
||||
reference: r.referenceFrame,
|
||||
});
|
||||
previousState = state;
|
||||
}
|
||||
const p = Array.from(r.data.qpos.slice(0, 3));
|
||||
maxStep = Math.max(
|
||||
maxStep,
|
||||
Math.hypot(...p.map((v, j) => v - previousPosition[j])),
|
||||
);
|
||||
previousPosition = p;
|
||||
minHeight = Math.min(minHeight, p[2]);
|
||||
maxAction = Math.max(
|
||||
maxAction,
|
||||
...Array.from(r.lastAction, Math.abs),
|
||||
);
|
||||
maxFrame = Math.max(maxFrame, r.referenceFrame ?? 0);
|
||||
if (
|
||||
![
|
||||
...r.data.qpos,
|
||||
...r.data.qvel,
|
||||
...r.data.ctrl,
|
||||
...r.lastAction,
|
||||
].every(Number.isFinite)
|
||||
)
|
||||
throw new Error("non-finite physics/action state");
|
||||
if (r.activePolicy === skill) entered = true;
|
||||
if (i % 50 === 0 && r.activePolicy === skill) {
|
||||
const obs = Array.from(r.buildObs());
|
||||
if (obs.length !== 126)
|
||||
throw new Error(`wrong observation length ${obs.length}`);
|
||||
samples.push({
|
||||
time: r.data.time,
|
||||
frame: r.referenceFrame,
|
||||
pos: p,
|
||||
obs,
|
||||
});
|
||||
}
|
||||
if (r.fallen) {
|
||||
fallen = { time: r.data.time, frame: r.referenceFrame, p };
|
||||
break;
|
||||
}
|
||||
if (entered && state === "walk") {
|
||||
completed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const after = Array.from(r.data.qpos.slice(0, 3));
|
||||
const [w, x, y, z] = r.data.qpos.slice(3, 7);
|
||||
const yaw = Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z));
|
||||
if (completed) {
|
||||
r.command.set([0.4, 0, 0]);
|
||||
await r.step(150);
|
||||
}
|
||||
const walkAfter = Array.from(r.data.qpos.slice(0, 3));
|
||||
return {
|
||||
skill,
|
||||
turn,
|
||||
duration,
|
||||
before,
|
||||
after,
|
||||
states,
|
||||
samples,
|
||||
entered,
|
||||
completed,
|
||||
fallen,
|
||||
finalFallen: r.fallen,
|
||||
minHeight,
|
||||
maxStep,
|
||||
maxAction,
|
||||
maxFrame,
|
||||
stats: r.actuationStats,
|
||||
walkAfter,
|
||||
forwardAfter:
|
||||
(walkAfter[0] - after[0]) * Math.cos(yaw) +
|
||||
(walkAfter[1] - after[1]) * Math.sin(yaw),
|
||||
};
|
||||
},
|
||||
{ skill, turn },
|
||||
);
|
||||
reports.push(report);
|
||||
const base = new URL("../public/robots/rp1/", import.meta.url);
|
||||
const descriptor = JSON.parse(
|
||||
readFileSync(new URL(`motions/${skill}.json`, base)),
|
||||
);
|
||||
const binary = readFileSync(new URL(descriptor.data, base));
|
||||
for (const sample of report.samples) {
|
||||
for (let j = 0; j < 24; j++) {
|
||||
expect(sample.obs[j]).toBe(
|
||||
binary.readFloatLE((sample.frame * 24 + j) * 4),
|
||||
);
|
||||
expect(sample.obs[j + 24]).toBe(
|
||||
binary.readFloatLE(
|
||||
(descriptor.frames * 24 + sample.frame * 24 + j) * 4,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
await info.attach(`${skill}-${turn}-playback.json`, {
|
||||
body: JSON.stringify(report),
|
||||
contentType: "application/json",
|
||||
});
|
||||
console.log(
|
||||
`RP1 ${skill} playback`,
|
||||
JSON.stringify({ ...report, samples: undefined }),
|
||||
);
|
||||
expect(report.entered).toBe(true);
|
||||
expect(report.fallen).toBeNull();
|
||||
expect(report.completed).toBe(true);
|
||||
expect(report.finalFallen).toBe(false);
|
||||
expect(report.maxStep).toBeLessThan(0.15);
|
||||
expect(report.minHeight).toBeGreaterThan(0.4);
|
||||
expect(report.forwardAfter).toBeGreaterThan(0.4);
|
||||
expect(report.maxFrame).toBeGreaterThanOrEqual(report.duration * 50 - 2);
|
||||
expect(report.stats.longestSaturatedSeconds).toBeLessThan(0.5);
|
||||
}
|
||||
await page.screenshot({ path: info.outputPath(`${skill}.png`) });
|
||||
});
|
||||
}
|
||||
|
||||
test("trained skill keyboard activation, pause freezes reference, movement interrupts, reset clears", async ({
|
||||
page,
|
||||
}) => {
|
||||
await boot(page);
|
||||
for (const [skill, key] of [
|
||||
["wave", "KeyH"],
|
||||
["dance", "KeyJ"],
|
||||
]) {
|
||||
await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.resetSim();
|
||||
await r.step(100);
|
||||
r.resume();
|
||||
});
|
||||
await page
|
||||
.locator("canvas")
|
||||
.first()
|
||||
.click({ position: { x: 700, y: 600 } });
|
||||
await page.keyboard.press(key);
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.rl.policyState.state))
|
||||
.not.toBe("walk");
|
||||
await page.evaluate(async () => {
|
||||
await window.rl.pause();
|
||||
await window.rl.step(45);
|
||||
});
|
||||
expect(await page.evaluate(() => window.rl.activePolicy)).toBe(skill);
|
||||
const paused = await page.evaluate(() => ({
|
||||
time: window.rl.data.time,
|
||||
frame: window.rl.referenceFrame,
|
||||
}));
|
||||
await page.waitForTimeout(250);
|
||||
expect(
|
||||
await page.evaluate(() => ({
|
||||
time: window.rl.data.time,
|
||||
frame: window.rl.referenceFrame,
|
||||
})),
|
||||
).toEqual(paused);
|
||||
const result = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
r.command.set([0.4, 0, 0]);
|
||||
await r.step(1);
|
||||
const interrupted = {
|
||||
active: r.activePolicy,
|
||||
state: r.policyState.state,
|
||||
};
|
||||
await r.step(100);
|
||||
return { interrupted, state: r.policyState.state, fallen: r.fallen };
|
||||
});
|
||||
expect(result.interrupted).toEqual({ active: "walk", state: "returning" });
|
||||
expect(result.state).toBe("walk");
|
||||
expect(result.fallen).toBe(false);
|
||||
await page.keyboard.press("Space");
|
||||
await expect.poll(() => page.evaluate(() => window.rl.data.time)).toBe(0);
|
||||
expect(await page.evaluate(() => window.rl.referenceFrame)).toBeNull();
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.lastAction).every((v) => v === 0),
|
||||
),
|
||||
).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("repeated real skills restart reference at zero without resetting the robot", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await boot(page);
|
||||
const report = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
episodes = [];
|
||||
await r.step(100);
|
||||
for (const skill of ["wave", "dance", "wave", "dance"]) {
|
||||
r.command.fill(0);
|
||||
await r.step(100);
|
||||
if (!r.policyState.request(skill, r.data.time))
|
||||
throw new Error("request refused");
|
||||
let firstFrame = null,
|
||||
lastFrame = null,
|
||||
entered = false,
|
||||
complete = false;
|
||||
const duration = r.policyState.episodes.get(skill).duration;
|
||||
for (let i = 0; i < (duration + 7) * 50; i++) {
|
||||
await r.step(1);
|
||||
if (r.fallen) throw new Error(`${skill}: fallen at ${r.data.time}`);
|
||||
if (r.activePolicy === skill) {
|
||||
firstFrame ??= r.referenceFrame;
|
||||
lastFrame = r.referenceFrame;
|
||||
entered = true;
|
||||
}
|
||||
if (entered && r.policyState.state === "walk") {
|
||||
complete = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
episodes.push({
|
||||
skill,
|
||||
firstFrame,
|
||||
lastFrame,
|
||||
complete,
|
||||
time: r.data.time,
|
||||
});
|
||||
r.command.set([0.4, 0, 0]);
|
||||
await r.step(50);
|
||||
}
|
||||
return episodes;
|
||||
});
|
||||
await info.attach("repeated-skills.json", {
|
||||
body: JSON.stringify(report),
|
||||
contentType: "application/json",
|
||||
});
|
||||
for (const episode of report) {
|
||||
expect(episode.firstFrame).toBe(0);
|
||||
expect(episode.lastFrame).toBe(episode.skill === "wave" ? 217 : 499);
|
||||
expect(episode.complete).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("truncated motion asset rolls back the candidate and permits a clean retry", async ({
|
||||
page,
|
||||
}) => {
|
||||
await allowStaged(page);
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.route("**/robots/rp1/motions/wave.f32*", (route) =>
|
||||
route.fulfill({
|
||||
body: Buffer.alloc(8),
|
||||
contentType: "application/octet-stream",
|
||||
}),
|
||||
);
|
||||
const old = await page.evaluate(() => {
|
||||
window.__oldRobotModel = window.rl.model;
|
||||
return window.__store.getState().robotId;
|
||||
});
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
false,
|
||||
);
|
||||
expect(await page.evaluate(() => window.__store.getState().robotId)).toBe(
|
||||
old,
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__store.getState().runtimeError),
|
||||
).toContain("sample count");
|
||||
expect(
|
||||
await page.evaluate(() => window.rl.model === window.__oldRobotModel),
|
||||
).toBe(true);
|
||||
await page.unroute("**/robots/rp1/motions/wave.f32*");
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
true,
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__store.getState().runtimeError),
|
||||
).toBeNull();
|
||||
});
|
||||
@@ -0,0 +1,274 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
|
||||
async function boot(page) {
|
||||
await bootDuck(page);
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
}
|
||||
|
||||
test("all 63 RP1 material parts follow 25 physical bodies, including fixed fingers, with original shapes aligned", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await boot(page);
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
true,
|
||||
);
|
||||
const inspect = () =>
|
||||
page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
layer = r.scene.getObjectByName("body-visuals"),
|
||||
rig = layer.parent;
|
||||
rig.updateMatrixWorld(true);
|
||||
const xml = new DOMParser().parseFromString(
|
||||
await (await fetch("robots/rp1/visuals/rp1_hand_fixed.urdf")).text(),
|
||||
"text/xml",
|
||||
);
|
||||
const joints = new Map(
|
||||
[...xml.querySelectorAll("joint")].map((j) => [
|
||||
j.querySelector("child").getAttribute("link"),
|
||||
j,
|
||||
]),
|
||||
);
|
||||
const Matrix = rig.matrix.constructor,
|
||||
Euler = r.controls.object.rotation.constructor;
|
||||
const correction = new Matrix().makeRotationX(Math.PI / 2);
|
||||
const urdfRelative = (name, anchor) => {
|
||||
const result = new Matrix();
|
||||
while (name !== anchor) {
|
||||
const joint = joints.get(name),
|
||||
origin = joint.querySelector("origin");
|
||||
const xyz = (origin?.getAttribute("xyz") ?? "0 0 0")
|
||||
.split(/\s+/)
|
||||
.map(Number);
|
||||
const angles = (origin?.getAttribute("rpy") ?? "0 0 0")
|
||||
.split(/\s+/)
|
||||
.map(Number);
|
||||
const matrix = new Matrix().makeRotationFromEuler(
|
||||
new Euler(...angles, "ZYX"),
|
||||
);
|
||||
matrix.setPosition(...xyz);
|
||||
result.premultiply(matrix);
|
||||
name = joint.querySelector("parent").getAttribute("link");
|
||||
}
|
||||
return result.multiply(correction);
|
||||
};
|
||||
const bounds = (objects, frame) => {
|
||||
const lo = [Infinity, Infinity, Infinity],
|
||||
hi = [-Infinity, -Infinity, -Infinity];
|
||||
const inverse = frame.matrixWorld.clone().invert(),
|
||||
vector = frame.position.clone();
|
||||
for (const mesh of objects) {
|
||||
const transform = inverse.clone().multiply(mesh.matrixWorld),
|
||||
attr = mesh.geometry.attributes.position;
|
||||
for (let i = 0; i < attr.count; i++) {
|
||||
vector.fromBufferAttribute(attr, i).applyMatrix4(transform);
|
||||
vector.toArray().forEach((v, a) => {
|
||||
lo[a] = Math.min(lo[a], v);
|
||||
hi[a] = Math.max(hi[a], v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return [...lo, ...hi];
|
||||
};
|
||||
let frameError = 0,
|
||||
boundsError = 0,
|
||||
handError = 0,
|
||||
handParts = 0,
|
||||
normals = 0,
|
||||
screens = 0,
|
||||
emissive = 0,
|
||||
hidden = 0,
|
||||
meshes = 0;
|
||||
for (const frame of layer.children) {
|
||||
const body = frame.name.slice("body-visual:".length),
|
||||
id = r.mujoco.mj_name2id(
|
||||
r.model,
|
||||
r.mujoco.mjtObj.mjOBJ_BODY.value,
|
||||
body,
|
||||
);
|
||||
const p = Array.from(r.data.xpos.slice(id * 3, id * 3 + 3)),
|
||||
q = Array.from(r.data.xquat.slice(id * 4, id * 4 + 4));
|
||||
frameError = Math.max(
|
||||
frameError,
|
||||
...p.map((v, i) => Math.abs(v - frame.position.toArray()[i])),
|
||||
...[q[1], q[2], q[3], q[0]].map((v, i) =>
|
||||
Math.abs(v - frame.quaternion.toArray()[i]),
|
||||
),
|
||||
);
|
||||
const originals = rig.children.filter(
|
||||
(m) =>
|
||||
m.userData.geomId !== undefined &&
|
||||
r.model.geom_bodyid[m.userData.geomId] === id,
|
||||
);
|
||||
hidden += originals.filter((m) => !m.visible).length;
|
||||
const replacements = [];
|
||||
frame.traverse((node) => {
|
||||
if (node.userData.sourcePart) {
|
||||
handParts++;
|
||||
const actual = frame.matrixWorld
|
||||
.clone()
|
||||
.invert()
|
||||
.multiply(node.matrixWorld);
|
||||
const expected = urdfRelative(
|
||||
node.userData.sourcePart,
|
||||
`${body.split("_")[0]}_wrist_roll_link`,
|
||||
);
|
||||
handError = Math.max(
|
||||
handError,
|
||||
...actual.elements.map((v, i) =>
|
||||
Math.abs(v - expected.elements[i]),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (!node.isMesh) return;
|
||||
meshes++;
|
||||
replacements.push(node);
|
||||
for (const m of [node.material].flat()) {
|
||||
if (m.normalMap?.image?.width > 0) normals++;
|
||||
if (m.map?.image?.width > 0) screens++;
|
||||
if (m.emissiveIntensity > 1) emissive++;
|
||||
}
|
||||
});
|
||||
if (!body.endsWith("_wrist_link")) {
|
||||
const before = bounds(originals, frame),
|
||||
after = bounds(replacements, frame);
|
||||
boundsError = Math.max(
|
||||
boundsError,
|
||||
...before.map((v, i) => Math.abs(v - after[i])),
|
||||
);
|
||||
}
|
||||
}
|
||||
return {
|
||||
bodies: layer.children.length,
|
||||
frameError,
|
||||
boundsError,
|
||||
handError,
|
||||
handParts,
|
||||
normals,
|
||||
screens,
|
||||
emissive,
|
||||
hidden,
|
||||
meshes,
|
||||
obs: r.buildObs().length,
|
||||
actions: r.lastAction.length,
|
||||
actuators: r.model.nu,
|
||||
};
|
||||
});
|
||||
const initial = await inspect();
|
||||
console.log("RP1 GLB alignment", initial);
|
||||
expect(initial.bodies).toBe(25);
|
||||
expect(initial.handParts).toBe(40);
|
||||
expect(initial.frameError).toBeLessThan(1e-12);
|
||||
expect(initial.boundsError).toBeLessThan(1e-7);
|
||||
expect(initial.handError).toBeLessThan(1e-10);
|
||||
expect(initial.normals).toBeGreaterThanOrEqual(63);
|
||||
expect(initial.screens).toBeGreaterThanOrEqual(1);
|
||||
expect(initial.emissive).toBeGreaterThanOrEqual(1);
|
||||
expect(initial.hidden).toBe(25);
|
||||
expect(initial.obs).toBe(243);
|
||||
expect(initial.actions).toBe(24);
|
||||
expect(initial.actuators).toBe(24);
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.data.qpos[3] = Math.cos(0.4);
|
||||
r.data.qpos[6] = Math.sin(0.4);
|
||||
for (let j = 0; j < r.model.njnt; j++)
|
||||
if (r.model.jnt_type[j] === 3)
|
||||
r.data.qpos[r.model.jnt_qposadr[j]] += 0.12;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
});
|
||||
await page.waitForTimeout(200);
|
||||
const posed = await inspect();
|
||||
expect(posed.frameError).toBeLessThan(1e-12);
|
||||
expect(posed.boundsError).toBeLessThan(1e-7);
|
||||
expect(posed.handError).toBeLessThan(1e-10);
|
||||
await page.evaluate(() => window.rl.resetSim());
|
||||
await page.getByRole("button", { name: /Keyboard controls/ }).click();
|
||||
await page.mouse.click(950, 750, { button: "right" });
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.setPropsParked(true);
|
||||
r.camera.position.set(2.4, 1.35, 1.3);
|
||||
r.controls.target.set(0, 0.7, 0);
|
||||
r.controls.update();
|
||||
});
|
||||
await page.waitForTimeout(300);
|
||||
await page.screenshot({ path: info.outputPath("rp1-material-front.png") });
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
test("RP1 GLBs change no physics, observations or ONNX actions for walking, wave and dance", async ({
|
||||
page,
|
||||
}) => {
|
||||
await boot(page);
|
||||
let textured = false;
|
||||
await page.route("**/robots/rp1/robot.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
if (!textured) delete config.render.body_visuals;
|
||||
await route.fulfill({ response, json: config });
|
||||
});
|
||||
async function run() {
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
true,
|
||||
);
|
||||
return page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
result = [];
|
||||
for (const scenario of ["walk", "wave", "dance"]) {
|
||||
await r.resetSim();
|
||||
await r.step(100);
|
||||
if (scenario === "walk") r.command.set([0.4, 0, 0.15]);
|
||||
else r.policyState.request(scenario, r.data.time);
|
||||
for (let i = 0; i < 5; i++) {
|
||||
await r.step(50);
|
||||
result.push({
|
||||
scenario,
|
||||
time: r.data.time,
|
||||
qpos: Array.from(r.data.qpos),
|
||||
qvel: Array.from(r.data.qvel),
|
||||
ctrl: Array.from(r.data.ctrl),
|
||||
action: Array.from(r.lastAction),
|
||||
obs: Array.from(r.buildObs()),
|
||||
state: r.policyState.state,
|
||||
reference: r.referenceFrame,
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
const old = await run();
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microduck-legs"));
|
||||
textured = true;
|
||||
expect(await run()).toEqual(old);
|
||||
});
|
||||
|
||||
test("a partial RP1 material load failure releases the candidate and retry succeeds", async ({
|
||||
page,
|
||||
}) => {
|
||||
await boot(page);
|
||||
let fail = true;
|
||||
await page.route(
|
||||
"**/robots/rp1/visuals/left_hip_roll_link__visual_0__left_hip_roll_link.glb",
|
||||
(route) =>
|
||||
fail ? route.fulfill({ status: 404, body: "missing" }) : route.continue(),
|
||||
);
|
||||
expect(await page.evaluate(() => window.__gameApi.switchRobot("rp1"))).toBe(
|
||||
false,
|
||||
);
|
||||
await expect(page.getByRole("alert")).toContainText("404");
|
||||
expect(await page.evaluate(() => window.__store.getState().robotId)).toBe(
|
||||
"microduck-legs",
|
||||
);
|
||||
expect(await page.evaluate(() => window.rl.model.isDeleted())).toBe(false);
|
||||
fail = false;
|
||||
expect(await page.evaluate(() => window.__gameApi.retry())).toBe(true);
|
||||
expect(
|
||||
await page.evaluate(
|
||||
() => window.rl.scene.getObjectByName("body-visuals").children.length,
|
||||
),
|
||||
).toBe(25);
|
||||
});
|
||||
@@ -0,0 +1,291 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
async function boot(page) {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption("rp1");
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
window.__store.getState().robotId === "rp1" ||
|
||||
window.__store.getState().runtimeError,
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(() => window.__store.getState().runtimeError),
|
||||
).toBeNull();
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
}
|
||||
test("third robot: real WASM/ONNX, keyboard command contract, trained skill bindings, fall/reset, switching", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await boot(page);
|
||||
expect(
|
||||
await page.getByLabel("Robot", { exact: true }).locator("option").count(),
|
||||
).toBe(3);
|
||||
expect(await page.evaluate(() => window.rl.buildObs().length)).toBe(243);
|
||||
expect(await page.evaluate(() => window.rl.lastAction.length)).toBe(24);
|
||||
await page
|
||||
.locator("canvas")
|
||||
.first()
|
||||
.click({ position: { x: 700, y: 600 } });
|
||||
await page.evaluate(() => window.rl.resume());
|
||||
await expect(page.getByRole("button", { name: /^J\s*Dance$/ })).toBeEnabled();
|
||||
await expect(page.getByRole("button", { name: /^H\s*Wave$/ })).toBeEnabled();
|
||||
expect(
|
||||
await page
|
||||
.getByRole("complementary", { name: "Keyboard controls" })
|
||||
.innerText(),
|
||||
).not.toMatch(/\p{Script=Han}/u);
|
||||
for (const [key, expected] of [
|
||||
["KeyW", [0.4, 0, 0]],
|
||||
["KeyS", [-0.3, 0, 0]],
|
||||
["KeyA", [0, 0, 0.6]],
|
||||
["KeyD", [0, 0, -0.6]],
|
||||
]) {
|
||||
await page.evaluate(async () => {
|
||||
await window.rl.resetSim();
|
||||
window.rl.resume();
|
||||
});
|
||||
await page.keyboard.down(key);
|
||||
const command = await page.evaluate(() => Array.from(window.rl.command));
|
||||
command.forEach((v, i) => expect(v).toBeCloseTo(expected[i], 5));
|
||||
await page.keyboard.up(key);
|
||||
expect(await page.evaluate(() => Array.from(window.rl.command))).toEqual([
|
||||
0, 0, 0,
|
||||
]);
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
}
|
||||
const report = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
trials = [];
|
||||
for (const [name, command] of [
|
||||
["stand", [0, 0, 0]],
|
||||
["forward", [0.4, 0, 0]],
|
||||
["backward", [-0.3, 0, 0]],
|
||||
["left", [0, 0, 0.6]],
|
||||
["right", [0, 0, -0.6]],
|
||||
]) {
|
||||
await r.resetSim();
|
||||
r.command.set(command);
|
||||
const before = Array.from(r.data.qpos.slice(0, 3));
|
||||
let firstFall = null;
|
||||
for (let i = 0; i < 150; i++) {
|
||||
await r.step(1);
|
||||
if (
|
||||
![
|
||||
...r.data.qpos,
|
||||
...r.data.qvel,
|
||||
...r.data.ctrl,
|
||||
...r.lastAction,
|
||||
].every(Number.isFinite)
|
||||
)
|
||||
throw new Error("non-finite RP1 state");
|
||||
if (r.fallen) {
|
||||
firstFall = r.data.time;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const [w, x, y, z] = r.data.qpos.slice(3, 7);
|
||||
trials.push({
|
||||
name,
|
||||
before,
|
||||
after: Array.from(r.data.qpos.slice(0, 3)),
|
||||
time: r.data.time,
|
||||
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
|
||||
firstFall,
|
||||
actuation: r.actuationStats,
|
||||
});
|
||||
}
|
||||
return trials;
|
||||
});
|
||||
for (const trial of report) expect(trial.firstFall).toBeNull();
|
||||
expect(report.find((t) => t.name === "forward").after[0]).toBeGreaterThan(
|
||||
0.4,
|
||||
);
|
||||
expect(report.find((t) => t.name === "backward").after[0]).toBeLessThan(-0.3);
|
||||
expect(report.find((t) => t.name === "left").yaw).toBeGreaterThan(0.5);
|
||||
expect(report.find((t) => t.name === "right").yaw).toBeLessThan(-0.5);
|
||||
console.log("RP1 completed-checkpoint trials", JSON.stringify(report));
|
||||
await info.attach("rp1-preview-trials.json", {
|
||||
body: JSON.stringify(report, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
await page.evaluate(async () => {
|
||||
await window.rl.resetSim();
|
||||
window.rl.data.qpos[2] = 1.2;
|
||||
window.rl.data.qpos.set([Math.SQRT1_2, Math.SQRT1_2, 0, 0], 3);
|
||||
window.rl.mujoco.mj_forward(window.rl.model, window.rl.data);
|
||||
await window.rl.step(1);
|
||||
});
|
||||
expect(await page.evaluate(() => window.rl.fallen)).toBe(true);
|
||||
await page.keyboard.press("Space");
|
||||
await expect.poll(() => page.evaluate(() => window.rl.fallen)).toBe(false);
|
||||
expect(await page.evaluate(() => window.rl.policyState.state)).toBe("walk");
|
||||
await page.screenshot({ path: info.outputPath("rp1.png") });
|
||||
for (const robot of ["microban", "microduck", "rp1"]) {
|
||||
await page.getByLabel("Robot", { exact: true }).selectOption(robot);
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.__store.getState().robotId))
|
||||
.toBe(robot === "microduck" ? "microduck-legs" : robot);
|
||||
}
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
test("three 25-second bounded RP1 sequences preserve direction and balance; realtime controller stays near 50Hz", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
await boot(page);
|
||||
const report = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
trials = [];
|
||||
const pose = () => {
|
||||
const [w, x, y, z] = r.data.qpos.slice(3, 7);
|
||||
return {
|
||||
pos: Array.from(r.data.qpos.slice(0, 3)),
|
||||
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
|
||||
};
|
||||
};
|
||||
for (let trial = 0; trial < 3; trial++) {
|
||||
await r.resetSim();
|
||||
const segments = [];
|
||||
for (const [name, seconds, vx, wz] of [
|
||||
["stand", 5, 0, 0],
|
||||
["forward", 3, 0.4, 0],
|
||||
["rest", 2, 0, 0],
|
||||
["backward", 3, -0.3, 0],
|
||||
["rest", 2, 0, 0],
|
||||
["left", 3, 0, 0.6],
|
||||
["rest", 2, 0, 0],
|
||||
["right", 3, 0, -0.6],
|
||||
["rest", 2, 0, 0],
|
||||
]) {
|
||||
const before = pose();
|
||||
r.command.set([vx, 0, wz]);
|
||||
let yaw = 0,
|
||||
previousYaw = before.yaw,
|
||||
minHeight = Infinity;
|
||||
for (let i = 0; i < seconds * 10; i++) {
|
||||
await r.step(5);
|
||||
const p = pose();
|
||||
if (r.fallen)
|
||||
throw new Error(`trial ${trial} ${name}: fallen at ${r.data.time}`);
|
||||
if (Math.max(Math.abs(p.pos[0]), Math.abs(p.pos[1])) > 1.9)
|
||||
throw new Error("unexpected wall approach");
|
||||
yaw += Math.atan2(
|
||||
Math.sin(p.yaw - previousYaw),
|
||||
Math.cos(p.yaw - previousYaw),
|
||||
);
|
||||
previousYaw = p.yaw;
|
||||
minHeight = Math.min(minHeight, p.pos[2]);
|
||||
}
|
||||
const after = pose();
|
||||
segments.push({
|
||||
name,
|
||||
minHeight,
|
||||
yaw,
|
||||
displacement:
|
||||
(after.pos[0] - before.pos[0]) * Math.cos(before.yaw) +
|
||||
(after.pos[1] - before.pos[1]) * Math.sin(before.yaw),
|
||||
});
|
||||
}
|
||||
trials.push({
|
||||
trial,
|
||||
time: r.data.time,
|
||||
segments,
|
||||
actuation: r.actuationStats,
|
||||
});
|
||||
}
|
||||
return trials;
|
||||
});
|
||||
for (const trial of report) {
|
||||
const find = (name) => trial.segments.find((s) => s.name === name);
|
||||
expect(trial.time).toBeCloseTo(25, 5);
|
||||
expect(find("forward").displacement).toBeGreaterThan(0.4);
|
||||
expect(find("backward").displacement).toBeLessThan(-0.3);
|
||||
expect(find("left").yaw).toBeGreaterThan(0.5);
|
||||
expect(find("right").yaw).toBeLessThan(-0.5);
|
||||
expect(trial.actuation.longestSaturatedSeconds).toBeLessThan(0.5);
|
||||
}
|
||||
await info.attach("rp1-three-sequences.json", {
|
||||
body: JSON.stringify(report, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
await page.evaluate(async () => {
|
||||
await window.rl.resetSim();
|
||||
window.rl.resume();
|
||||
});
|
||||
const first = await page.evaluate(() => ({
|
||||
sim: window.rl.data.time,
|
||||
wall: performance.now(),
|
||||
}));
|
||||
await page.waitForTimeout(4000);
|
||||
const second = await page.evaluate(() => ({
|
||||
sim: window.rl.data.time,
|
||||
wall: performance.now(),
|
||||
fallen: window.rl.fallen,
|
||||
}));
|
||||
const ratio = (second.sim - first.sim) / ((second.wall - first.wall) / 1000);
|
||||
expect(second.fallen).toBe(false);
|
||||
expect(ratio).toBeGreaterThan(0.8);
|
||||
expect(ratio).toBeLessThan(1.15);
|
||||
await info.attach("rp1-realtime.json", {
|
||||
body: JSON.stringify({ first, second, ratio }),
|
||||
contentType: "application/json",
|
||||
});
|
||||
});
|
||||
|
||||
test("episodic ONNX lifecycle is exclusive and resets on return (walk reused as interface fixture, NOT a dance policy)", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.route("**/robots/rp1/robot.json*", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
config = await response.json();
|
||||
const skill = config.skills.find((s) => s.id === "dance");
|
||||
Object.assign(skill, {
|
||||
available: true,
|
||||
duration: 0.8,
|
||||
blend: 0.2,
|
||||
observations: config.observations,
|
||||
actions: config.actions,
|
||||
defaults: config.joints.defaults,
|
||||
});
|
||||
delete skill.reference;
|
||||
skill.controller.policy = "policies/walk.onnx";
|
||||
config.input.bindings.find((b) => b.action === "skill:dance").disabled =
|
||||
false;
|
||||
await route.fulfill({ response, json: config });
|
||||
});
|
||||
await boot(page);
|
||||
const report = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.resetSim();
|
||||
if (!r.policyState.request("dance", r.data.time))
|
||||
throw new Error("request refused");
|
||||
await r.step(23); // Real zero-command locomotion must satisfy the stop gate.
|
||||
const first = { active: r.activePolicy, state: r.policyState.state };
|
||||
await r.step(65);
|
||||
const returned = { active: r.activePolicy, state: r.policyState.state };
|
||||
r.policyState.request("dance", r.data.time);
|
||||
await r.step(23);
|
||||
r.command.set([0.4, 0, 0]);
|
||||
await r.step(1);
|
||||
const interrupted = { active: r.activePolicy, state: r.policyState.state };
|
||||
await r.step(12);
|
||||
return {
|
||||
first,
|
||||
returned,
|
||||
interrupted,
|
||||
active: r.activePolicy,
|
||||
state: r.policyState.state,
|
||||
fallen: r.fallen,
|
||||
};
|
||||
});
|
||||
expect(report.first).toEqual({ active: "dance", state: "entering" });
|
||||
expect(report.returned).toEqual({ active: "walk", state: "walk" });
|
||||
expect(report.interrupted).toEqual({ active: "walk", state: "returning" });
|
||||
expect(report.active).toBe("walk");
|
||||
expect(report.state).toBe("walk");
|
||||
expect(report.fallen).toBe(false);
|
||||
});
|
||||
@@ -0,0 +1,94 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
// All twenty transitions run in one page and one shared WASM instance.
|
||||
test("20 robot transitions release old WASM objects and plateau scene/GPU/listeners", async ({
|
||||
page,
|
||||
}, info) => {
|
||||
// Twenty cold transitions now also decode RP1's ~93 MB textured GLBs.
|
||||
// Keep allocation/listener assertions unchanged; allow load-time headroom.
|
||||
test.setTimeout(240_000);
|
||||
await page.addInitScript(() => {
|
||||
const add = EventTarget.prototype.addEventListener,
|
||||
remove = EventTarget.prototype.removeEventListener,
|
||||
targets = new Map();
|
||||
const key = (type, options) =>
|
||||
`${type}:${typeof options === "boolean" ? options : !!options?.capture}`;
|
||||
EventTarget.prototype.addEventListener = function (type, cb, options) {
|
||||
if (this === window || this instanceof HTMLCanvasElement) {
|
||||
let entries = targets.get(this);
|
||||
if (!entries) {
|
||||
entries = new Map();
|
||||
targets.set(this, entries);
|
||||
}
|
||||
const k = key(type, options);
|
||||
if (!entries.has(k)) entries.set(k, new Set());
|
||||
entries.get(k).add(cb);
|
||||
}
|
||||
return add.call(this, type, cb, options);
|
||||
};
|
||||
EventTarget.prototype.removeEventListener = function (type, cb, options) {
|
||||
targets.get(this)?.get(key(type, options))?.delete(cb);
|
||||
return remove.call(this, type, cb, options);
|
||||
};
|
||||
window.listenerCount = () =>
|
||||
[...targets.values()].reduce(
|
||||
(n, entries) =>
|
||||
n + [...entries.values()].reduce((a, set) => a + set.size, 0),
|
||||
0,
|
||||
);
|
||||
});
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
const measurements = [];
|
||||
for (let i = 0; i < 20; i++) {
|
||||
const id = ["microban", "microduck-legs", "rp1"][i % 3];
|
||||
console.log(`Ownership transition ${i + 1}/20: ${id}`);
|
||||
const sample = await page.evaluate(async (id) => {
|
||||
const model = window.rl.model,
|
||||
data = window.rl.data;
|
||||
const success = await window.__gameApi.switchRobot(id);
|
||||
await new Promise((r) =>
|
||||
requestAnimationFrame(() => requestAnimationFrame(r)),
|
||||
);
|
||||
return {
|
||||
id,
|
||||
success,
|
||||
modelDeleted: model.isDeleted(),
|
||||
dataDeleted: data.isDeleted(),
|
||||
...window.__gameApi.diagnostics(),
|
||||
listeners: window.listenerCount(),
|
||||
toyGeometries:
|
||||
window.rl.scene.getObjectByName("interactive-props")?.children
|
||||
.length ?? 0,
|
||||
};
|
||||
}, id);
|
||||
expect(sample.success).toBe(true);
|
||||
expect(sample.modelDeleted).toBe(true);
|
||||
expect(sample.dataDeleted).toBe(true);
|
||||
measurements.push(sample);
|
||||
}
|
||||
const duck = measurements.filter((s) => s.id === "microduck-legs"),
|
||||
ban = measurements.filter((s) => s.id === "microban"),
|
||||
rp1 = measurements.filter((s) => s.id === "rp1");
|
||||
for (const samples of [duck, ban, rp1]) {
|
||||
expect(samples.at(-1).listeners).toBe(samples[0].listeners);
|
||||
expect(samples.at(-1).sceneChildren).toBe(samples[0].sceneChildren);
|
||||
// Each runtime owns 5–7 independent toy geometries. Compare the fixed
|
||||
// scene allocation after removing this intentionally variable count.
|
||||
expect(
|
||||
samples.at(-1).memory.geometries - samples.at(-1).toyGeometries,
|
||||
).toBeLessThanOrEqual(
|
||||
samples[1].memory.geometries - samples[1].toyGeometries + 1,
|
||||
);
|
||||
expect(samples.at(-1).memory.textures).toBeLessThanOrEqual(
|
||||
samples[1].memory.textures + 1,
|
||||
);
|
||||
}
|
||||
await info.attach("runtime-ownership.json", {
|
||||
body: JSON.stringify(measurements, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
console.log(JSON.stringify(measurements));
|
||||
});
|
||||
@@ -0,0 +1,61 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test("switch is single-flight, drains old ticks, clears held keys and preserves pause intent", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
let release,
|
||||
seen = false;
|
||||
const gate = new Promise((r) => (release = r));
|
||||
await page.route("**/robots/microban/model.xml", async (route) => {
|
||||
seen = true;
|
||||
await gate;
|
||||
await route.continue();
|
||||
});
|
||||
await page.evaluate(() => {
|
||||
window.switchPending = window.__gameApi.switchRobot("microban");
|
||||
});
|
||||
await expect.poll(() => seen).toBe(true);
|
||||
const time = await page.evaluate(() => window.rl.data.time);
|
||||
await page.waitForTimeout(150);
|
||||
expect(await page.evaluate(() => window.rl.data.time)).toBe(time);
|
||||
expect(
|
||||
await page.evaluate(() => window.__gameApi.switchRobot("microduck-legs")),
|
||||
).toBe(false);
|
||||
await page.keyboard.down("w");
|
||||
release();
|
||||
expect(await page.evaluate(() => window.switchPending)).toBe(true);
|
||||
expect(await page.evaluate(() => window.__store.getState().paused)).toBe(
|
||||
true,
|
||||
);
|
||||
expect(await page.evaluate(() => window.rl.running)).toBe(false);
|
||||
expect(await page.evaluate(() => Array.from(window.rl.command))).toEqual([
|
||||
0, 0, 0,
|
||||
]);
|
||||
await page.keyboard.up("w");
|
||||
await page.evaluate(() => window.rl.step(10));
|
||||
await page.keyboard.press("Space");
|
||||
await expect.poll(() => page.evaluate(() => window.rl.data.time)).toBe(0);
|
||||
expect(await page.evaluate(() => window.rl.running)).toBe(false);
|
||||
});
|
||||
test("GLB load failure can retry without poisoned shared cache", async ({
|
||||
page,
|
||||
}) => {
|
||||
let failed = false;
|
||||
await page.route("**/microduck.glb?*", (route) => {
|
||||
if (!failed) {
|
||||
failed = true;
|
||||
return route.fulfill({ status: 503, body: "missing" });
|
||||
}
|
||||
return route.continue();
|
||||
});
|
||||
await page.goto("/");
|
||||
await expect(page.getByRole("alert")).toContainText("Simulation error");
|
||||
await page.getByRole("button", { name: "Retry", exact: true }).click();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
test("real WASM boots and manual steps exclusively own physics time", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
const result = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
const t0 = r.data.time;
|
||||
await r.step(10);
|
||||
const t1 = r.data.time;
|
||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
||||
return {
|
||||
dt: t1 - t0,
|
||||
idleDt: r.data.time - t1,
|
||||
finite: [...r.data.qpos].every(Number.isFinite),
|
||||
};
|
||||
});
|
||||
expect(result.dt).toBeCloseTo(0.2, 10);
|
||||
expect(result.idleDt).toBe(0);
|
||||
expect(result.finite).toBe(true);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
@@ -0,0 +1,255 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
|
||||
test("bright scene has 5–7 free-body toys, no football, and four original-style line colour buttons", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
r.setPropsParked(false);
|
||||
await r.step(60);
|
||||
r.render();
|
||||
});
|
||||
const initial = await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return {
|
||||
toys: r.interactiveProps.map((p) => ({
|
||||
type: p.type,
|
||||
dof: p.dofAdr,
|
||||
mass: r.model.body_mass[p.bodyId],
|
||||
})),
|
||||
meshes: r.scene.getObjectByName("interactive-props").children.length,
|
||||
ballId: r.mujoco.mj_name2id(
|
||||
r.model,
|
||||
r.mujoco.mjtObj.mjOBJ_BODY.value,
|
||||
"ball",
|
||||
),
|
||||
hemisphere: r.scene.parent.children.some(
|
||||
(o) => o.isHemisphereLight && o.intensity >= 0.7,
|
||||
),
|
||||
environment: r.scene.parent.environmentIntensity,
|
||||
robotMaterials: [...r.scene.children]
|
||||
.filter((o) => o.name !== "interactive-props")
|
||||
.flatMap((o) => {
|
||||
const result = [];
|
||||
o.traverse((m) => {
|
||||
if (m.isMesh && m.material?.color)
|
||||
result.push([m.uuid, m.material.color.toArray()]);
|
||||
});
|
||||
return result;
|
||||
}),
|
||||
};
|
||||
});
|
||||
expect(initial.toys.length).toBeGreaterThanOrEqual(5);
|
||||
expect(initial.toys.length).toBeLessThanOrEqual(7);
|
||||
expect(initial.meshes).toBe(initial.toys.length);
|
||||
expect(new Set(initial.toys.map((p) => p.type)).size).toBe(4);
|
||||
expect(initial.toys.every((p) => p.mass > 0 && p.dof >= 0)).toBe(true);
|
||||
expect(initial.ballId).toBe(-1);
|
||||
expect(initial.hemisphere).toBe(true);
|
||||
expect(initial.environment).toBeGreaterThanOrEqual(0.7);
|
||||
const group = page.getByRole("group", { name: "Scene line colours" });
|
||||
await expect(group.getByRole("button")).toHaveCount(4);
|
||||
for (const [label, hex] of [
|
||||
["Cream", "f7e6cb"],
|
||||
["Graphite", "6c6a68"],
|
||||
["Lavender", "bfa9cf"],
|
||||
["Sky", "a9dbe8"],
|
||||
]) {
|
||||
const button = group.getByRole("button", { name: `${label} scene lines` });
|
||||
await button.click();
|
||||
await expect(button).toHaveAttribute("aria-pressed", "true");
|
||||
const values = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
lines = [],
|
||||
robotMaterials = [];
|
||||
r.scene.traverse((o) => {
|
||||
if (o.material?.uniforms?.uSectionColor)
|
||||
lines.push(o.material.uniforms.uSectionColor.value.getHexString());
|
||||
});
|
||||
for (const o of r.scene.children.filter(
|
||||
(o) => o.name !== "interactive-props",
|
||||
))
|
||||
o.traverse((m) => {
|
||||
if (m.isMesh && m.material?.color)
|
||||
robotMaterials.push([m.uuid, m.material.color.toArray()]);
|
||||
});
|
||||
const style = getComputedStyle(
|
||||
document.querySelector('[aria-label="Scene line colours"] button'),
|
||||
);
|
||||
return {
|
||||
lines,
|
||||
robotMaterials,
|
||||
radius: style.borderRadius,
|
||||
width: style.width,
|
||||
height: style.height,
|
||||
};
|
||||
});
|
||||
expect(values.lines).toEqual(Array(5).fill(hex));
|
||||
expect(values.robotMaterials).toEqual(initial.robotMaterials);
|
||||
expect(values.radius).toBe("0px");
|
||||
expect(values.width).toBe(values.height);
|
||||
}
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.chaseCam = false;
|
||||
r.camera.position.set(-0.2, 1.9, 2.7);
|
||||
r.controls.target.set(0.1, 0.05, 0);
|
||||
r.controls.update();
|
||||
});
|
||||
await page.screenshot({
|
||||
path: "test-results/scene-interaction-overview.png",
|
||||
});
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
test("geometry can be dragged with physical force; pause/reset clear grab and restore layout", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.setPropsParked(false);
|
||||
r.chaseCam = false;
|
||||
const spec = r.interactiveProps[0],
|
||||
q = r.data.qpos;
|
||||
q.set([-0.25, 0, spec.pos[2]], spec.qAdr);
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
r.camera.position.set(-0.6, 0.65, 1.2);
|
||||
r.controls.target.set(q[0], q[2], -q[1]);
|
||||
r.controls.update();
|
||||
r.camera.updateMatrixWorld();
|
||||
r.render();
|
||||
});
|
||||
await page.waitForTimeout(250);
|
||||
const point = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
spec = r.interactiveProps[0],
|
||||
q = r.data.qpos;
|
||||
const p = r.controls.target
|
||||
.clone()
|
||||
.set(q[spec.qAdr], q[spec.qAdr + 2], -q[spec.qAdr + 1])
|
||||
.project(r.camera);
|
||||
const rect = document.querySelector("canvas").getBoundingClientRect();
|
||||
return {
|
||||
x: ((p.x + 1) * rect.width) / 2,
|
||||
y: ((1 - p.y) * rect.height) / 2,
|
||||
};
|
||||
});
|
||||
await page.mouse.move(point.x, point.y);
|
||||
await page.mouse.down();
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(false);
|
||||
await page.mouse.move(point.x + 90, point.y - 40, { steps: 6 });
|
||||
const result = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
spec = r.interactiveProps[0];
|
||||
await r.step(15);
|
||||
return {
|
||||
x: r.data.qpos[spec.qAdr],
|
||||
force: Array.from(
|
||||
r.data.xfrc_applied.slice(spec.bodyId * 6, spec.bodyId * 6 + 3),
|
||||
),
|
||||
};
|
||||
});
|
||||
expect(Math.abs(result.x + 0.25)).toBeGreaterThan(0.01);
|
||||
expect(result.force.some((v) => Math.abs(v) > 0.001)).toBe(true);
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(true);
|
||||
await page.mouse.up();
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.data.xfrc_applied).every((v) => v === 0),
|
||||
),
|
||||
).toBe(true);
|
||||
await page.evaluate(() => window.__gameApi.reset());
|
||||
expect(
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return (
|
||||
r.interactiveProps.every((p) =>
|
||||
p.pos.every((v, i) => r.data.qpos[p.qAdr + i] === v),
|
||||
) && r.controls.enabled
|
||||
);
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
test("toys transfer collision momentum, collide with the robot and floor, and survive a mode switch", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
const collision = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
r.setPropsParked(false);
|
||||
const specs = r.interactiveProps;
|
||||
// Keep unrelated toys clear of a two-body collision lane.
|
||||
specs.forEach((p, i) => {
|
||||
r.data.qpos.set([-1 + i * 0.3, -1.1, p.pos[2]], p.qAdr);
|
||||
});
|
||||
const a = specs[0],
|
||||
b = specs[1];
|
||||
r.data.qpos.set([0.1, 0.7, a.pos[2]], a.qAdr);
|
||||
r.data.qpos.set([0.35, 0.7, b.pos[2]], b.qAdr);
|
||||
r.data.qvel[a.dofAdr] = 1.8;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
await r.step(15);
|
||||
const moved = r.data.qpos[b.qAdr] - 0.35;
|
||||
// Launch a toy at the duck. A non-colliding body would cross x=-0.6.
|
||||
r.resetSim();
|
||||
const p = r.interactiveProps.find((s) => s.type === "sphere");
|
||||
r.data.qpos.set([-0.35, 0, 0.09], p.qAdr);
|
||||
r.data.qvel[p.dofAdr] = -1.5;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
let contacts = 0,
|
||||
minX = 10;
|
||||
for (let i = 0; i < 15; i++) {
|
||||
await r.step(1);
|
||||
contacts = Math.max(contacts, r.data.ncon);
|
||||
minX = Math.min(minX, r.data.qpos[p.qAdr]);
|
||||
}
|
||||
await r.step(100);
|
||||
const half = r.world.boundary.half_extent;
|
||||
r.data.qpos.set([half - 0.2, 0.9, p.pos[2]], p.qAdr);
|
||||
r.data.qvel.fill(0, p.dofAdr, p.dofAdr + 6);
|
||||
r.data.qvel[p.dofAdr] = 1.5;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
let wallMax = -Infinity;
|
||||
for (let i = 0; i < 15; i++) {
|
||||
await r.step(1);
|
||||
wallMax = Math.max(wallMax, r.data.qpos[p.qAdr]);
|
||||
}
|
||||
return {
|
||||
moved,
|
||||
contacts,
|
||||
minX,
|
||||
wallMax,
|
||||
half,
|
||||
finite: Array.from(r.data.qpos).every(Number.isFinite),
|
||||
aboveFloor: r.interactiveProps.every(
|
||||
(s) => r.data.qpos[s.qAdr + 2] > 0.025,
|
||||
),
|
||||
};
|
||||
});
|
||||
expect(collision.moved).toBeGreaterThan(0.025);
|
||||
expect(collision.contacts).toBeGreaterThan(0);
|
||||
expect(collision.minX).toBeGreaterThan(-0.58);
|
||||
expect(collision.wallMax).toBeLessThan(collision.half - 0.03);
|
||||
expect(collision.aboveFloor).toBe(true);
|
||||
expect(collision.finite).toBe(true);
|
||||
await page.evaluate(() => window.rl.setLoco("rollers", { force: true }));
|
||||
const switched = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.step(100);
|
||||
r.render();
|
||||
return {
|
||||
count: r.interactiveProps.length,
|
||||
meshes: r.scene.getObjectByName("interactive-props").children.length,
|
||||
finite: Array.from(r.data.qpos).every(Number.isFinite),
|
||||
};
|
||||
});
|
||||
expect(switched.count).toBe(switched.meshes);
|
||||
expect(switched.finite).toBe(true);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
@@ -0,0 +1,68 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
|
||||
test("two simulated minutes of movement with physical toys stay finite in feet and rollers; escape recovery is local", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
r.setPropsParked(false);
|
||||
// A deterministic controller source exercises actual commanded motion,
|
||||
// independent of frame-rate keyboard polling during manual stepping.
|
||||
r.controller.addSource({
|
||||
id: "stability-drive",
|
||||
isActive: () => true,
|
||||
command: new Float32Array([0.25, 0, 0.4]),
|
||||
});
|
||||
});
|
||||
for (const mode of ["legs", "rollers"]) {
|
||||
await page.evaluate(async (mode) => {
|
||||
const r = window.rl;
|
||||
await r.setLoco(mode, { force: true });
|
||||
r.controller.sources
|
||||
.find((s) => s.id === "stability-drive")
|
||||
.command.set(mode === "legs" ? [0.25, 0, 0.4] : [0.4, 0, 0.15]);
|
||||
}, mode);
|
||||
let moved = false;
|
||||
for (let chunk = 0; chunk < 30; chunk++) {
|
||||
const sample = await page.evaluate(async () => {
|
||||
const r = window.rl;
|
||||
await r.step(100);
|
||||
return {
|
||||
finite: [r.data.qpos, r.data.qvel, r.data.ctrl].every((array) =>
|
||||
Array.from(array).every(Number.isFinite),
|
||||
),
|
||||
moved: Math.hypot(r.data.qpos[0] + 0.6, r.data.qpos[1]) > 0.04,
|
||||
inside: r.interactiveProps.every(
|
||||
(p) =>
|
||||
Math.abs(r.data.qpos[p.qAdr]) <
|
||||
r.world.boundary.half_extent + 0.11 &&
|
||||
Math.abs(r.data.qpos[p.qAdr + 1]) <
|
||||
r.world.boundary.half_extent + 0.11,
|
||||
),
|
||||
};
|
||||
});
|
||||
expect(sample.finite).toBe(true);
|
||||
expect(sample.inside).toBe(true);
|
||||
moved ||= sample.moved;
|
||||
}
|
||||
expect(moved).toBe(true);
|
||||
}
|
||||
const recovery = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
p = r.interactiveProps[0];
|
||||
r.data.qpos[p.qAdr] = r.world.boundary.half_extent + 1;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
await r.step(1);
|
||||
return {
|
||||
actual: Array.from(r.data.qpos.slice(p.qAdr, p.qAdr + 3)),
|
||||
expected: p.pos,
|
||||
count: r.interactiveProps.length,
|
||||
};
|
||||
});
|
||||
expect(recovery.actual).toEqual(recovery.expected);
|
||||
expect(recovery.count).toBeGreaterThanOrEqual(5);
|
||||
expect(recovery.count).toBeLessThanOrEqual(7);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
@@ -0,0 +1,157 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { bootDuck } from "./support/simulation.js";
|
||||
|
||||
test("all robots share the same scaled random layout, lighting, line palette and global colour selection", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
let reference;
|
||||
let expected = { name: "Sky", key: "blue", hex: "a9dbe8" };
|
||||
for (const id of ["microduck-legs", "microban", "rp1", "microduck-legs"]) {
|
||||
if ((await page.evaluate(() => window.__store.getState().robotId)) !== id)
|
||||
await page.evaluate((id) => window.__gameApi.switchRobot(id), id);
|
||||
await expect(
|
||||
page.getByRole("group", { name: "Scene line colours" }),
|
||||
).toBeVisible();
|
||||
if (!reference)
|
||||
await page.getByRole("button", { name: "Sky scene lines" }).click();
|
||||
const state = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
scale = r.world.boundary.half_extent / 2.25;
|
||||
const lines = [];
|
||||
r.scene.traverse((o) => {
|
||||
if (o.material?.uniforms?.uSectionColor)
|
||||
lines.push(o.material.uniforms.uSectionColor.value.getHexString());
|
||||
});
|
||||
return {
|
||||
specs: r.interactiveProps.map((p) => ({
|
||||
name: p.name,
|
||||
type: p.type,
|
||||
color: p.color,
|
||||
pos: p.pos.map((v) => v / scale),
|
||||
size: p.size.map((v) => v / scale),
|
||||
})),
|
||||
count: r.scene.getObjectByName("interactive-props").children.length,
|
||||
lines,
|
||||
lineColor: window.__store.getState().lineColor,
|
||||
lights: r.scene.parent.children
|
||||
.filter((o) => o.isLight)
|
||||
.map((o) => [o.type, o.intensity, o.color.getHex()]),
|
||||
environment: r.scene.parent.environmentIntensity,
|
||||
drag: window.__store.getState().runtimeCapabilities.physicalDrag,
|
||||
};
|
||||
});
|
||||
expect(state.count).toBeGreaterThanOrEqual(5);
|
||||
expect(state.count).toBeLessThanOrEqual(7);
|
||||
expect(state.lines).toEqual(Array(5).fill(expected.hex));
|
||||
expect(state.lineColor).toBe(expected.key);
|
||||
expect(state.drag).toBe(true);
|
||||
if (!reference) reference = state;
|
||||
state.specs.forEach((p, i) => {
|
||||
expect(p.type).toBe(reference.specs[i].type);
|
||||
expect(p.color).toBe(reference.specs[i].color);
|
||||
p.pos.forEach((v, j) =>
|
||||
expect(v).toBeCloseTo(reference.specs[i].pos[j], 12),
|
||||
);
|
||||
p.size.forEach((v, j) =>
|
||||
expect(v).toBeCloseTo(reference.specs[i].size[j], 12),
|
||||
);
|
||||
});
|
||||
expect(state.lights).toEqual(reference.lights);
|
||||
expect(state.environment).toBe(reference.environment);
|
||||
await expect(
|
||||
page.getByRole("button", { name: `${expected.name} scene lines` }),
|
||||
).toHaveAttribute("aria-pressed", "true");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Rollers", exact: true }),
|
||||
).toHaveCount(id === "microduck-legs" ? 1 : 0);
|
||||
// Also carry a choice made in another robot back to Microduck.
|
||||
if (id === "rp1") {
|
||||
await page.getByRole("button", { name: "Lavender scene lines" }).click();
|
||||
expected = { name: "Lavender", key: "purple", hex: "bfa9cf" };
|
||||
}
|
||||
}
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
for (const id of ["microban", "rp1"]) {
|
||||
test(`${id}: shared toys collide with walls, drag with real force and release on pause`, async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = await bootDuck(page);
|
||||
await page.evaluate((id) => window.__gameApi.switchRobot(id), id);
|
||||
const wall = await page.evaluate(async () => {
|
||||
const r = window.rl,
|
||||
scale = r.world.boundary.half_extent / 2.25,
|
||||
p = r.interactiveProps.find((s) => s.type === "sphere"),
|
||||
half = r.world.boundary.half_extent;
|
||||
r.data.qpos.set([half - 0.2 * scale, 0.9 * scale, p.pos[2]], p.qAdr);
|
||||
r.data.qvel[p.dofAdr] = 1.5 * scale;
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
let max = -Infinity;
|
||||
for (let i = 0; i < 15; i++) {
|
||||
await r.step(1);
|
||||
max = Math.max(max, r.data.qpos[p.qAdr]);
|
||||
}
|
||||
await r.resetSim();
|
||||
return { max, limit: half - 0.025 * scale };
|
||||
});
|
||||
expect(wall.max).toBeLessThan(wall.limit);
|
||||
await page.getByRole("button", { name: /Keyboard controls/ }).click();
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
scale = r.world.scale ?? 1,
|
||||
p = r.interactiveProps[0],
|
||||
q = r.data.qpos;
|
||||
q.set([0.25 * scale, -0.3 * scale, p.pos[2]], p.qAdr);
|
||||
r.mujoco.mj_forward(r.model, r.data);
|
||||
r.camera.position.set(q[0], q[2] + 0.6 * scale, 1.5 * scale);
|
||||
r.controls.target.set(q[0], q[2], -q[1]);
|
||||
r.controls.update();
|
||||
window.__gameApi.resume();
|
||||
});
|
||||
await page.waitForTimeout(200);
|
||||
const point = await page.evaluate(() => {
|
||||
const r = window.rl,
|
||||
p = r.interactiveProps[0],
|
||||
q = r.data.qpos,
|
||||
rect = document.querySelector("canvas").getBoundingClientRect();
|
||||
const v = r.controls.target
|
||||
.clone()
|
||||
.set(q[p.qAdr], q[p.qAdr + 2], -q[p.qAdr + 1])
|
||||
.project(r.camera);
|
||||
return {
|
||||
x: ((v.x + 1) * rect.width) / 2,
|
||||
y: ((1 - v.y) * rect.height) / 2,
|
||||
};
|
||||
});
|
||||
await page.mouse.move(point.x, point.y);
|
||||
await page.mouse.down();
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(false);
|
||||
await page.mouse.move(point.x + 70, point.y - 35, { steps: 5 });
|
||||
await page.waitForTimeout(200);
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.data.xfrc_applied).some((v) => Math.abs(v) > 1e-5),
|
||||
),
|
||||
).toBe(true);
|
||||
await page.evaluate(() => window.__gameApi.pause());
|
||||
expect(await page.evaluate(() => window.rl.controls.enabled)).toBe(true);
|
||||
expect(
|
||||
await page.evaluate(() =>
|
||||
Array.from(window.rl.data.xfrc_applied).every((v) => v === 0),
|
||||
),
|
||||
).toBe(true);
|
||||
await page.mouse.up();
|
||||
await page.evaluate(() => window.__gameApi.reset());
|
||||
expect(
|
||||
await page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return r.interactiveProps.every((p) =>
|
||||
p.pos.every((v, i) => r.data.qpos[p.qAdr + i] === v),
|
||||
);
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
test("automatically runs with inline pause, reset and keyboard help; no menu assets", async ({
|
||||
page,
|
||||
}) => {
|
||||
const errors = [],
|
||||
requests = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
page.on("request", (r) => requests.push(r.url()));
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
expect(await page.evaluate(() => window.rl.data.time)).toBeGreaterThanOrEqual(
|
||||
0,
|
||||
);
|
||||
await expect(page.getByRole("dialog")).toHaveCount(0);
|
||||
await expect(page.getByText("Waddle in", { exact: true })).toHaveCount(0);
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Keyboard controls", exact: false }),
|
||||
).toHaveAttribute("aria-expanded", "true");
|
||||
await page.getByRole("button", { name: "Pause", exact: true }).click();
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
const time = await page.evaluate(() => window.rl.data.time);
|
||||
await page.waitForTimeout(400);
|
||||
expect(await page.evaluate(() => window.rl.data.time)).toBe(time);
|
||||
await expect(page.getByRole("status")).toHaveText(/Paused/);
|
||||
await page.keyboard.press("Escape");
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.rl.data.time))
|
||||
.toBeGreaterThan(time);
|
||||
await page.getByRole("button", { name: "Pause", exact: true }).click();
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
await page.getByRole("button", { name: "Reset", exact: true }).click();
|
||||
await expect.poll(() => page.evaluate(() => window.rl.data.time)).toBe(0);
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Continue", exact: true }),
|
||||
).toBeEnabled();
|
||||
await page
|
||||
.getByRole("button", { name: "Keyboard controls", exact: false })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Keyboard controls", exact: false }),
|
||||
).toHaveAttribute("aria-expanded", "false");
|
||||
expect(
|
||||
requests.filter(
|
||||
(url) => url.includes("nostr") || url.includes("duck-head-mark"),
|
||||
),
|
||||
).toEqual([]);
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
test("paused sit timer freezes; keyboard focus does not send robot commands", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
await page.waitForFunction(() => window.rl);
|
||||
await page.evaluate(() => window.rl.setMode("sit"));
|
||||
await page.getByRole("button", { name: "Pause", exact: true }).click();
|
||||
await page.evaluate(() => window.rl.pause());
|
||||
const before = await page.evaluate(() => window.rl.sitFlag);
|
||||
await page.waitForTimeout(1100);
|
||||
expect(await page.evaluate(() => window.rl.sitFlag)).toBe(before);
|
||||
await page.keyboard.press("ArrowUp");
|
||||
expect(await page.evaluate(() => Array.from(window.rl.velCmd))).toEqual([
|
||||
0, 0, 0,
|
||||
]);
|
||||
// Native Space activates the focused Continue button, not robot reset.
|
||||
await page.keyboard.press("Space");
|
||||
await expect.poll(() => page.evaluate(() => window.rl.running)).toBe(true);
|
||||
expect(await page.evaluate(() => window.rl.mode)).toBe("sitstand");
|
||||
await page.keyboard.down("w");
|
||||
expect(await page.evaluate(() => window.rl.velCmd[0])).toBeGreaterThan(0);
|
||||
await page.keyboard.up("w");
|
||||
});
|
||||
test("load failure is inline and retry boots a clean instance", async ({
|
||||
page,
|
||||
}) => {
|
||||
let failed = false;
|
||||
await page.route("**/policies/BEST_alpha_walking.onnx", (route) => {
|
||||
if (!failed) {
|
||||
failed = true;
|
||||
return route.fulfill({ status: 404, body: "not found" });
|
||||
}
|
||||
return route.continue();
|
||||
});
|
||||
await page.goto("/");
|
||||
await expect(page.getByRole("alert")).toContainText("Simulation error");
|
||||
await page.getByRole("button", { name: "Retry", exact: true }).click();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Pause", exact: true }),
|
||||
).toBeEnabled();
|
||||
await expect(page.getByRole("alert")).toHaveCount(0);
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
import { expect } from "@playwright/test";
|
||||
export async function bootDuck(page, { legacyPhysics = false } = {}) {
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await page.addInitScript(() => {
|
||||
let seed = 123456789;
|
||||
Math.random = () =>
|
||||
(seed = (1664525 * seed + 1013904223) >>> 0) / 4294967296;
|
||||
});
|
||||
await page.goto(`/?boot=1&test=1${legacyPhysics ? "&oracle=legacy" : ""}`);
|
||||
await page.waitForFunction(
|
||||
() => window.rl?.prepareTest || window.__store?.getState().bootFailed,
|
||||
);
|
||||
const failed = await page.evaluate(
|
||||
() => window.__store.getState().bootFailed,
|
||||
);
|
||||
expect(
|
||||
failed,
|
||||
JSON.stringify(await page.evaluate(() => window.__store.getState())),
|
||||
).toBe(false);
|
||||
await page.evaluate(() => window.rl.prepareTest());
|
||||
expect(errors).toEqual([]);
|
||||
return errors;
|
||||
}
|
||||
export async function snapshot(page) {
|
||||
return page.evaluate(() => {
|
||||
const r = window.rl;
|
||||
return {
|
||||
time: r.data.time,
|
||||
mode: r.mode,
|
||||
recovery: r.recovery,
|
||||
qpos: Array.from(r.data.qpos),
|
||||
qvel: Array.from(r.data.qvel),
|
||||
ctrl: Array.from(r.data.ctrl),
|
||||
lastAction: Array.from(r.lastAction),
|
||||
obs: Array.from(r.buildObs()),
|
||||
};
|
||||
});
|
||||
}
|
||||
+1
-8
@@ -4,14 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Microduck</title>
|
||||
<!-- Anton: the landing's brutal print display voice (FancyTitle /
|
||||
ComicButton on the pollen-website Microduck pages). -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Anton&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<!-- Anton is bundled locally by main.jsx; no blocking external font CSS. -->
|
||||
<style>
|
||||
:root {
|
||||
--ink: #08080c;
|
||||
|
||||
Generated
+237
-92
@@ -1,18 +1,20 @@
|
||||
{
|
||||
"name": "microduck-sandbox",
|
||||
"version": "0.1.0",
|
||||
"version": "0.5.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "microduck-sandbox",
|
||||
"version": "0.1.0",
|
||||
"version": "0.5.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@fontsource/anton": "^5.3.0",
|
||||
"@mui/material": "^9.3.1",
|
||||
"@mujoco/mujoco": "^3.11.0",
|
||||
"@react-three/fiber": "^9.7.0",
|
||||
"ajv": "^8.20.0",
|
||||
"onnxruntime-web": "^1.27.0",
|
||||
"react": "^19.2.8",
|
||||
"react-dom": "^19.2.8",
|
||||
@@ -21,8 +23,10 @@
|
||||
"zustand": "^5.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.64.1",
|
||||
"@vitejs/plugin-react": "^6.1.0",
|
||||
"vite": "^8.2.2"
|
||||
"prettier": "^3.9.10",
|
||||
"vite": "^8.3.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@@ -310,6 +314,15 @@
|
||||
"integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@fontsource/anton": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/anton/-/anton-5.3.0.tgz",
|
||||
"integrity": "sha512-OR1D5n124n2XRs66SbX7IjcOSptljEJE8FcDNnlni2y1/M6KpTx7cU2PIWzTSsBj4WFkHPw24On8qw3qkQZuTw==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.13",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
||||
@@ -568,13 +581,29 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-project/types": {
|
||||
"version": "0.146.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz",
|
||||
"integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==",
|
||||
"version": "0.155.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.155.0.tgz",
|
||||
"integrity": "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/Boshen"
|
||||
"url": "https://github.com/sponsors/oxc-project"
|
||||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.64.1",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.64.1.tgz",
|
||||
"integrity": "sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.64.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
@@ -693,9 +722,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm-eabi": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz",
|
||||
"integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.15.tgz",
|
||||
"integrity": "sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -710,9 +739,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz",
|
||||
"integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.15.tgz",
|
||||
"integrity": "sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -727,9 +756,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-arm64": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz",
|
||||
"integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.15.tgz",
|
||||
"integrity": "sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -744,9 +773,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-x64": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz",
|
||||
"integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.15.tgz",
|
||||
"integrity": "sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -761,9 +790,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-freebsd-x64": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz",
|
||||
"integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.15.tgz",
|
||||
"integrity": "sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -778,9 +807,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz",
|
||||
"integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.15.tgz",
|
||||
"integrity": "sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -795,13 +824,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-gnu": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz",
|
||||
"integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.15.tgz",
|
||||
"integrity": "sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -812,13 +844,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-musl": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz",
|
||||
"integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.15.tgz",
|
||||
"integrity": "sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -829,13 +864,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz",
|
||||
"integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.15.tgz",
|
||||
"integrity": "sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -846,13 +884,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-s390x-gnu": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz",
|
||||
"integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.15.tgz",
|
||||
"integrity": "sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -863,13 +904,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-gnu": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz",
|
||||
"integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.15.tgz",
|
||||
"integrity": "sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -880,13 +924,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-musl": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz",
|
||||
"integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.15.tgz",
|
||||
"integrity": "sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -897,9 +944,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-openharmony-arm64": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz",
|
||||
"integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.15.tgz",
|
||||
"integrity": "sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -914,9 +961,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-arm64-msvc": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz",
|
||||
"integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.15.tgz",
|
||||
"integrity": "sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -931,9 +978,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-x64-msvc": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz",
|
||||
"integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.15.tgz",
|
||||
"integrity": "sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1055,6 +1102,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "8.20.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
|
||||
"integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-uri": "^3.0.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-macros": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",
|
||||
@@ -1236,6 +1299,28 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-uri": {
|
||||
"version": "3.1.9",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
|
||||
"integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fastify"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/fastify"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
@@ -1416,6 +1501,12 @@
|
||||
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lightningcss": {
|
||||
"version": "1.33.0",
|
||||
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
|
||||
@@ -1708,9 +1799,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.18",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
|
||||
"integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
|
||||
"version": "3.3.20",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
|
||||
"integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1807,9 +1898,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
|
||||
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
|
||||
"integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -1825,10 +1916,39 @@
|
||||
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.64.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz",
|
||||
"integrity": "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.64.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.64.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz",
|
||||
"integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"playwright-core": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.26",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
|
||||
"integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
|
||||
"version": "8.5.32",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz",
|
||||
"integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1846,14 +1966,30 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.17",
|
||||
"nanoid": "^3.3.20",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
"source-map-js": "^1.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.9.10",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz",
|
||||
"integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/prop-types": {
|
||||
"version": "15.8.1",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||
@@ -1952,6 +2088,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.12",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
|
||||
@@ -1983,13 +2128,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz",
|
||||
"integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.15.tgz",
|
||||
"integrity": "sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@oxc-project/types": "=0.146.0",
|
||||
"@oxc-project/types": "=0.155.0",
|
||||
"@rolldown/pluginutils": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
@@ -1999,21 +2144,21 @@
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.5",
|
||||
"@rolldown/binding-android-arm64": "1.2.5",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.5",
|
||||
"@rolldown/binding-darwin-x64": "1.2.5",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.5",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.5",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.5",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.5",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.5",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.5",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.5",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.5",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.5",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.5",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.5"
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.15",
|
||||
"@rolldown/binding-android-arm64": "1.2.15",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.15",
|
||||
"@rolldown/binding-darwin-x64": "1.2.15",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.15",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.15",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.15",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.15",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.15",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.15",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.15",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.15",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.15",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.15",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.15"
|
||||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
@@ -2032,9 +2177,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
|
||||
"integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
@@ -2116,16 +2261,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz",
|
||||
"integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==",
|
||||
"version": "8.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz",
|
||||
"integrity": "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lightningcss": "^1.33.0",
|
||||
"picomatch": "^4.0.5",
|
||||
"postcss": "^8.5.26",
|
||||
"rolldown": "~1.2.4",
|
||||
"picomatch": "^4.0.7",
|
||||
"postcss": "^8.5.30",
|
||||
"rolldown": "~1.2.14",
|
||||
"tinyglobby": "^0.2.17"
|
||||
},
|
||||
"bin": {
|
||||
@@ -2142,7 +2287,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^20.19.0 || >=22.12.0",
|
||||
"@vitejs/devtools": "^0.4.0 || ^0.5.0",
|
||||
"@vitejs/devtools": "^0.7.1 || ^0.8.0",
|
||||
"esbuild": "^0.27.0 || ^0.28.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "^4.0.0",
|
||||
|
||||
+12
-3
@@ -1,20 +1,27 @@
|
||||
{
|
||||
"name": "microduck-sandbox",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"version": "0.5.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"test": "node --test \"test/**/*.test.js\"",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"test:e2e": "playwright test",
|
||||
"test:regression": "playwright test microduck-regression",
|
||||
"baseline:record": "RECORD_BASELINE=1 playwright test microduck-regression",
|
||||
"validate:packages": "node scripts/validate-packages.mjs",
|
||||
"format:check": "prettier --check \"src/platform/**/*.js\" \"src/robots/**/*.js\" \"e2e/**/*.{js,html}\" \"scripts/*.mjs\" \"test/*.test.js\" \"src/ui/{ControlsHelp,SimulationToolbar,RuntimeStatus}.jsx\" \"src/{App,scene/GameCanvas}.jsx\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@fontsource/anton": "^5.3.0",
|
||||
"@mui/material": "^9.3.1",
|
||||
"@mujoco/mujoco": "^3.11.0",
|
||||
"@react-three/fiber": "^9.7.0",
|
||||
"ajv": "^8.20.0",
|
||||
"onnxruntime-web": "^1.27.0",
|
||||
"react": "^19.2.8",
|
||||
"react-dom": "^19.2.8",
|
||||
@@ -23,7 +30,9 @@
|
||||
"zustand": "^5.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.64.1",
|
||||
"@vitejs/plugin-react": "^6.1.0",
|
||||
"vite": "^8.2.2"
|
||||
"prettier": "^3.9.10",
|
||||
"vite": "^8.3.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { defineConfig } from "@playwright/test";
|
||||
export default defineConfig({
|
||||
testDir: "./e2e",
|
||||
timeout: 180_000,
|
||||
workers: 1,
|
||||
reporter: [["list"], ["json", { outputFile: "test-results/results.json" }]],
|
||||
expect: { timeout: 30_000 },
|
||||
use: {
|
||||
baseURL: process.env.TEST_BASE_URL || "http://127.0.0.1:5173",
|
||||
headless: true,
|
||||
viewport: { width: 1440, height: 900 },
|
||||
launchOptions: {
|
||||
args: [
|
||||
"--use-gl=angle",
|
||||
"--use-angle=swiftshader",
|
||||
"--enable-unsafe-swiftshader",
|
||||
],
|
||||
},
|
||||
trace: "retain-on-failure",
|
||||
screenshot: "only-on-failure",
|
||||
},
|
||||
webServer: process.env.TEST_BASE_URL
|
||||
? undefined
|
||||
: {
|
||||
command: "npm run dev -- --host 127.0.0.1",
|
||||
url: "http://127.0.0.1:5173",
|
||||
reuseExistingServer: true,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Anton Project Authors (https://github.com/googlefonts/AntonFont.git)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "microduck-legs",
|
||||
"family": "microduck",
|
||||
"name": "Microduck",
|
||||
"manifest": "microduck-legs/robot.json"
|
||||
},
|
||||
{
|
||||
"id": "microduck-rollers",
|
||||
"family": "microduck",
|
||||
"name": "Microduck",
|
||||
"manifest": "microduck-rollers/robot.json"
|
||||
},
|
||||
{
|
||||
"id": "microban",
|
||||
"family": "microban",
|
||||
"name": "Microban",
|
||||
"manifest": "microban/robot.json"
|
||||
},
|
||||
{
|
||||
"id": "rp1",
|
||||
"family": "rp1",
|
||||
"name": "RP1",
|
||||
"manifest": "rp1/robot.json"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
# Microban bundled source assets
|
||||
|
||||
Imported with `python3 app/scripts/import-microban.py /path/to/microban`.
|
||||
|
||||
The precise origin remote, HEAD, dirty-worktree flag, per-file SHA-256 and behavior-reference hashes are in `source-manifest.json`. The source worktree was dirty at import: the HEAD alone is **not** a complete description of the behavior used as reference. Runtime does not read that worktree or require Python.
|
||||
|
||||
- `model.xml`: copied from `src/model/mjcf/robot.xml`, unmodified; its Apache-2.0 copyright/license header is retained.
|
||||
- `assets/*.stl`: only the 25 mesh files actually declared by that MJCF, copied byte-for-byte from the source model asset directory (not the separate `cad/` directory).
|
||||
- `policies/walk.onnx`: copied byte-for-byte from `src/agents/walk.onnx`.
|
||||
- `LICENSES/SOURCE-LICENSE.txt`: entire upstream license/attribution notice. The upstream summary assigns GPL-3.0 to control software outside `cad/` and CC-BY-NC-SA-4.0 to `cad/`. Model-file-specific notices take precedence for their respective files. No assertion is made that all files have one uniform license. Preserve these notices when redistributing, and check upstream terms for intended distribution.
|
||||
|
||||
Browser adaptations (not edits to the copied XML): 0.005 s physics timestep; separate flat ground; explicit 18-joint policy order excluding head; body-frame gravity and IMU-site gyroscope following source observation semantics; limited joint-PD torque control instead of BAM. Default PD kp=0.3 Nm/rad, kd=0.02 Nm·s/rad, torque limit=0.65 Nm are experimentally selected simplified parameters, not metadata gains and not a claim of hardware equivalence.
|
||||
|
||||
## Textured visual replacement
|
||||
|
||||
`visuals/*.glb` are the 20 files copied byte-for-byte from the user-supplied `microban2.zip`, replacing the earlier `microban.zip` visual export, not from the upstream checkout above. They retain their embedded PBR materials and 46 textures (45 normal maps and one screen base-colour image, all 1024 × 1024). The archive contains no license notice; **confirm public redistribution rights with the asset owner** rather than assuming the upstream model license covers these replacements. Archive and file SHA-256 values are recorded separately in `visual-source-manifest.json`.
|
||||
|
||||
Reimport with `python3 app/scripts/import-microban-visuals.py /path/to/microban2.zip`. This does not change `model.xml`, the original STL files, policy, original source manifest or the reviewed `render.body_visuals` mapping in `robot.json`.
|
||||
|
||||
The GLBs have different local frames from the original MJCF. `robot.json` records fixed, visual-only rigid transforms (metres and xyzw quaternions), checked against the original per-body geometry; body-local bounding-box endpoint differences are at most 3.01 mm, allowing the replacement's added details. Mapping: BASE → trunk; LINK1 → head; LINK2–4 → right arm; LINK5–7 → left arm; LINK8–13 → left leg; LINK14–19 → right leg. Vertex positions and node transforms in all 20 GLBs are unchanged from the previous visual export, so the existing body registration is retained. Runtime follows the existing MuJoCo body poses and hides only the replaced visual geoms; collisions, inertias, joints, policy inputs and actuation are untouched. This is geometric registration, not a claim that the archive supplied authoritative joint-frame metadata.
|
||||
|
||||
No Placo, real-robot control, source Python code, CAD project, BAM battery model or communication delays are bundled into the browser runtime.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,618 @@
|
||||
<!--
|
||||
Copyright 2026 Marc Duclusaud
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at:
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
-->
|
||||
|
||||
<!-- Generated using onshape-to-robot -->
|
||||
<!-- Onshape https://cad.onshape.com/documents/d424992a192a8ce34ffce163/v/d1df625a85f2de984257464b/e/b34620a03cc3a684006c5867 -->
|
||||
<mujoco model="microban">
|
||||
<compiler angle="radian" meshdir="assets" autolimits="true"/>
|
||||
<default>
|
||||
<default class="microban">
|
||||
<joint frictionloss="0.1" armature="0.005"/>
|
||||
<position kp="50" dampratio="1"/>
|
||||
<default class="visual">
|
||||
<geom type="mesh" contype="0" conaffinity="0" group="2"/>
|
||||
</default>
|
||||
<default class="collision">
|
||||
<geom group="3"/>
|
||||
</default>
|
||||
</default>
|
||||
<default class="xl330">
|
||||
<joint damping="0.041" frictionloss="0.013" armature="0.0018"/>
|
||||
<motor gear="1"/>
|
||||
</default>
|
||||
</default>
|
||||
<sensor>
|
||||
<framequat name="orientation" objtype="site" noise="0.001" objname="imu"/>
|
||||
<gyro name="angular-velocity" site="imu" noise="0.005"/>
|
||||
<gyro name="imu_ang_vel" site="imu"/>
|
||||
<velocimeter name="imu_lin_vel" site="imu"/>
|
||||
<accelerometer name="imu_accel" site="imu"/>
|
||||
<subtreeangmom name="root_angmom" body="trunk"/>
|
||||
</sensor>
|
||||
<worldbody>
|
||||
<!-- Link trunk -->
|
||||
<body name="trunk" pos="0 0 0" quat="1 0 0 0" childclass="microban">
|
||||
<freejoint name="trunk_freejoint"/>
|
||||
<inertial pos="-0.00454781 -0.000104579 0.053896" mass="0.347283" fullinertia="0.000608722 0.000477224 0.000357224 -5.1387e-07 -1.16287e-05 1.9299e-06"/>
|
||||
<!-- Part stp39__configuration__2_2x8 -->
|
||||
<!-- Part stp39__configuration__2_2x8_2 -->
|
||||
<!-- Part arm_bearing_support__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="0.00575 -0.036 -0.0484" quat="0.707107 0 0 0.707107" mesh="arm_bearing_support__configuration_right" material="arm_bearing_support__configuration_right_material"/>
|
||||
<!-- Part xl330_without_horn -->
|
||||
<geom type="mesh" class="visual" pos="0 -0.044 0.081" quat="0.707107 0.707107 0 0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part steel_shim -->
|
||||
<!-- Part pelvis__configuration_right -->
|
||||
<geom class="collision" pos="0 0 0.05375" quat="0.707107 0 0 0.707107" type="box" size="0.054 0.008 0.05375"/>
|
||||
<geom class="collision" pos="0 0 0.05775" quat="0.707107 0 0 0.707107" type="box" size="0.029 0.033 0.04275"/>
|
||||
<geom type="mesh" class="visual" pos="0.00575 -0.036 -0.0484" quat="0.707107 0 0 0.707107" mesh="pelvis__configuration_right" material="pelvis__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_3 -->
|
||||
<!-- Part arm_bearing_support__configuration_right_2 -->
|
||||
<geom type="mesh" class="visual" pos="-0.00575 0.036 -0.0484" quat="0.707107 -0 0 -0.707107" mesh="arm_bearing_support__configuration_right" material="arm_bearing_support__configuration_right_material"/>
|
||||
<!-- Part xl330_without_horn_2 -->
|
||||
<geom type="mesh" class="visual" pos="-0.00204165 -0 0.1195" quat="0.707107 0 0 0.707107" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_4 -->
|
||||
<!-- Part hat -->
|
||||
<!-- Part xl330_without_horn_3 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0.036 0.0065" quat="0 0 -1 0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part steel_shim_2 -->
|
||||
<!-- Part washer -->
|
||||
<!-- Part xl330_without_horn_4 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0.044 0.081" quat="0 0 -0.707107 -0.707107" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_5 -->
|
||||
<!-- Part steel_shim_3 -->
|
||||
<!-- Part steel_shim_4 -->
|
||||
<!-- Part stp39__configuration__2_2x8_6 -->
|
||||
<!-- Part chest__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="0.00575 -0.036 -0.0484" quat="0.707107 0 0 0.707107" mesh="chest__configuration_right" material="chest__configuration_right_material"/>
|
||||
<!-- Part trunk_top__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="0.00575 -0.036 -0.0484" quat="0.707107 0 0 0.707107" mesh="trunk_top__configuration_right" material="trunk_top__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_7 -->
|
||||
<!-- Part washer_2 -->
|
||||
<!-- Part pom_shim -->
|
||||
<!-- Part pom_shim_2 -->
|
||||
<!-- Part stp39__configuration__2_2x8_8 -->
|
||||
<!-- Part stp39__configuration__2_2x8_9 -->
|
||||
<!-- Part stp39__configuration__2_2x8_10 -->
|
||||
<!-- Part stp39__configuration__2_2x8_11 -->
|
||||
<!-- Part steel_shim_5 -->
|
||||
<!-- Part steel_shim_6 -->
|
||||
<!-- Part battery -->
|
||||
<geom type="mesh" class="visual" pos="-0.01 -0 0.05115" quat="0.5 0.5 -0.5 -0.5" mesh="battery" material="battery_material"/>
|
||||
<!-- Part bms -->
|
||||
<!-- Part steel_shim_7 -->
|
||||
<!-- Part stp39__configuration__2_2x8_12 -->
|
||||
<!-- Part pom_shim_3 -->
|
||||
<!-- Part switch -->
|
||||
<geom type="mesh" class="visual" pos="-0.014 0.02 0.1075" quat="1 0 0 0" mesh="switch" material="switch_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_13 -->
|
||||
<!-- Part stp39__configuration__2_2x8_14 -->
|
||||
<!-- Part stp39__configuration__2_2x8_15 -->
|
||||
<!-- Part raspberry_pi_zero_2w -->
|
||||
<!-- Part washer_3 -->
|
||||
<!-- Part stp39__configuration__2_2x8_16 -->
|
||||
<!-- Part washer_4 -->
|
||||
<!-- Part steel_shim_8 -->
|
||||
<!-- Part stp39__configuration__2_2x8_17 -->
|
||||
<!-- Part xl330_without_horn_5 -->
|
||||
<geom type="mesh" class="visual" pos="0 -0.036 0.0065" quat="0 1 0 -0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part pom_shim_4 -->
|
||||
<!-- Part stp39__configuration__2_2x8_18 -->
|
||||
<!-- Part charger -->
|
||||
<!-- Frame body -->
|
||||
<site group="3" name="body" pos="0 0 0" quat="1 -0 -0 -0"/>
|
||||
<!-- Frame imu -->
|
||||
<site group="3" name="imu" pos="0.01483 -0.002 0.0675" quat="0.5 -0.5 -0.5 0.5"/>
|
||||
<!-- Link head -->
|
||||
<body name="head" pos="-0.00204165 -0 0.126" quat="0.707107 0 0 0.707107">
|
||||
<!-- Joint from trunk to head -->
|
||||
<joint axis="0 0 1" name="head" type="hinge" range="-1.5707963267949783 1.5707963267948148" class="xl330"/>
|
||||
<inertial pos="5.1303e-08 -0.0074561 0.0161837" mass="0.0166215" fullinertia="2.92963e-06 3.58354e-06 4.24694e-06 -1.6e-11 4e-12 2.61187e-07"/>
|
||||
<!-- Part stp39__configuration__2x6 -->
|
||||
<!-- Part stp39__configuration__2x6_2 -->
|
||||
<!-- Part head__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="-0.036 -0.00779165 -0.1744" quat="1 -0 -0 0" mesh="head__configuration_right" material="head__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_3 -->
|
||||
<!-- Part stp39__configuration__2x6_4 -->
|
||||
</body>
|
||||
<!-- Link shoulder -->
|
||||
<body name="shoulder" pos="0 -0.0505 0.081" quat="0.707107 -0.707107 -0 0">
|
||||
<!-- Joint from trunk to shoulder -->
|
||||
<joint axis="0 0 1" name="right_shoulder_pitch" type="hinge" range="-3.141592653589793 3.141592653589793" class="xl330"/>
|
||||
<inertial pos="4.19e-10 2.814e-09 -0.00850029" mass="0.00898451" fullinertia="1.06003e-06 1.78233e-06 1.86739e-06 0 0 -0"/>
|
||||
<!-- Part stp39__configuration__2x6_5 -->
|
||||
<!-- Part stp39__configuration__2x6_6 -->
|
||||
<!-- Part stp39__configuration__2x6_7 -->
|
||||
<!-- Part stp39__configuration__2x6_8 -->
|
||||
<!-- Part stp39__configuration__2x6_9 -->
|
||||
<!-- Part stp39__configuration__2x6_10 -->
|
||||
<!-- Part stp39__configuration__2x6_11 -->
|
||||
<!-- Part stp39__configuration__2x6_12 -->
|
||||
<!-- Part stp39__configuration__2x6_13 -->
|
||||
<!-- Part shoulder -->
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0245 0.0132" quat="0.5 -0.5 -0.5 -0.5" mesh="shoulder" material="shoulder_material"/>
|
||||
<!-- Part stp39__configuration__2x6_14 -->
|
||||
<!-- Part stp39__configuration__2x6_15 -->
|
||||
<!-- Part stp39__configuration__2x6_16 -->
|
||||
<!-- Link humerus__configuration_right -->
|
||||
<body name="humerus__configuration_right" pos="0.0145 0 -0.0195" quat="0 0.707107 0 0.707107">
|
||||
<!-- Joint from shoulder to humerus__configuration_right -->
|
||||
<joint axis="0 0 1" name="right_shoulder_roll" type="hinge" range="-3.1415926535897922 8.881784197001252e-16" class="xl330"/>
|
||||
<inertial pos="-0.000309872 -0.0252784 -0.0143918" mass="0.0416867" fullinertia="1.76899e-05 3.95132e-06 1.75854e-05 -3.03216e-07 -2.278e-09 -7.8184e-08"/>
|
||||
<!-- Part stp39__configuration__2_2x8_19 -->
|
||||
<!-- Part stp39__configuration__2_2x8_20 -->
|
||||
<!-- Part stp39__configuration__2_2x8_21 -->
|
||||
<!-- Part stp39__configuration__2_2x8_22 -->
|
||||
<!-- Part xl330 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 -0.0065" quat="1 -0 -0 0" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_23 -->
|
||||
<!-- Part stp39__configuration__2_2x8_24 -->
|
||||
<!-- Part xl330_without_horn_6 -->
|
||||
<geom type="mesh" class="visual" pos="-0.008 -0.0515 -0.0145" quat="0 0.707107 0 -0.707107" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_25 -->
|
||||
<!-- Part stp39__configuration__2_2x8_26 -->
|
||||
<!-- Part humerus -->
|
||||
<geom type="mesh" class="visual" pos="-0.0327 -0.0245 -0.0145" quat="0 0 0.707107 0.707107" mesh="humerus" material="humerus_material"/>
|
||||
<!-- Link radius -->
|
||||
<body name="radius" pos="-0.0145 -0.0515 -0.0145" quat="0.707107 0 0.707107 -0">
|
||||
<!-- Joint from humerus__configuration_right to radius -->
|
||||
<joint axis="0 0 1" name="right_elbow" type="hinge" range="-2.181661564992912 2.181661564992912" class="xl330"/>
|
||||
<inertial pos="-4.0628e-08 -0.0310611 0.0130165" mass="0.0115415" fullinertia="5.26775e-06 1.21602e-06 4.45903e-06 -4e-12 -1.2e-11 1.7157e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_17 -->
|
||||
<!-- Part stp39__configuration__2x6_18 -->
|
||||
<!-- Part radius -->
|
||||
<geom class="collision" pos="-0 0 0.0135" quat="0.707107 -0 -0 -0.707107" type="cylinder" size="0.009 0.01675"/>
|
||||
<geom class="collision" pos="-0 -0.067014 0.0135" quat="0.707107 -0 -0 -0.707107" type="cylinder" size="0.00525 0.008"/>
|
||||
<geom type="mesh" class="visual" pos="0 0.027 0.0472" quat="0.5 -0.5 -0.5 -0.5" mesh="radius" material="radius_material"/>
|
||||
<!-- Part stp39__configuration__2x6_19 -->
|
||||
<!-- Part dc15_a01_idle_cap_dummy -->
|
||||
<geom type="mesh" class="visual" pos="0 0 0.0065" quat="0 0.707107 0.707107 -0" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part bts2_m2_6x8 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 0.0065" quat="0 0.707107 0.707107 -0" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part stp39__configuration__2x6_20 -->
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
<!-- Link hip -->
|
||||
<body name="hip" pos="0 -0.036 0" quat="1 -0 -0 0">
|
||||
<!-- Joint from trunk to hip -->
|
||||
<joint axis="0 0 1" name="right_hip_yaw" type="hinge" range="-4.188790204786353 1.047197551196635" class="xl330"/>
|
||||
<inertial pos="0.00421822 1.46909e-07 -0.00948697" mass="0.00884451" fullinertia="9.36719e-07 4.32505e-06 4.03697e-06 -3.3e-11 1.95496e-07 0"/>
|
||||
<!-- Part hip__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="0.00575 -0 -0.0484" quat="0.707107 0 0 0.707107" mesh="hip__configuration_right" material="hip__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_21 -->
|
||||
<!-- Part stp39__configuration__2x6_22 -->
|
||||
<!-- Part stp39__configuration__2x6_23 -->
|
||||
<!-- Part stp39__configuration__2x6_24 -->
|
||||
<!-- Part stp39__configuration__2x6_25 -->
|
||||
<!-- Part stp39__configuration__2x6_26 -->
|
||||
<!-- Part stp39__configuration__2x6_27 -->
|
||||
<!-- Part stp39__configuration__2x6_28 -->
|
||||
<!-- Part stp39__configuration__2x6_29 -->
|
||||
<!-- Part stp39__configuration__2x6_30 -->
|
||||
<!-- Part stp39__configuration__2x6_31 -->
|
||||
<!-- Part stp39__configuration__2x6_32 -->
|
||||
<!-- Link hip_block__configuration_right -->
|
||||
<body name="hip_block__configuration_right" pos="-0.02 0 -0.0214" quat="0.5 -0.5 0.5 -0.5">
|
||||
<!-- Joint from hip to hip_block__configuration_right -->
|
||||
<joint axis="0 0 1" name="right_hip_roll" type="hinge" range="-0.610865238197994 0.6108652381980366" class="xl330"/>
|
||||
<inertial pos="-5.75932e-05 0.00982795 0.0271518" mass="0.04763" fullinertia="1.64064e-05 1.33088e-05 7.85889e-06 -9.153e-09 7.8745e-08 6.63067e-07"/>
|
||||
<!-- Part stp39__configuration__2_2x8_27 -->
|
||||
<!-- Part xl330_2 -->
|
||||
<geom type="mesh" class="visual" pos="-0.008 -0 0.0385" quat="0 0.707107 0 -0.707107" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part dc15_a01_horn_idle2_dummy -->
|
||||
<geom type="mesh" class="visual" pos="0 -0 0.033" quat="0 -0 1 0" mesh="dc15_a01_horn_idle2_dummy" material="dc15_a01_horn_idle2_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_28 -->
|
||||
<!-- Part stp39__configuration__2_2x8_29 -->
|
||||
<!-- Part stp39__configuration__2_2x8_30 -->
|
||||
<!-- Part hip_dbl_block__configuration_right -->
|
||||
<geom class="collision" pos="-0 0.02075 0.02575" quat="0 -0 0.707107 -0.707107" type="box" size="0.0135 0.02525 0.00625"/>
|
||||
<geom type="mesh" class="visual" pos="0 0.027 0.02575" quat="0 -0 0.707107 -0.707107" mesh="hip_dbl_block__configuration_right" material="hip_dbl_block__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_31 -->
|
||||
<!-- Part xl330_without_horn_7 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 0.0065" quat="0 1 0 0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part bts2_m2_6x8_2 -->
|
||||
<geom type="mesh" class="visual" pos="0 -0 0.033" quat="0 -0 1 0" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part dc15_a01_idle_cap_dummy_2 -->
|
||||
<geom type="mesh" class="visual" pos="0 -0 0.033" quat="0 -0 1 0" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_32 -->
|
||||
<!-- Part spacer__configuration_right -->
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 0.0385" quat="0 0 -0.707107 -0.707107" mesh="spacer__configuration_right" material="spacer__configuration_right_material"/>
|
||||
<!-- Link femur__configuration_right -->
|
||||
<body name="femur__configuration_right" pos="-0.0145 -0 0.0385" quat="0 0.707107 0 -0.707107">
|
||||
<!-- Joint from hip_block__configuration_right to femur__configuration_right -->
|
||||
<joint axis="0 0 1" name="right_hip_pitch" type="hinge" range="-1.5707963267948974 1.5707963267948957" class="xl330"/>
|
||||
<inertial pos="-0.0109472 -0.0366847 -0.0147025" mass="0.014726" fullinertia="1.12665e-05 4.38335e-06 8.95932e-06 -1.12592e-06 1.333e-09 -4.521e-09"/>
|
||||
<!-- Part stp39__configuration__2x6_33 -->
|
||||
<!-- Part femur__configuration_right -->
|
||||
<geom class="collision" pos="-0.015 -0.0335001 0.00275" quat="0.5 -0.5 0.5 0.5" type="box" size="0.00125 0.009 0.022228"/>
|
||||
<geom class="collision" pos="-0.008818 -0.00881806 0.00275" quat="0.653281 -0.270598 0.653281 0.270598" type="box" size="0.00125 0.009 0.0124705"/>
|
||||
<geom class="collision" pos="-0.011318 -0.0556821 0.00275" quat="0.270598 -0.653281 0.270598 0.653281" type="box" size="0.00125 0.009 0.008935"/>
|
||||
<geom type="mesh" class="visual" pos="0.003 -0.132713 -0.0145" quat="0.5 -0.5 0.5 0.5" mesh="femur__configuration_right" material="femur__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_34 -->
|
||||
<!-- Part stp39__configuration__2x6_35 -->
|
||||
<!-- Part stp39__configuration__2x6_36 -->
|
||||
<!-- Part stp39__configuration__2x6_37 -->
|
||||
<!-- Part stp39__configuration__2x6_38 -->
|
||||
<!-- Part stp39__configuration__2x6_39 -->
|
||||
<!-- Part stp39__configuration__2x6_40 -->
|
||||
<!-- Part stp39__configuration__2x6_41 -->
|
||||
<!-- Part stp39__configuration__2x6_42 -->
|
||||
<!-- Part stp39__configuration__2x6_43 -->
|
||||
<!-- Part stp39__configuration__2x6_44 -->
|
||||
<!-- Part stp39__configuration__2x6_45 -->
|
||||
<!-- Part stp39__configuration__2x6_46 -->
|
||||
<!-- Part stp39__configuration__2x6_47 -->
|
||||
<!-- Part stp39__configuration__2x6_48 -->
|
||||
<!-- Link tibia__configuration_right -->
|
||||
<body name="tibia__configuration_right" pos="-0.005 -0.062 -0" quat="1 -0 0 -0">
|
||||
<!-- Joint from femur__configuration_right to tibia__configuration_right -->
|
||||
<joint axis="0 0 1" name="right_knee" type="hinge" range="-0.7853981633977201 2.356194490192073" class="xl330"/>
|
||||
<inertial pos="0.00276278 -0.0196679 -0.0144621" mass="0.0300463" fullinertia="1.53882e-05 5.3311e-06 1.38581e-05 2.25674e-06 7.6682e-08 -1.37001e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_49 -->
|
||||
<!-- Part stp39__configuration__2x6_50 -->
|
||||
<!-- Part stp39__configuration__2x6_51 -->
|
||||
<!-- Part stp39__configuration__2x6_52 -->
|
||||
<!-- Part stp39__configuration__2_2x8_33 -->
|
||||
<!-- Part xl330_3 -->
|
||||
<geom type="mesh" class="visual" pos="0 -0 -0.0065" quat="1 -0 -0 0" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part tibia__configuration_right -->
|
||||
<geom class="collision" pos="0.017 -0.0444631 0.00275" quat="0.5 -0.5 0.5 0.5" type="box" size="0.00125 0.009 0.0115"/>
|
||||
<geom class="collision" pos="0.0138 -0.0554431 0.00275" quat="0.653281 -0.270598 0.653281 0.270598" type="box" size="0.00125 0.009 0.00825"/>
|
||||
<geom class="collision" pos="0.00675 -0.0287131 0.00275" quat="0.270598 -0.653281 0.270598 0.653281" type="box" size="0.00125 0.0106065 0.016617"/>
|
||||
<geom class="collision" pos="0.0117 -0.0236231 -0.0145" quat="0.270598 -0.653281 0.270598 0.653281" type="box" size="0.0185 0.0035 0.0023295"/>
|
||||
<geom type="mesh" class="visual" pos="0.008 -0.0707131 -0.0145" quat="0.5 -0.5 0.5 0.5" mesh="tibia__configuration_right" material="tibia__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_53 -->
|
||||
<!-- Part stp39__configuration__2_2x8_34 -->
|
||||
<!-- Part stp39__configuration__2x6_54 -->
|
||||
<!-- Part stp39__configuration__2_2x8_35 -->
|
||||
<!-- Part stp39__configuration__2_2x8_36 -->
|
||||
<!-- Part stp39__configuration__2x6_55 -->
|
||||
<!-- Part stp39__configuration__2x6_56 -->
|
||||
<!-- Link ankle_block__configuration_left -->
|
||||
<body name="ankle_block__configuration_left" pos="0.008 -0.0612131 -0" quat="0 -0 -0 1">
|
||||
<!-- Joint from tibia__configuration_right to ankle_block__configuration_left -->
|
||||
<joint axis="0 0 1" name="right_ankle_pitch" type="hinge" range="-1.5707963267948077 0.6108652381981041" class="xl330"/>
|
||||
<inertial pos="-0.0110676 -0.00979852 -0.0144015" mass="0.04722" fullinertia="7.83993e-06 1.29837e-05 1.60971e-05 -6.00742e-07 -4.9782e-08 -6.127e-09"/>
|
||||
<!-- Part stp39__configuration__2_2x8_37 -->
|
||||
<!-- Part xl330_4 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 -0.0065" quat="1 0 -0 0" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part dc15_a01_horn_idle2_dummy_2 -->
|
||||
<geom type="mesh" class="visual" pos="-0.0055 0 -0.0145" quat="0 -0.707107 -0 0.707107" mesh="dc15_a01_horn_idle2_dummy" material="dc15_a01_horn_idle2_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_38 -->
|
||||
<!-- Part stp39__configuration__2_2x8_39 -->
|
||||
<!-- Part stp39__configuration__2_2x8_40 -->
|
||||
<!-- Part ankle_dbl_block__configuration_right -->
|
||||
<geom class="collision" pos="-0.01275 -0.02075 -0.0145" quat="0.5 0.5 0.5 -0.5" type="box" size="0.0135 0.02525 0.00625"/>
|
||||
<geom type="mesh" class="visual" pos="0 0.0095 -0.0145" quat="0.5 0.5 0.5 -0.5" mesh="ankle_dbl_block__configuration_right" material="ankle_dbl_block__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_41 -->
|
||||
<!-- Part xl330_without_horn_8 -->
|
||||
<geom type="mesh" class="visual" pos="-0.032 0 -0.0145" quat="0.707107 0 -0.707107 -0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part bts2_m2_6x8_3 -->
|
||||
<geom type="mesh" class="visual" pos="-0.0055 0 -0.0145" quat="0 -0.707107 -0 0.707107" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part dc15_a01_idle_cap_dummy_3 -->
|
||||
<geom type="mesh" class="visual" pos="-0.0055 0 -0.0145" quat="0 -0.707107 -0 0.707107" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_42 -->
|
||||
<!-- Part spacer__configuration_right_2 -->
|
||||
<geom type="mesh" class="visual" pos="0 0.0095 -0.0145" quat="0.5 0.5 0.5 -0.5" mesh="spacer__configuration_right" material="spacer__configuration_right_material"/>
|
||||
<!-- Link foot -->
|
||||
<body name="foot" pos="-0.0385 0 -0.0145" quat="0 -0.707107 0 -0.707107">
|
||||
<!-- Joint from ankle_block__configuration_left to foot -->
|
||||
<joint axis="0 0 1" name="right_ankle_roll" type="hinge" range="-0.610865238197748 0.6108652381982826" class="xl330"/>
|
||||
<inertial pos="-0 -0.0168869 0.0347422" mass="0.016823" fullinertia="1.15605e-05 1.2167e-05 2.53496e-06 0 -0 5.67932e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_57 -->
|
||||
<!-- Part stp39__configuration__2x6_58 -->
|
||||
<!-- Part stp39__configuration__2x6_59 -->
|
||||
<!-- Part stp39__configuration__2x6_60 -->
|
||||
<!-- Part stp39__configuration__2x6_61 -->
|
||||
<!-- Part foot__configuration_right -->
|
||||
<geom name="right_foot_collision_1" class="collision" pos="-0 -0.02175 0.042" quat="0 0 0.707107 0.707107" type="box" size="0.0225 0.04 0.00125"/>
|
||||
<geom name="right_foot_collision_2" class="collision" pos="-0 -0.02175 0.042" quat="0 0 0.707107 0.707107" type="box" size="0.0175 0.045 0.00125"/>
|
||||
<geom name="right_foot_collision_3" class="collision" pos="-0.0175 -0.02175 0.002" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="right_foot_collision_4" class="collision" pos="0.0175 -0.02175 0.002" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="right_foot_collision_5" class="collision" pos="-0.0175 -0.02175 0.082" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="right_foot_collision_6" class="collision" pos="0.0175 -0.02175 0.082" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 0.0385" quat="0 0 0.707107 0.707107" mesh="foot__configuration_right" material="foot__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_62 -->
|
||||
<!-- Part stp39__configuration__2x6_63 -->
|
||||
<!-- Part stp39__configuration__2x6_64 -->
|
||||
<!-- Frame right_foot -->
|
||||
<site group="3" name="right_foot" pos="-0 -0.023 0.042" quat="0.5 -0.5 -0.5 -0.5"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
<!-- Link shoulder_2 -->
|
||||
<body name="shoulder_2" pos="-0 0.0505 0.081" quat="0 0 -0.707107 -0.707107">
|
||||
<!-- Joint from trunk to shoulder_2 -->
|
||||
<joint axis="0 0 1" name="left_shoulder_pitch" type="hinge" range="-3.141592653589793 3.141592653589793" class="xl330"/>
|
||||
<inertial pos="-4.19e-10 2.814e-09 0.00850029" mass="0.00898451" fullinertia="1.06003e-06 1.78233e-06 1.86739e-06 -0 0 0"/>
|
||||
<!-- Part stp39__configuration__2x6_65 -->
|
||||
<!-- Part stp39__configuration__2x6_66 -->
|
||||
<!-- Part stp39__configuration__2x6_67 -->
|
||||
<!-- Part stp39__configuration__2x6_68 -->
|
||||
<!-- Part stp39__configuration__2x6_69 -->
|
||||
<!-- Part stp39__configuration__2x6_70 -->
|
||||
<!-- Part stp39__configuration__2x6_71 -->
|
||||
<!-- Part stp39__configuration__2x6_72 -->
|
||||
<!-- Part stp39__configuration__2x6_73 -->
|
||||
<!-- Part shoulder_2 -->
|
||||
<geom type="mesh" class="visual" pos="0 -0.0245 -0.0132" quat="0.5 -0.5 0.5 0.5" mesh="shoulder" material="shoulder_material"/>
|
||||
<!-- Part stp39__configuration__2x6_74 -->
|
||||
<!-- Part stp39__configuration__2x6_75 -->
|
||||
<!-- Part stp39__configuration__2x6_76 -->
|
||||
<!-- Link humerus__configuration_left -->
|
||||
<body name="humerus__configuration_left" pos="-0.0145 0 0.0195" quat="0 -0.707107 -0 0.707107">
|
||||
<!-- Joint from shoulder_2 to humerus__configuration_left -->
|
||||
<joint axis="0 0 1" name="left_shoulder_roll" type="hinge" range="0.0 3.141592653589793" class="xl330"/>
|
||||
<inertial pos="-0.000313281 0.0252784 -0.0143884" mass="0.0416867" fullinertia="1.76899e-05 3.9512e-06 1.75853e-05 3.01684e-07 -5.77e-10 7.6531e-08"/>
|
||||
<!-- Part stp39__configuration__2_2x8_43 -->
|
||||
<!-- Part stp39__configuration__2_2x8_44 -->
|
||||
<!-- Part stp39__configuration__2_2x8_45 -->
|
||||
<!-- Part stp39__configuration__2_2x8_46 -->
|
||||
<!-- Part xl330_5 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 -0.0065" quat="0 -0 -0 -1" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_47 -->
|
||||
<!-- Part stp39__configuration__2_2x8_48 -->
|
||||
<!-- Part xl330_without_horn_9 -->
|
||||
<geom type="mesh" class="visual" pos="-0.008 0.0515 -0.0145" quat="0.707107 0 -0.707107 -0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_49 -->
|
||||
<!-- Part stp39__configuration__2_2x8_50 -->
|
||||
<!-- Part humerus_2 -->
|
||||
<geom type="mesh" class="visual" pos="0.0327 0.0245 -0.0145" quat="0.707107 0.707107 0 0" mesh="humerus" material="humerus_material"/>
|
||||
<!-- Link radius_2 -->
|
||||
<body name="radius_2" pos="-0.0145 0.0515 -0.0145" quat="0.707107 0 -0.707107 0">
|
||||
<!-- Joint from humerus__configuration_left to radius_2 -->
|
||||
<joint axis="0 0 1" name="left_elbow" type="hinge" range="-2.1816615649929156 2.1816615649929085" class="xl330"/>
|
||||
<inertial pos="-4.0628e-08 0.0310611 -0.0130165" mass="0.0115415" fullinertia="5.26775e-06 1.21602e-06 4.45903e-06 4e-12 1.2e-11 1.7157e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_77 -->
|
||||
<!-- Part stp39__configuration__2x6_78 -->
|
||||
<!-- Part radius_2 -->
|
||||
<geom class="collision" pos="-0 -0 -0.0135" quat="0 0.707107 0.707107 -0" type="cylinder" size="0.009 0.01675"/>
|
||||
<geom class="collision" pos="-0 0.067014 -0.0135" quat="0 0.707107 0.707107 -0" type="cylinder" size="0.00525 0.008"/>
|
||||
<geom type="mesh" class="visual" pos="-0 -0.027 -0.0472" quat="0.5 0.5 0.5 -0.5" mesh="radius" material="radius_material"/>
|
||||
<!-- Part stp39__configuration__2x6_79 -->
|
||||
<!-- Part dc15_a01_idle_cap_dummy_4 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 -0.0065" quat="0.707107 -0 -0 -0.707107" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part bts2_m2_6x8_4 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 -0.0065" quat="0.707107 -0 -0 -0.707107" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part stp39__configuration__2x6_80 -->
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
<!-- Link hip_2 -->
|
||||
<body name="hip_2" pos="-0 0.036 0" quat="0 -0 0 -1">
|
||||
<!-- Joint from trunk to hip_2 -->
|
||||
<joint axis="0 0 1" name="left_hip_yaw" type="hinge" range="-1.0471975511965976 4.1887902047863905" class="xl330"/>
|
||||
<inertial pos="-0.00421822 -1.46909e-07 -0.00948697" mass="0.00884451" fullinertia="9.36719e-07 4.32505e-06 4.03697e-06 -3.3e-11 -1.95496e-07 -0"/>
|
||||
<!-- Part hip__configuration_right_2 -->
|
||||
<geom type="mesh" class="visual" pos="-0.00575 -0 -0.0484" quat="0.707107 -0 -0 -0.707107" mesh="hip__configuration_right" material="hip__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_81 -->
|
||||
<!-- Part stp39__configuration__2x6_82 -->
|
||||
<!-- Part stp39__configuration__2x6_83 -->
|
||||
<!-- Part stp39__configuration__2x6_84 -->
|
||||
<!-- Part stp39__configuration__2x6_85 -->
|
||||
<!-- Part stp39__configuration__2x6_86 -->
|
||||
<!-- Part stp39__configuration__2x6_87 -->
|
||||
<!-- Part stp39__configuration__2x6_88 -->
|
||||
<!-- Part stp39__configuration__2x6_89 -->
|
||||
<!-- Part stp39__configuration__2x6_90 -->
|
||||
<!-- Part stp39__configuration__2x6_91 -->
|
||||
<!-- Part stp39__configuration__2x6_92 -->
|
||||
<!-- Link hip_block__configuration_left -->
|
||||
<body name="hip_block__configuration_left" pos="0.02 0 -0.0214" quat="0.5 -0.5 -0.5 0.5">
|
||||
<!-- Joint from hip_2 to hip_block__configuration_left -->
|
||||
<joint axis="0 0 1" name="left_hip_roll" type="hinge" range="-0.6108652381980162 0.6108652381980144" class="xl330"/>
|
||||
<inertial pos="6.0554e-05 0.00982795 0.0271548" mass="0.04763" fullinertia="1.64096e-05 1.3312e-05 7.85888e-06 8.495e-09 -7.6959e-08 6.62404e-07"/>
|
||||
<!-- Part stp39__configuration__2_2x8_51 -->
|
||||
<!-- Part xl330_6 -->
|
||||
<geom type="mesh" class="visual" pos="0.008 -0 0.0385" quat="0 0.707107 0 0.707107" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part dc15_a01_horn_idle2_dummy_3 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 0.033" quat="0 -0 -1 -0" mesh="dc15_a01_horn_idle2_dummy" material="dc15_a01_horn_idle2_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_52 -->
|
||||
<!-- Part stp39__configuration__2_2x8_53 -->
|
||||
<!-- Part stp39__configuration__2_2x8_54 -->
|
||||
<!-- Part hip_dbl_block__configuration_left -->
|
||||
<geom class="collision" pos="-0 0.02075 0.02575" quat="0 -0 0.707107 -0.707107" type="box" size="0.0135 0.02525 0.00625"/>
|
||||
<geom type="mesh" class="visual" pos="0.027 0.027 0.02575" quat="0 -0 0.707107 -0.707107" mesh="hip_dbl_block__configuration_left" material="hip_dbl_block__configuration_left_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_55 -->
|
||||
<!-- Part xl330_without_horn_10 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 0.0065" quat="0 1 0 0" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part bts2_m2_6x8_5 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 0.033" quat="0 -0 -1 -0" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part dc15_a01_idle_cap_dummy_5 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 0.033" quat="0 -0 -1 -0" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_56 -->
|
||||
<!-- Part spacer__configuration_right_3 -->
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 0.0385" quat="0 0 -0.707107 -0.707107" mesh="spacer__configuration_right" material="spacer__configuration_right_material"/>
|
||||
<!-- Link femur__configuration_left -->
|
||||
<body name="femur__configuration_left" pos="-0.0145 -0 0.0385" quat="0.707107 -0 -0.707107 0">
|
||||
<!-- Joint from hip_block__configuration_left to femur__configuration_left -->
|
||||
<joint axis="0 0 1" name="left_hip_pitch" type="hinge" range="-1.5707963267948974 1.5707963267948957" class="xl330"/>
|
||||
<inertial pos="0.0109472 0.0366847 -0.0142975" mass="0.014726" fullinertia="1.12665e-05 4.38335e-06 8.95932e-06 -1.12592e-06 1.333e-09 -4.521e-09"/>
|
||||
<!-- Part stp39__configuration__2x6_93 -->
|
||||
<!-- Part femur__configuration_left -->
|
||||
<geom class="collision" pos="0.015 0.0335001 -0.03175" quat="0.5 0.5 0.5 -0.5" type="box" size="0.00125 0.009 0.022228"/>
|
||||
<geom class="collision" pos="0.008818 0.00881806 -0.03175" quat="0.270598 0.653281 0.270598 -0.653281" type="box" size="0.00125 0.009 0.0124705"/>
|
||||
<geom class="collision" pos="0.011318 0.0556821 -0.03175" quat="0.653281 0.270598 0.653281 -0.270598" type="box" size="0.00125 0.009 0.008935"/>
|
||||
<geom type="mesh" class="visual" pos="-0.003 0.132713 -0.0515" quat="0.5 0.5 0.5 -0.5" mesh="femur__configuration_left" material="femur__configuration_left_material"/>
|
||||
<!-- Part stp39__configuration__2x6_94 -->
|
||||
<!-- Part stp39__configuration__2x6_95 -->
|
||||
<!-- Part stp39__configuration__2x6_96 -->
|
||||
<!-- Part stp39__configuration__2x6_97 -->
|
||||
<!-- Part stp39__configuration__2x6_98 -->
|
||||
<!-- Part stp39__configuration__2x6_99 -->
|
||||
<!-- Part stp39__configuration__2x6_100 -->
|
||||
<!-- Part stp39__configuration__2x6_101 -->
|
||||
<!-- Part stp39__configuration__2x6_102 -->
|
||||
<!-- Part stp39__configuration__2x6_103 -->
|
||||
<!-- Part stp39__configuration__2x6_104 -->
|
||||
<!-- Part stp39__configuration__2x6_105 -->
|
||||
<!-- Part stp39__configuration__2x6_106 -->
|
||||
<!-- Part stp39__configuration__2x6_107 -->
|
||||
<!-- Part stp39__configuration__2x6_108 -->
|
||||
<!-- Link tibia__configuration_left -->
|
||||
<body name="tibia__configuration_left" pos="0.005 0.062 0" quat="1 -0 -0 -0">
|
||||
<!-- Joint from femur__configuration_left to tibia__configuration_left -->
|
||||
<joint axis="0 0 1" name="left_knee" type="hinge" range="-0.7853981633974314 2.3561944901923617" class="xl330"/>
|
||||
<inertial pos="-0.00275805 0.0196679 -0.0145379" mass="0.0300463" fullinertia="1.53882e-05 5.33188e-06 1.38589e-05 2.25747e-06 7.7561e-08 -1.37001e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_109 -->
|
||||
<!-- Part stp39__configuration__2x6_110 -->
|
||||
<!-- Part stp39__configuration__2x6_111 -->
|
||||
<!-- Part stp39__configuration__2x6_112 -->
|
||||
<!-- Part stp39__configuration__2_2x8_57 -->
|
||||
<!-- Part xl330_7 -->
|
||||
<geom type="mesh" class="visual" pos="-0 0 -0.0225" quat="0 1 0 0" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part tibia__configuration_left -->
|
||||
<geom class="collision" pos="-0.017 0.0444631 -0.0317" quat="0.5 0.5 0.5 -0.5" type="box" size="0.00125 0.009 0.0115"/>
|
||||
<geom class="collision" pos="-0.0138 0.0554431 -0.03175" quat="0.270598 0.653281 0.270598 -0.653281" type="box" size="0.00125 0.009 0.00825"/>
|
||||
<geom class="collision" pos="-0.00675 0.0287131 -0.03175" quat="0.653281 0.270598 0.653281 -0.270598" type="box" size="0.00125 0.0106065 0.016617"/>
|
||||
<geom class="collision" pos="-0.0117 0.0236231 -0.0145" quat="0.653281 0.270598 0.653281 -0.270598" type="box" size="0.0185 0.0035 0.0023295"/>
|
||||
<geom type="mesh" class="visual" pos="-0.008 0.0707131 -0.0515" quat="0.5 0.5 0.5 -0.5" mesh="tibia__configuration_left" material="tibia__configuration_left_material"/>
|
||||
<!-- Part stp39__configuration__2x6_113 -->
|
||||
<!-- Part stp39__configuration__2_2x8_58 -->
|
||||
<!-- Part stp39__configuration__2x6_114 -->
|
||||
<!-- Part stp39__configuration__2_2x8_59 -->
|
||||
<!-- Part stp39__configuration__2_2x8_60 -->
|
||||
<!-- Part stp39__configuration__2x6_115 -->
|
||||
<!-- Part stp39__configuration__2x6_116 -->
|
||||
<!-- Link ankle_block__configuration_right -->
|
||||
<body name="ankle_block__configuration_right" pos="-0.008 0.0612131 -0" quat="0 0 -0 1">
|
||||
<!-- Joint from tibia__configuration_left to ankle_block__configuration_right -->
|
||||
<joint axis="0 0 1" name="left_ankle_pitch" type="hinge" range="-1.5707963267948744 0.6108652381980375" class="xl330"/>
|
||||
<inertial pos="0.0110706 0.00979852 -0.0145955" mass="0.04722" fullinertia="7.83996e-06 1.29805e-05 1.6094e-05 -6.01409e-07 -5.1613e-08 -6.789e-09"/>
|
||||
<!-- Part stp39__configuration__2_2x8_61 -->
|
||||
<!-- Part xl330_8 -->
|
||||
<geom type="mesh" class="visual" pos="0 0 -0.0225" quat="0 1 0 0" mesh="xl330" material="xl330_material"/>
|
||||
<!-- Part dc15_a01_horn_idle2_dummy_4 -->
|
||||
<geom type="mesh" class="visual" pos="0.0055 0 -0.0145" quat="0.707107 -0 0.707107 0" mesh="dc15_a01_horn_idle2_dummy" material="dc15_a01_horn_idle2_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_62 -->
|
||||
<!-- Part stp39__configuration__2_2x8_63 -->
|
||||
<!-- Part stp39__configuration__2_2x8_64 -->
|
||||
<!-- Part ankle_dbl_block__configuration_right_2 -->
|
||||
<geom class="collision" pos="0.01275 0.02075 -0.0145" quat="0.5 -0.5 0.5 0.5" type="box" size="0.0135 0.02525 0.00625"/>
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 -0.0145" quat="0.5 -0.5 0.5 0.5" mesh="ankle_dbl_block__configuration_right" material="ankle_dbl_block__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_65 -->
|
||||
<!-- Part xl330_without_horn_11 -->
|
||||
<geom type="mesh" class="visual" pos="0.032 0 -0.0145" quat="0 0.707107 0 0.707107" mesh="xl330_without_horn" material="xl330_without_horn_material"/>
|
||||
<!-- Part bts2_m2_6x8_6 -->
|
||||
<geom type="mesh" class="visual" pos="0.0055 0 -0.0145" quat="0.707107 -0 0.707107 0" mesh="bts2_m2_6x8" material="bts2_m2_6x8_material"/>
|
||||
<!-- Part dc15_a01_idle_cap_dummy_6 -->
|
||||
<geom type="mesh" class="visual" pos="0.0055 0 -0.0145" quat="0.707107 -0 0.707107 0" mesh="dc15_a01_idle_cap_dummy" material="dc15_a01_idle_cap_dummy_material"/>
|
||||
<!-- Part stp39__configuration__2_2x8_66 -->
|
||||
<!-- Part spacer__configuration_right_4 -->
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 -0.0145" quat="0.5 -0.5 0.5 0.5" mesh="spacer__configuration_right" material="spacer__configuration_right_material"/>
|
||||
<!-- Link foot_2 -->
|
||||
<body name="foot_2" pos="0.0385 0 -0.0145" quat="0.707107 -0 -0.707107 0">
|
||||
<!-- Joint from ankle_block__configuration_right to foot_2 -->
|
||||
<joint axis="0 0 1" name="left_ankle_roll" type="hinge" range="-0.6108652381980109 0.6108652381980197" class="xl330"/>
|
||||
<inertial pos="-0 -0.0168869 0.0347422" mass="0.016823" fullinertia="1.15605e-05 1.2167e-05 2.53496e-06 0 -0 5.67932e-07"/>
|
||||
<!-- Part stp39__configuration__2x6_117 -->
|
||||
<!-- Part stp39__configuration__2x6_118 -->
|
||||
<!-- Part stp39__configuration__2x6_119 -->
|
||||
<!-- Part stp39__configuration__2x6_120 -->
|
||||
<!-- Part stp39__configuration__2x6_121 -->
|
||||
<!-- Part foot__configuration_right_2 -->
|
||||
<geom name="left_foot_collision_1" class="collision" pos="-0 -0.02175 0.042" quat="0 0 0.707107 0.707107" type="box" size="0.0225 0.04 0.00125"/>
|
||||
<geom name="left_foot_collision_2" class="collision" pos="-0 -0.02175 0.042" quat="0 0 0.707107 0.707107" type="box" size="0.0175 0.045 0.00125"/>
|
||||
<geom name="left_foot_collision_3" class="collision" pos="-0.0175 -0.02175 0.002" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="left_foot_collision_4" class="collision" pos="0.0175 -0.02175 0.002" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="left_foot_collision_5" class="collision" pos="-0.0175 -0.02175 0.082" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom name="left_foot_collision_6" class="collision" pos="0.0175 -0.02175 0.082" quat="0.270598 -0.270598 -0.653281 -0.653281" type="box" size="0.00353553 0.00353553 0.00125"/>
|
||||
<geom type="mesh" class="visual" pos="-0 -0.0095 0.0385" quat="0 0 0.707107 0.707107" mesh="foot__configuration_right" material="foot__configuration_right_material"/>
|
||||
<!-- Part stp39__configuration__2x6_122 -->
|
||||
<!-- Part stp39__configuration__2x6_123 -->
|
||||
<!-- Part stp39__configuration__2x6_124 -->
|
||||
<!-- Frame left_foot -->
|
||||
<site group="3" name="left_foot" pos="-0 -0.023 0.042" quat="0.5 -0.5 -0.5 -0.5"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
<asset>
|
||||
<mesh file="hip_dbl_block__configuration_right.stl"/>
|
||||
<mesh file="ankle_dbl_block__configuration_right.stl"/>
|
||||
<mesh file="arm_bearing_support__configuration_right.stl"/>
|
||||
<mesh file="dc15_a01_idle_cap_dummy.stl"/>
|
||||
<mesh file="head__configuration_right.stl"/>
|
||||
<mesh file="shoulder.stl"/>
|
||||
<mesh file="xl330_without_horn.stl"/>
|
||||
<mesh file="humerus.stl"/>
|
||||
<mesh file="pelvis__configuration_right.stl"/>
|
||||
<mesh file="dc15_a01_horn_idle2_dummy.stl"/>
|
||||
<mesh file="spacer__configuration_right.stl"/>
|
||||
<mesh file="battery.stl"/>
|
||||
<mesh file="tibia__configuration_right.stl"/>
|
||||
<mesh file="tibia__configuration_left.stl"/>
|
||||
<mesh file="bts2_m2_6x8.stl"/>
|
||||
<mesh file="radius.stl"/>
|
||||
<mesh file="xl330.stl"/>
|
||||
<mesh file="hip__configuration_right.stl"/>
|
||||
<mesh file="femur__configuration_left.stl"/>
|
||||
<mesh file="femur__configuration_right.stl"/>
|
||||
<mesh file="switch.stl"/>
|
||||
<mesh file="hip_dbl_block__configuration_left.stl"/>
|
||||
<mesh file="chest__configuration_right.stl"/>
|
||||
<mesh file="foot__configuration_right.stl"/>
|
||||
<mesh file="trunk_top__configuration_right.stl"/>
|
||||
<material name="arm_bearing_support__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="xl330_without_horn_material" rgba="0.301961 0.301961 0.301961 1"/>
|
||||
<material name="pelvis__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="chest__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="trunk_top__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="battery_material" rgba="0.647059 0.647059 0.647059 1"/>
|
||||
<material name="switch_material" rgba="0.498039 0.498039 0.498039 1"/>
|
||||
<material name="head__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="shoulder_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="xl330_material" rgba="0.301961 0.301961 0.301961 1"/>
|
||||
<material name="humerus_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="radius_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="dc15_a01_idle_cap_dummy_material" rgba="0.301961 0.301961 0.301961 1"/>
|
||||
<material name="bts2_m2_6x8_material" rgba="0.301961 0.301961 0.301961 1"/>
|
||||
<material name="hip__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="dc15_a01_horn_idle2_dummy_material" rgba="0.6 0.6 0.6 1"/>
|
||||
<material name="hip_dbl_block__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="spacer__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="femur__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="tibia__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="ankle_dbl_block__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="foot__configuration_right_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="hip_dbl_block__configuration_left_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="femur__configuration_left_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
<material name="tibia__configuration_left_material" rgba="0.501961 0.501961 0.501961 1"/>
|
||||
</asset>
|
||||
<actuator>
|
||||
<motor class="xl330" name="head" joint="head"/>
|
||||
<motor class="xl330" name="right_shoulder_pitch" joint="right_shoulder_pitch"/>
|
||||
<motor class="xl330" name="right_shoulder_roll" joint="right_shoulder_roll"/>
|
||||
<motor class="xl330" name="right_elbow" joint="right_elbow"/>
|
||||
<motor class="xl330" name="right_hip_yaw" joint="right_hip_yaw"/>
|
||||
<motor class="xl330" name="right_hip_roll" joint="right_hip_roll"/>
|
||||
<motor class="xl330" name="right_hip_pitch" joint="right_hip_pitch"/>
|
||||
<motor class="xl330" name="right_knee" joint="right_knee"/>
|
||||
<motor class="xl330" name="right_ankle_pitch" joint="right_ankle_pitch"/>
|
||||
<motor class="xl330" name="right_ankle_roll" joint="right_ankle_roll"/>
|
||||
<motor class="xl330" name="left_shoulder_pitch" joint="left_shoulder_pitch"/>
|
||||
<motor class="xl330" name="left_shoulder_roll" joint="left_shoulder_roll"/>
|
||||
<motor class="xl330" name="left_elbow" joint="left_elbow"/>
|
||||
<motor class="xl330" name="left_hip_yaw" joint="left_hip_yaw"/>
|
||||
<motor class="xl330" name="left_hip_roll" joint="left_hip_roll"/>
|
||||
<motor class="xl330" name="left_hip_pitch" joint="left_hip_pitch"/>
|
||||
<motor class="xl330" name="left_knee" joint="left_knee"/>
|
||||
<motor class="xl330" name="left_ankle_pitch" joint="left_ankle_pitch"/>
|
||||
<motor class="xl330" name="left_ankle_roll" joint="left_ankle_roll"/>
|
||||
</actuator>
|
||||
<equality/>
|
||||
</mujoco>
|
||||
Binary file not shown.
@@ -0,0 +1,447 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"id": "microban",
|
||||
"name": "Microban",
|
||||
"family": "microban",
|
||||
"adapter": "generic",
|
||||
"dimensions": { "height": 0.33 },
|
||||
"model": "model.xml",
|
||||
"assets": [
|
||||
{
|
||||
"path": "assets/hip_dbl_block__configuration_right.stl",
|
||||
"vfs": "assets/hip_dbl_block__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/ankle_dbl_block__configuration_right.stl",
|
||||
"vfs": "assets/ankle_dbl_block__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/arm_bearing_support__configuration_right.stl",
|
||||
"vfs": "assets/arm_bearing_support__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/dc15_a01_idle_cap_dummy.stl",
|
||||
"vfs": "assets/dc15_a01_idle_cap_dummy.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/head__configuration_right.stl",
|
||||
"vfs": "assets/head__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/shoulder.stl",
|
||||
"vfs": "assets/shoulder.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/xl330_without_horn.stl",
|
||||
"vfs": "assets/xl330_without_horn.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/humerus.stl",
|
||||
"vfs": "assets/humerus.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/pelvis__configuration_right.stl",
|
||||
"vfs": "assets/pelvis__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/dc15_a01_horn_idle2_dummy.stl",
|
||||
"vfs": "assets/dc15_a01_horn_idle2_dummy.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/spacer__configuration_right.stl",
|
||||
"vfs": "assets/spacer__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/battery.stl",
|
||||
"vfs": "assets/battery.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/tibia__configuration_right.stl",
|
||||
"vfs": "assets/tibia__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/tibia__configuration_left.stl",
|
||||
"vfs": "assets/tibia__configuration_left.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/bts2_m2_6x8.stl",
|
||||
"vfs": "assets/bts2_m2_6x8.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/radius.stl",
|
||||
"vfs": "assets/radius.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/xl330.stl",
|
||||
"vfs": "assets/xl330.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/hip__configuration_right.stl",
|
||||
"vfs": "assets/hip__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/femur__configuration_left.stl",
|
||||
"vfs": "assets/femur__configuration_left.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/femur__configuration_right.stl",
|
||||
"vfs": "assets/femur__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/switch.stl",
|
||||
"vfs": "assets/switch.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/hip_dbl_block__configuration_left.stl",
|
||||
"vfs": "assets/hip_dbl_block__configuration_left.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/chest__configuration_right.stl",
|
||||
"vfs": "assets/chest__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/foot__configuration_right.stl",
|
||||
"vfs": "assets/foot__configuration_right.stl"
|
||||
},
|
||||
{
|
||||
"path": "assets/trunk_top__configuration_right.stl",
|
||||
"vfs": "assets/trunk_top__configuration_right.stl"
|
||||
}
|
||||
],
|
||||
"base": {
|
||||
"type": "floating",
|
||||
"root_body": "trunk",
|
||||
"freejoint": "trunk_freejoint",
|
||||
"spawn": {
|
||||
"pos": [
|
||||
0,
|
||||
0,
|
||||
0.165
|
||||
],
|
||||
"yaw": 0
|
||||
},
|
||||
"initial": {
|
||||
"head": 0,
|
||||
"right_shoulder_pitch": 0.17453292519943295,
|
||||
"right_shoulder_roll": -0.17453292519943295,
|
||||
"right_elbow": -0.3490658503988659,
|
||||
"right_hip_yaw": 0,
|
||||
"right_hip_roll": -0.08726646259971647,
|
||||
"right_hip_pitch": -0.17453292519943295,
|
||||
"right_knee": 0,
|
||||
"right_ankle_pitch": 0,
|
||||
"right_ankle_roll": 0.08726646259971647,
|
||||
"left_shoulder_pitch": 0.17453292519943295,
|
||||
"left_shoulder_roll": 0.17453292519943295,
|
||||
"left_elbow": -0.3490658503988659,
|
||||
"left_hip_yaw": 0,
|
||||
"left_hip_roll": 0.08726646259971647,
|
||||
"left_hip_pitch": -0.17453292519943295,
|
||||
"left_knee": 0,
|
||||
"left_ankle_pitch": 0,
|
||||
"left_ankle_roll": -0.08726646259971647
|
||||
}
|
||||
},
|
||||
"sim": {
|
||||
"timestep": 0.005,
|
||||
"decimation": 4
|
||||
},
|
||||
"joints": {
|
||||
"groups": {
|
||||
"policy": [
|
||||
"right_shoulder_pitch",
|
||||
"right_shoulder_roll",
|
||||
"right_elbow",
|
||||
"right_hip_yaw",
|
||||
"right_hip_roll",
|
||||
"right_hip_pitch",
|
||||
"right_knee",
|
||||
"right_ankle_pitch",
|
||||
"right_ankle_roll",
|
||||
"left_shoulder_pitch",
|
||||
"left_shoulder_roll",
|
||||
"left_elbow",
|
||||
"left_hip_yaw",
|
||||
"left_hip_roll",
|
||||
"left_hip_pitch",
|
||||
"left_knee",
|
||||
"left_ankle_pitch",
|
||||
"left_ankle_roll"
|
||||
],
|
||||
"head": [
|
||||
"head"
|
||||
]
|
||||
},
|
||||
"defaults": {
|
||||
"head": 0
|
||||
},
|
||||
"source": "onnx_metadata"
|
||||
},
|
||||
"observations": {
|
||||
"obs": {
|
||||
"terms": [
|
||||
{
|
||||
"type": "gyro",
|
||||
"sensor": "angular-velocity"
|
||||
},
|
||||
{
|
||||
"type": "projected_gravity",
|
||||
"body": "trunk"
|
||||
},
|
||||
{
|
||||
"type": "joint_pos_rel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "joint_vel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "last_action",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"size": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "joint_position",
|
||||
"group": "policy",
|
||||
"scale": 1,
|
||||
"offset": "default"
|
||||
}
|
||||
],
|
||||
"actuation": {
|
||||
"type": "joint_pd",
|
||||
"kp": 0.3,
|
||||
"kd": 0.02,
|
||||
"torque_limit": 0.65
|
||||
},
|
||||
"commands": {
|
||||
"size": 3,
|
||||
"limits": [
|
||||
0.15,
|
||||
-0.1,
|
||||
0.6
|
||||
]
|
||||
},
|
||||
"skills": [
|
||||
{
|
||||
"id": "walk",
|
||||
"kind": "primary",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "policies/walk.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "head",
|
||||
"kind": "overlay",
|
||||
"owns": "head",
|
||||
"controller": {
|
||||
"type": "oscillator",
|
||||
"frequency": 0.35,
|
||||
"amplitude": 0.7853981633974483,
|
||||
"blend": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"input": {
|
||||
"bindings": [
|
||||
{
|
||||
"action": "move_forward",
|
||||
"codes": [
|
||||
"ArrowUp",
|
||||
"KeyW"
|
||||
],
|
||||
"label": "Forward"
|
||||
},
|
||||
{
|
||||
"action": "move_backward",
|
||||
"codes": [
|
||||
"ArrowDown",
|
||||
"KeyS"
|
||||
],
|
||||
"label": "Backward"
|
||||
},
|
||||
{
|
||||
"action": "turn_left",
|
||||
"codes": [
|
||||
"ArrowLeft",
|
||||
"KeyA"
|
||||
],
|
||||
"label": "Turn left"
|
||||
},
|
||||
{
|
||||
"action": "turn_right",
|
||||
"codes": [
|
||||
"ArrowRight",
|
||||
"KeyD"
|
||||
],
|
||||
"label": "Turn right"
|
||||
},
|
||||
{
|
||||
"action": "reset",
|
||||
"codes": [
|
||||
"Space"
|
||||
],
|
||||
"label": "Reset"
|
||||
},
|
||||
{
|
||||
"action": "pause",
|
||||
"codes": [
|
||||
"Escape"
|
||||
],
|
||||
"label": "Pause / continue"
|
||||
},
|
||||
{
|
||||
"action": "toggle:head",
|
||||
"codes": [
|
||||
"KeyH"
|
||||
],
|
||||
"label": "Toggle head rotation"
|
||||
},
|
||||
{
|
||||
"action": "chaseToggle",
|
||||
"codes": ["KeyC"],
|
||||
"label": "Restore chase camera"
|
||||
}
|
||||
]
|
||||
},
|
||||
"render": {
|
||||
"source": "mjcf_visual",
|
||||
"body_visuals": [
|
||||
{
|
||||
"body": "trunk",
|
||||
"path": "visuals/BASE__visual_0__BASE.glb",
|
||||
"quaternion": [0.7071067811865476, 0, 0, 0.7071067811865476]
|
||||
},
|
||||
{
|
||||
"body": "head",
|
||||
"path": "visuals/LINK1__visual_0__LINK1.glb",
|
||||
"quaternion": [0.5, -0.5, -0.5, 0.5]
|
||||
},
|
||||
{
|
||||
"body": "shoulder",
|
||||
"path": "visuals/LINK2__visual_0__LINK2.glb"
|
||||
},
|
||||
{
|
||||
"body": "humerus__configuration_right",
|
||||
"path": "visuals/LINK3__visual_0__LINK3.glb",
|
||||
"position": [0, 0, -0.02755],
|
||||
"quaternion": [0, -0.7071067811865476, 0, 0.7071067811865476]
|
||||
},
|
||||
{
|
||||
"body": "radius",
|
||||
"path": "visuals/LINK4__visual_0__LINK4.glb",
|
||||
"position": [-0.00529885, -0.00021476, 0.00145]
|
||||
},
|
||||
{
|
||||
"body": "shoulder_2",
|
||||
"path": "visuals/LINK5__visual_0__LINK5.glb"
|
||||
},
|
||||
{
|
||||
"body": "humerus__configuration_left",
|
||||
"path": "visuals/LINK6__visual_0__LINK6.glb",
|
||||
"position": [-0.00529885, -0.00021476, -0.02755],
|
||||
"quaternion": [0.7071067811865476, 0, -0.7071067811865476, 0]
|
||||
},
|
||||
{
|
||||
"body": "radius_2",
|
||||
"path": "visuals/LINK7__visual_0__LINK7.glb",
|
||||
"position": [-0.00529885, 0.00021476, -0.00145],
|
||||
"quaternion": [0, 0, 1, 0]
|
||||
},
|
||||
{
|
||||
"body": "hip_2",
|
||||
"path": "visuals/LINK8__visual_0__LINK8.glb",
|
||||
"quaternion": [0, 0.7071067811865476, 0.7071067811865476, 0]
|
||||
},
|
||||
{
|
||||
"body": "hip_block__configuration_left",
|
||||
"path": "visuals/LINK9__visual_0__LINK9.glb",
|
||||
"position": [0, 0, 0.00027893],
|
||||
"quaternion": [0.7071067811865476, 0, 0.7071067811865476, 0]
|
||||
},
|
||||
{
|
||||
"body": "femur__configuration_left",
|
||||
"path": "visuals/LINK10__visual_0__LINK10.glb",
|
||||
"position": [0, 0, -0.00145],
|
||||
"quaternion": [1, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "tibia__configuration_left",
|
||||
"path": "visuals/LINK11__visual_0__LINK11.glb",
|
||||
"position": [0, 0, -0.00145],
|
||||
"quaternion": [1, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "ankle_block__configuration_right",
|
||||
"path": "visuals/LINK12__visual_0__LINK12.glb",
|
||||
"position": [0, 0, -0.00145],
|
||||
"quaternion": [0, 1, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "foot_2",
|
||||
"path": "visuals/LINK13__visual_0__LINK13.glb",
|
||||
"position": [0, 0, 0.0008],
|
||||
"quaternion": [0, -0.7071067811865476, 0, 0.7071067811865476]
|
||||
},
|
||||
{
|
||||
"body": "hip",
|
||||
"path": "visuals/LINK14__visual_0__LINK14.glb",
|
||||
"quaternion": [0.7071067811865476, 0, 0, 0.7071067811865476]
|
||||
},
|
||||
{
|
||||
"body": "hip_block__configuration_right",
|
||||
"path": "visuals/LINK15__visual_0__LINK15.glb",
|
||||
"position": [0, 0, 0.0008],
|
||||
"quaternion": [0.7071067811865476, 0, 0.7071067811865476, 0]
|
||||
},
|
||||
{
|
||||
"body": "femur__configuration_right",
|
||||
"path": "visuals/LINK16__visual_0__LINK16.glb",
|
||||
"position": [0, 0, -0.02755],
|
||||
"quaternion": [0, 1, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "tibia__configuration_right",
|
||||
"path": "visuals/LINK17__visual_0__LINK17.glb",
|
||||
"position": [0, 0, -0.02745],
|
||||
"quaternion": [0, 1, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "ankle_block__configuration_left",
|
||||
"path": "visuals/LINK18__visual_0__LINK18.glb",
|
||||
"position": [0, 0, -0.02755],
|
||||
"quaternion": [1, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
"body": "foot",
|
||||
"path": "visuals/LINK19__visual_0__LINK19.glb",
|
||||
"position": [0, 0, 0.0008],
|
||||
"quaternion": [0, -0.7071067811865476, 0, 0.7071067811865476]
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
2
|
||||
],
|
||||
"camera": {
|
||||
"distance": 0.8
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"theme": "comic"
|
||||
},
|
||||
"termination": {
|
||||
"tilt_z": -0.5,
|
||||
"min_height": 0.06,
|
||||
"on_fall": "hold"
|
||||
},
|
||||
"license": "See LICENSES/SOURCE-LICENSE.txt and SOURCE.md (file-specific notices apply)"
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
{
|
||||
"head": "d0a128d180ecfce69eaaf31b295a0fce31280bfd",
|
||||
"dirty": true,
|
||||
"files": [
|
||||
{
|
||||
"source": "src/model/mjcf/robot.xml",
|
||||
"file": "model.xml",
|
||||
"sha256": "467b02e6d897d5871e0ec753016c0b1c87482ae0584ca7b760b9f5a2b435a797",
|
||||
"bytes": 46845
|
||||
},
|
||||
{
|
||||
"source": "src/agents/walk.onnx",
|
||||
"file": "policies/walk.onnx",
|
||||
"sha256": "e016ba7693a4c768e91625167244a08cee1667f188472d51ebdb6024bccfea7b",
|
||||
"bytes": 800059
|
||||
},
|
||||
{
|
||||
"source": "LICENSE",
|
||||
"file": "LICENSES/SOURCE-LICENSE.txt",
|
||||
"sha256": "f882cb4ee533a88e73fec57c75ddb63bdd204480e1dd5f663975e9d4c6751bf0",
|
||||
"bytes": 56954
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/hip_dbl_block__configuration_right.stl",
|
||||
"file": "assets/hip_dbl_block__configuration_right.stl",
|
||||
"sha256": "219aea2aa6a786bd4d181a2324c5e101c2ce29b3b6f0078579f85f49a8145d7d",
|
||||
"bytes": 206684
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/ankle_dbl_block__configuration_right.stl",
|
||||
"file": "assets/ankle_dbl_block__configuration_right.stl",
|
||||
"sha256": "7fe7356ac4d07fe93040be68af210d55ab6a0dcdfa4d9882768b8feff7e2a905",
|
||||
"bytes": 203084
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/arm_bearing_support__configuration_right.stl",
|
||||
"file": "assets/arm_bearing_support__configuration_right.stl",
|
||||
"sha256": "75b936438bdb6b62736d6b7b10b46ce877d4370727faceae027b1141abca68c0",
|
||||
"bytes": 55284
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/dc15_a01_idle_cap_dummy.stl",
|
||||
"file": "assets/dc15_a01_idle_cap_dummy.stl",
|
||||
"sha256": "b5a94e1d09efe5c0b754fcfd7dfc3bbb3c8e48ba531659f1c27dec6e9b15108b",
|
||||
"bytes": 201784
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/head__configuration_right.stl",
|
||||
"file": "assets/head__configuration_right.stl",
|
||||
"sha256": "44499a31f1c8c9a85433bbfd7ce12859eb1e841c632afde7c8e6eb8e2a259cfc",
|
||||
"bytes": 497084
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/shoulder.stl",
|
||||
"file": "assets/shoulder.stl",
|
||||
"sha256": "e71d55164ab9fd127fdae44669a951d9b1ac239f3c62e6bfdd266d418525c5bd",
|
||||
"bytes": 315184
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/xl330_without_horn.stl",
|
||||
"file": "assets/xl330_without_horn.stl",
|
||||
"sha256": "7b83cfc45390aea5852464ba4194b2c75ac9a1976039db7f7fa8830d48860947",
|
||||
"bytes": 535584
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/humerus.stl",
|
||||
"file": "assets/humerus.stl",
|
||||
"sha256": "b614448aec0afb1ff6a1a41bd7900ddeb43d0fe98b2a6cd8994b0a8efe9f29b9",
|
||||
"bytes": 121484
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/pelvis__configuration_right.stl",
|
||||
"file": "assets/pelvis__configuration_right.stl",
|
||||
"sha256": "0d8e1fa5ffc4e03c7ece6b5741813f6d35e7f8941e67fff12cf800f5625289a5",
|
||||
"bytes": 296484
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/dc15_a01_horn_idle2_dummy.stl",
|
||||
"file": "assets/dc15_a01_horn_idle2_dummy.stl",
|
||||
"sha256": "40455b774c89c23a68b34056e6cc0587b4c23ea2ecfac4e5b4b713d1b2e23ce9",
|
||||
"bytes": 282584
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/spacer__configuration_right.stl",
|
||||
"file": "assets/spacer__configuration_right.stl",
|
||||
"sha256": "001b2d16c008b50570a6deabf6e66aa6ee8736655eab1376d87bbc60e8db2813",
|
||||
"bytes": 44884
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/battery.stl",
|
||||
"file": "assets/battery.stl",
|
||||
"sha256": "46bfa2a22ba14628af86fd82f412b9e6ac7c2934171872b2851f6acffdef7d11",
|
||||
"bytes": 684
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/tibia__configuration_right.stl",
|
||||
"file": "assets/tibia__configuration_right.stl",
|
||||
"sha256": "88f47086845e52bf1334b4f74ea086dc647c3f738b23d502f86b3bbf6fa43251",
|
||||
"bytes": 398984
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/tibia__configuration_left.stl",
|
||||
"file": "assets/tibia__configuration_left.stl",
|
||||
"sha256": "62c50f2c718ede723f9db50c97825c4655edc4986feadb558c976f5d30eb15dc",
|
||||
"bytes": 399284
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/bts2_m2_6x8.stl",
|
||||
"file": "assets/bts2_m2_6x8.stl",
|
||||
"sha256": "93816c7bc9f389e788c7c96f15be96efc7f6ae64c60232d312c04e316bfec940",
|
||||
"bytes": 269584
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/radius.stl",
|
||||
"file": "assets/radius.stl",
|
||||
"sha256": "fde50ad5c63a5bb2a35fcf950d24f34731a4cbdae04ad6e74d36477b3d56addf",
|
||||
"bytes": 529984
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/xl330.stl",
|
||||
"file": "assets/xl330.stl",
|
||||
"sha256": "0aca2dcb9f30e0bb7c435cc74f115cce7314b51851bc57e103397108bdaeab35",
|
||||
"bytes": 674484
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/hip__configuration_right.stl",
|
||||
"file": "assets/hip__configuration_right.stl",
|
||||
"sha256": "6ad9a9afe37826f11ab041fb02853c1e90e6d1ae0cdd0158a48bf6e13d496277",
|
||||
"bytes": 1048584
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/femur__configuration_left.stl",
|
||||
"file": "assets/femur__configuration_left.stl",
|
||||
"sha256": "3a06675c2b266d2ba2c760e0b6211edd8f628eb69563a8df47d3f5edc8f2f432",
|
||||
"bytes": 629884
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/femur__configuration_right.stl",
|
||||
"file": "assets/femur__configuration_right.stl",
|
||||
"sha256": "5ebf1d61d9e2f00f1ab5de8596965e16098e9253efe019e254d72b6b75dfe617",
|
||||
"bytes": 628384
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/switch.stl",
|
||||
"file": "assets/switch.stl",
|
||||
"sha256": "2908d7222f24c93f639e4e546f76f3b2cea08de983da6c643b926a3f97177e38",
|
||||
"bytes": 2084
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/hip_dbl_block__configuration_left.stl",
|
||||
"file": "assets/hip_dbl_block__configuration_left.stl",
|
||||
"sha256": "f70a7b8dfb4dd6d05233f102457db085b38150e460fc59a1a2bb8bab11df9a18",
|
||||
"bytes": 206684
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/chest__configuration_right.stl",
|
||||
"file": "assets/chest__configuration_right.stl",
|
||||
"sha256": "d9a6cd9b153ef75913aad9a16461e947499e583a02275c10407aea5c2e3f309e",
|
||||
"bytes": 444684
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/foot__configuration_right.stl",
|
||||
"file": "assets/foot__configuration_right.stl",
|
||||
"sha256": "e157450cd49fddd719db849e2e5494533b823a01c7443142fea7fb10eb56c4cb",
|
||||
"bytes": 166084
|
||||
},
|
||||
{
|
||||
"source": "src/model/mjcf/assets/trunk_top__configuration_right.stl",
|
||||
"file": "assets/trunk_top__configuration_right.stl",
|
||||
"sha256": "f1fc9c48cb2a241084048cdd439fa6edccb409281f0c1f585f143f16b4aa98c0",
|
||||
"bytes": 365884
|
||||
}
|
||||
],
|
||||
"behaviorReferences": [
|
||||
{
|
||||
"file": "src/constants.py",
|
||||
"sha256": "6625c127e80cee2f41086c39c997aba1169f8e4c63eac3b1f9748312b47733c0"
|
||||
},
|
||||
{
|
||||
"file": "src/moves/walk.py",
|
||||
"sha256": "fb866ef2a96254a462fd1a99e68637498d1bbcee76802c467a3dce5c3ed98d8e"
|
||||
},
|
||||
{
|
||||
"file": "src/moves/rotate_head.py",
|
||||
"sha256": "027831ec4ed15544f22877ea89c0fdfeece6990d2ea55816a405c1b94e709d4e"
|
||||
},
|
||||
{
|
||||
"file": "src/observer.py",
|
||||
"sha256": "e9d98708f00f2d14acb26e64eefc0282dcc327b00a780a5f59899ce8faeeb7c2"
|
||||
},
|
||||
{
|
||||
"file": "src/imu_reader.py",
|
||||
"sha256": "69f82911920e186345be13664b3cf52c2de8f05f13f4cd9ce09cccb0fb4eefc3"
|
||||
},
|
||||
{
|
||||
"file": "src/sim/mujoco_controller.py",
|
||||
"sha256": "cd9d3fb59e195775aec2a60fb6e8335ee410f39e44f0204f16952fa8827bc057"
|
||||
},
|
||||
{
|
||||
"file": "src/sim/sim_main.py",
|
||||
"sha256": "5218a64a979132d4cee6f8b113adaa7bc4dc81d389d0985e8bafc2ac17def907"
|
||||
}
|
||||
],
|
||||
"source": "https://github.com/Rhoban/microban.git",
|
||||
"additionalNotices": [
|
||||
{
|
||||
"file": "LICENSES/Apache-2.0.txt",
|
||||
"origin": "Apache-2.0 license text (model.xml notice)",
|
||||
"sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"source": "User-provided microban2.zip (textured visual replacement)",
|
||||
"archive_sha256": "dfb20a34103afecdc7996cc5ac9f6a61705560717f9c6aac420f3d6307d3e6d4",
|
||||
"license": "Not supplied in the archive; confirm redistribution rights with the asset owner.",
|
||||
"files": [
|
||||
{
|
||||
"file": "visuals/BASE__visual_0__BASE.glb",
|
||||
"sha256": "32cc5d7df7ab62779cb61ae777dafe485fc357489998020fba86e2bb94d968a6"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK1__visual_0__LINK1.glb",
|
||||
"sha256": "33f7776ad30bc04fb0a93a1a80641636d5cca382c12093bf97df9d9cd1416553"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK2__visual_0__LINK2.glb",
|
||||
"sha256": "ffbdd241b96d8e9d371bbddb57908912e95edb4c7ce88e9e20a79c663f80058f"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK3__visual_0__LINK3.glb",
|
||||
"sha256": "01718a43c6b8936543c6c2e47b00150907c7ac7c892c90f9d612a21d6fc566b9"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK4__visual_0__LINK4.glb",
|
||||
"sha256": "7dad340b731e9f5ed8fe37bc77dd2b7b5ff1ac540cc501dad35b487438ab4e0d"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK5__visual_0__LINK5.glb",
|
||||
"sha256": "aa54506ab2503ac34cb4d8240772798d353f72a04b81224543b9347df38a68ba"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK6__visual_0__LINK6.glb",
|
||||
"sha256": "2bed471a7c3e51107d5307130c342696b3e986384584c4891b4b7a161380aeb4"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK7__visual_0__LINK7.glb",
|
||||
"sha256": "909cc20e48dad6dd8478c8dd19499ffc49c8427305ead62e1b267ae8a3939d9e"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK8__visual_0__LINK8.glb",
|
||||
"sha256": "d2a43a6606906fd8bd8a982208ea2121245969bded44a3f81ee074e1968c5abf"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK9__visual_0__LINK9.glb",
|
||||
"sha256": "33f34ba76488c0dfe99bcf80bb48ff3ba0c0240e506a79203d380e20aa17f952"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK10__visual_0__LINK10.glb",
|
||||
"sha256": "4bf30a00a35ec588a74476cefc6cff79b14f16ebf8136a55ab8392c8b2b5a6be"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK11__visual_0__LINK11.glb",
|
||||
"sha256": "04e8b462a92a6689074211bc1243a28bd031148c6f390cf00d9af977e33d4616"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK12__visual_0__LINK12.glb",
|
||||
"sha256": "e1549141dbd462ef4aa31be2f5bb8ae2f31a0d0b49da3de41911ef482c008cd7"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK13__visual_0__LINK13.glb",
|
||||
"sha256": "ded693e8bc53cdda7ac36b5f4d49c56391eaa283f6549872e2eeaa33d0b43afd"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK14__visual_0__LINK14.glb",
|
||||
"sha256": "03f70f51f86a4eb67b069629ed89576cae71910f903d34638dc8fd5fc8b9bb4d"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK15__visual_0__LINK15.glb",
|
||||
"sha256": "87202389c4bc6dade765d805f399f8577add3c2b3a10a317264dbe4e4e99f54d"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK16__visual_0__LINK16.glb",
|
||||
"sha256": "eb8a287ca42899b728973690352974a9351fcbc7a7f9e7e632376f4aebdad3d0"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK17__visual_0__LINK17.glb",
|
||||
"sha256": "1f942e545727ce342c97827f06d33d6ab8186120ea6dbcf36369eb2b4e3e54e5"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK18__visual_0__LINK18.glb",
|
||||
"sha256": "808675acb0fddbbacdbed43ad71de1df7ffd0b898a8bf7814098cbe7d1d1ad29"
|
||||
},
|
||||
{
|
||||
"file": "visuals/LINK19__visual_0__LINK19.glb",
|
||||
"sha256": "b00cec2f4a0924efd7805f405ab0bb103e1ecdf1d56310caa3c275c7ef0a7c1b"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,321 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"id": "microduck-legs",
|
||||
"name": "Microduck",
|
||||
"family": "microduck",
|
||||
"adapter": "microduck",
|
||||
"dimensions": { "height": 0.27 },
|
||||
"model": "../../robot/mjlab/robot_allcollisions.xml",
|
||||
"assets": [],
|
||||
"base": {
|
||||
"type": "floating",
|
||||
"root_body": "trunk_base",
|
||||
"freejoint": "trunk_base_freejoint",
|
||||
"spawn": {
|
||||
"pos": [
|
||||
-0.6000000000000001,
|
||||
0,
|
||||
0.12
|
||||
],
|
||||
"yaw": 0
|
||||
}
|
||||
},
|
||||
"sim": {
|
||||
"timestep": 0.005,
|
||||
"decimation": 4
|
||||
},
|
||||
"joints": {
|
||||
"groups": {
|
||||
"policy": [
|
||||
"left_hip_yaw",
|
||||
"left_hip_roll",
|
||||
"left_hip_pitch",
|
||||
"left_knee",
|
||||
"left_ankle",
|
||||
"neck_pitch",
|
||||
"head_pitch",
|
||||
"head_yaw",
|
||||
"head_roll",
|
||||
"right_hip_yaw",
|
||||
"right_hip_roll",
|
||||
"right_hip_pitch",
|
||||
"right_knee",
|
||||
"right_ankle"
|
||||
]
|
||||
},
|
||||
"defaults": {
|
||||
"left_hip_yaw": 0,
|
||||
"left_hip_roll": -0.0872664600610733,
|
||||
"left_hip_pitch": -0.4579240083694458,
|
||||
"left_knee": -0.004939999897032976,
|
||||
"left_ankle": 0.4529840052127838,
|
||||
"neck_pitch": 0.3490658402442932,
|
||||
"head_pitch": 0.3490658402442932,
|
||||
"head_yaw": 0,
|
||||
"head_roll": 0,
|
||||
"right_hip_yaw": 0,
|
||||
"right_hip_roll": 0.0872664600610733,
|
||||
"right_hip_pitch": 0.4579240083694458,
|
||||
"right_knee": 0.004939999897032976,
|
||||
"right_ankle": -0.4529840052127838
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"obs": {
|
||||
"terms": [
|
||||
{
|
||||
"type": "gyro",
|
||||
"sensor": "imu_ang_vel"
|
||||
},
|
||||
{
|
||||
"type": "projected_gravity",
|
||||
"body": "trunk_base"
|
||||
},
|
||||
{
|
||||
"type": "joint_pos_rel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "joint_vel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "last_action",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"size": 13
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "joint_position",
|
||||
"group": "policy",
|
||||
"scale": 1,
|
||||
"offset": "default"
|
||||
}
|
||||
],
|
||||
"actuation": {
|
||||
"type": "native_position"
|
||||
},
|
||||
"commands": {
|
||||
"size": 13,
|
||||
"limits": [
|
||||
0.25,
|
||||
-0.2,
|
||||
1
|
||||
]
|
||||
},
|
||||
"skills": [
|
||||
{
|
||||
"id": "walk",
|
||||
"kind": "primary",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_walking.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sitstand",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_sitstand.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "roll",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/roulade.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kickL",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/ball_kick_left.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kickR",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/ball_kick_right.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "groundpick",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/alpha_ground_pick.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "stand",
|
||||
"kind": "recovery",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_stand.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "drive",
|
||||
"kind": "primary",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_roller.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "crouch",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_roller_crouch.onnx"
|
||||
}
|
||||
}
|
||||
],
|
||||
"input": {
|
||||
"bindings": [
|
||||
{
|
||||
"action": "move_forward",
|
||||
"codes": [
|
||||
"ArrowUp",
|
||||
"KeyW"
|
||||
],
|
||||
"label": "Forward"
|
||||
},
|
||||
{
|
||||
"action": "move_backward",
|
||||
"codes": [
|
||||
"ArrowDown",
|
||||
"KeyS"
|
||||
],
|
||||
"label": "Backward"
|
||||
},
|
||||
{
|
||||
"action": "turn_left",
|
||||
"codes": [
|
||||
"ArrowLeft",
|
||||
"KeyA"
|
||||
],
|
||||
"label": "Turn left"
|
||||
},
|
||||
{
|
||||
"action": "turn_right",
|
||||
"codes": [
|
||||
"ArrowRight",
|
||||
"KeyD"
|
||||
],
|
||||
"label": "Turn right"
|
||||
},
|
||||
{
|
||||
"action": "kickL",
|
||||
"codes": [
|
||||
"KeyQ"
|
||||
],
|
||||
"label": "Left kick"
|
||||
},
|
||||
{
|
||||
"action": "kickR",
|
||||
"codes": [
|
||||
"KeyE"
|
||||
],
|
||||
"label": "Right kick"
|
||||
},
|
||||
{
|
||||
"action": "alternateKick",
|
||||
"codes": [
|
||||
"KeyF"
|
||||
],
|
||||
"label": "Alternate kick"
|
||||
},
|
||||
{
|
||||
"action": "sitToggle",
|
||||
"codes": [
|
||||
"KeyR"
|
||||
],
|
||||
"label": "Sit / stand · roller crouch"
|
||||
},
|
||||
{
|
||||
"action": "groundPick",
|
||||
"codes": [
|
||||
"KeyG"
|
||||
],
|
||||
"label": "Ground pick"
|
||||
},
|
||||
{
|
||||
"action": "locoToggle",
|
||||
"codes": [
|
||||
"KeyM"
|
||||
],
|
||||
"label": "Feet / rollers"
|
||||
},
|
||||
{
|
||||
"action": "chaseToggle",
|
||||
"codes": [
|
||||
"KeyC"
|
||||
],
|
||||
"label": "Restore chase camera"
|
||||
},
|
||||
{
|
||||
"action": "roll",
|
||||
"codes": ["KeyT"],
|
||||
"label": "Forward roll / roller crouch"
|
||||
},
|
||||
{
|
||||
"action": "reset",
|
||||
"codes": [
|
||||
"Space"
|
||||
],
|
||||
"label": "Reset"
|
||||
},
|
||||
{
|
||||
"action": "pause",
|
||||
"codes": [
|
||||
"Escape"
|
||||
],
|
||||
"label": "Pause / continue"
|
||||
}
|
||||
]
|
||||
},
|
||||
"render": {
|
||||
"source": "glb",
|
||||
"camera": {
|
||||
"distance": 0.8
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"theme": "comic"
|
||||
},
|
||||
"termination": {
|
||||
"tilt_z": -0.5,
|
||||
"min_height": 0.02,
|
||||
"on_fall": "recovery"
|
||||
},
|
||||
"legacy": {
|
||||
"loco": "legs",
|
||||
"crouch_period": 5,
|
||||
"crouch_end": 0.7,
|
||||
"groundpick_period": 4,
|
||||
"groundpick_end": 0.7
|
||||
},
|
||||
"license": "Apache-2.0; retain existing policy and asset notices"
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"id": "microduck-rollers",
|
||||
"name": "Microduck",
|
||||
"family": "microduck",
|
||||
"adapter": "microduck",
|
||||
"dimensions": { "height": 0.27 },
|
||||
"model": "../../robot/mjlab/robot_allcollisions_rollers.xml",
|
||||
"assets": [],
|
||||
"base": {
|
||||
"type": "floating",
|
||||
"root_body": "trunk_base",
|
||||
"freejoint": "trunk_base_freejoint",
|
||||
"spawn": {
|
||||
"pos": [
|
||||
-0.6000000000000001,
|
||||
0,
|
||||
0.12
|
||||
],
|
||||
"yaw": 0
|
||||
}
|
||||
},
|
||||
"sim": {
|
||||
"timestep": 0.005,
|
||||
"decimation": 4
|
||||
},
|
||||
"joints": {
|
||||
"groups": {
|
||||
"policy": [
|
||||
"left_hip_yaw",
|
||||
"left_hip_roll",
|
||||
"left_hip_pitch",
|
||||
"left_knee",
|
||||
"left_ankle",
|
||||
"neck_pitch",
|
||||
"head_pitch",
|
||||
"head_yaw",
|
||||
"head_roll",
|
||||
"right_hip_yaw",
|
||||
"right_hip_roll",
|
||||
"right_hip_pitch",
|
||||
"right_knee",
|
||||
"right_ankle"
|
||||
]
|
||||
},
|
||||
"defaults": {
|
||||
"left_hip_yaw": 0,
|
||||
"left_hip_roll": -0.0872664600610733,
|
||||
"left_hip_pitch": -0.4579240083694458,
|
||||
"left_knee": -0.004939999897032976,
|
||||
"left_ankle": 0.4529840052127838,
|
||||
"neck_pitch": 0.3490658402442932,
|
||||
"head_pitch": 0.3490658402442932,
|
||||
"head_yaw": 0,
|
||||
"head_roll": 0,
|
||||
"right_hip_yaw": 0,
|
||||
"right_hip_roll": 0.0872664600610733,
|
||||
"right_hip_pitch": 0.4579240083694458,
|
||||
"right_knee": 0.004939999897032976,
|
||||
"right_ankle": -0.4529840052127838
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"obs": {
|
||||
"terms": [
|
||||
{
|
||||
"type": "gyro",
|
||||
"sensor": "imu_ang_vel"
|
||||
},
|
||||
{
|
||||
"type": "projected_gravity",
|
||||
"body": "trunk_base"
|
||||
},
|
||||
{
|
||||
"type": "joint_pos_rel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "joint_vel",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "last_action",
|
||||
"group": "policy"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"size": 13
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "joint_position",
|
||||
"group": "policy",
|
||||
"scale": 1,
|
||||
"offset": "default"
|
||||
}
|
||||
],
|
||||
"actuation": {
|
||||
"type": "native_position"
|
||||
},
|
||||
"commands": {
|
||||
"size": 13,
|
||||
"limits": [
|
||||
0.6,
|
||||
-0.5,
|
||||
0.3
|
||||
]
|
||||
},
|
||||
"skills": [
|
||||
{
|
||||
"id": "walk",
|
||||
"kind": "primary",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_walking.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sitstand",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_sitstand.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "roll",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/roulade.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kickL",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/ball_kick_left.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kickR",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/ball_kick_right.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "groundpick",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/alpha_ground_pick.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "stand",
|
||||
"kind": "recovery",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_alpha_stand.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "drive",
|
||||
"kind": "primary",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_roller.onnx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "crouch",
|
||||
"kind": "episodic",
|
||||
"owns": "policy",
|
||||
"controller": {
|
||||
"type": "onnx",
|
||||
"policy": "../../policies/BEST_roller_crouch.onnx"
|
||||
}
|
||||
}
|
||||
],
|
||||
"input": {
|
||||
"bindings": [
|
||||
{
|
||||
"action": "move_forward",
|
||||
"codes": [
|
||||
"ArrowUp",
|
||||
"KeyW"
|
||||
],
|
||||
"label": "Forward"
|
||||
},
|
||||
{
|
||||
"action": "move_backward",
|
||||
"codes": [
|
||||
"ArrowDown",
|
||||
"KeyS"
|
||||
],
|
||||
"label": "Backward"
|
||||
},
|
||||
{
|
||||
"action": "turn_left",
|
||||
"codes": [
|
||||
"ArrowLeft",
|
||||
"KeyA"
|
||||
],
|
||||
"label": "Turn left"
|
||||
},
|
||||
{
|
||||
"action": "turn_right",
|
||||
"codes": [
|
||||
"ArrowRight",
|
||||
"KeyD"
|
||||
],
|
||||
"label": "Turn right"
|
||||
},
|
||||
{
|
||||
"action": "kickL",
|
||||
"codes": [
|
||||
"KeyQ"
|
||||
],
|
||||
"label": "Left kick"
|
||||
},
|
||||
{
|
||||
"action": "kickR",
|
||||
"codes": [
|
||||
"KeyE"
|
||||
],
|
||||
"label": "Right kick"
|
||||
},
|
||||
{
|
||||
"action": "alternateKick",
|
||||
"codes": [
|
||||
"KeyF"
|
||||
],
|
||||
"label": "Alternate kick"
|
||||
},
|
||||
{
|
||||
"action": "sitToggle",
|
||||
"codes": [
|
||||
"KeyR"
|
||||
],
|
||||
"label": "Sit / stand · roller crouch"
|
||||
},
|
||||
{
|
||||
"action": "groundPick",
|
||||
"codes": [
|
||||
"KeyG"
|
||||
],
|
||||
"label": "Ground pick"
|
||||
},
|
||||
{
|
||||
"action": "locoToggle",
|
||||
"codes": [
|
||||
"KeyM"
|
||||
],
|
||||
"label": "Feet / rollers"
|
||||
},
|
||||
{
|
||||
"action": "chaseToggle",
|
||||
"codes": [
|
||||
"KeyC"
|
||||
],
|
||||
"label": "Restore chase camera"
|
||||
},
|
||||
{
|
||||
"action": "roll",
|
||||
"codes": ["KeyT"],
|
||||
"label": "Forward roll / roller crouch"
|
||||
},
|
||||
{
|
||||
"action": "reset",
|
||||
"codes": [
|
||||
"Space"
|
||||
],
|
||||
"label": "Reset"
|
||||
},
|
||||
{
|
||||
"action": "pause",
|
||||
"codes": [
|
||||
"Escape"
|
||||
],
|
||||
"label": "Pause / continue"
|
||||
}
|
||||
]
|
||||
},
|
||||
"render": {
|
||||
"source": "glb",
|
||||
"camera": {
|
||||
"distance": 0.8
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"theme": "comic"
|
||||
},
|
||||
"termination": {
|
||||
"tilt_z": -0.5,
|
||||
"min_height": 0.02,
|
||||
"on_fall": "recovery"
|
||||
},
|
||||
"legacy": {
|
||||
"loco": "rollers",
|
||||
"crouch_period": 5,
|
||||
"crouch_end": 0.7,
|
||||
"groundpick_period": 4,
|
||||
"groundpick_end": 0.7
|
||||
},
|
||||
"license": "Apache-2.0; retain existing policy and asset notices"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
Copyright (c) 2022-2025, The Isaac Lab Project Developers.
|
||||
Copyright (c) 2025-2026, The RoboLab Project Developers.
|
||||
All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,49 @@
|
||||
# RP1 local-evaluation package
|
||||
|
||||
## Inputs and provenance
|
||||
|
||||
- Training repository: `/home/cen/Embodied_Workspace/Mujoco_Projects/roboparty_train`.
|
||||
- Model/meshes: `robolab/data/robots/roboparty/rp1`, upstream `https://github.com/Roboparty/rp1_description`, commit `d8c6dd03aeecc7f7ead3d962e09fedba4c8460f0` (clean asset worktree at original import).
|
||||
- Input MJCF: `mjcf/robot_24dof.xml`; `compiler.meshdir` changes from `../` to `.` for package-relative VFS loading. XML is reserialized. Bodies, inertias, primitive collision geometry, motors, sensors and mesh bytes are retained.
|
||||
- Walk: final `rp1_24dof_flat/2026-10-28_15-47-49/model_9000.pt` (9001 configured iterations).
|
||||
- Dance: resumed final `rp1_24dof_beyondmimic_dance/2026-10-29_11-05-14_dance_resume/model_23998.pt` (starts from iteration 7999, adds 16000 iterations; final 23998).
|
||||
- Wave: final `rp1_24dof_beyondmimic_wave/2026-10-28_19-00-23_wave/model_7999.pt` (8000 iterations).
|
||||
- Importers do not launch/stop training or modify the training repository. Completed iterations do not establish convergence, arbitrary-duration stability or hardware safety.
|
||||
- Logged `params/env.yaml` and `params/agent.yaml` determine actual actor branch, terms, joint order, defaults, actuator contract and network. `source-manifest.json` records checkpoint/config/motion/resource SHA-256 and export error.
|
||||
|
||||
## Deterministic exports
|
||||
|
||||
`app/scripts/import-rp1.py` exports walking, ELU MLP `243→512→256→128→24`, including empirical normalization `(obs - mean) / (std + 0.01)` and runner ±100 action clip. Three term-major history frames follow training joint order. First sample backfills history; reset/skill entry clears it. PyTorch/ONNX max absolute error: approximately **1.55e-6**.
|
||||
|
||||
`app/scripts/import-rp1-motion.py` exports dance/wave, ELU MLP `126→512→256→128→24`, including empirical normalization and no additional action clip (runner clip is null). Logged actor branch is **student**, not the privileged policy observation group. Inputs are reference joint positions/velocities (48), gyro (3), projected gravity (3), relative joint positions (24), joint velocities (24), last actor action (24). Each skill uses its own trained defaults and last action. The distribution and critic are not deployed. PyTorch/ONNX max errors: dance **1.31e-6**, wave **1.91e-6**.
|
||||
|
||||
Actions are reference-pose-relative joint targets, scale `0.25`. Named gains, torque caps and four-quadrant motor torque-speed limits are preserved. Browser intentionally omits training-time random actuator delays (0–2 physics steps), randomized physics/default positions, external pushes and observation noise. It is not an exact reproduction of Newton/MJWarp training or hardware motor control.
|
||||
|
||||
## Motion references and deployed limits
|
||||
|
||||
Source archives under `robolab/data/motions/rp1_bm/`:
|
||||
|
||||
- `dance1_subject2_smooth6hz.npz`: 6573 frames at 50 fps, 131.46 s total. **Only the validated first 10 s are enabled.** The previous 7999 checkpoint fell at frame 994 (~19.9 s) in a full-clip rollout. The updated 23998 checkpoint has been qualified for the 10 s prefix only; full continuous playback has not been requalified.
|
||||
- `wave_R_001__A428.npz`: 218 frames at 50 fps, full 4.36 s enabled.
|
||||
|
||||
`.json` reference descriptors plus little-endian `.f32` files contain joint position/velocity commands in logged joint order. Motion command time advances one frame per 50 Hz control tick, freezes on pause and resets at activation. Reference end clamps; there is no random resampling or wrapping. References only supply policy observations: they do not teleport the root, set kinematic joint poses, or replace trained actions with scripted animation.
|
||||
|
||||
Both skills use exclusive full-body policies, a physical stop gate, entry/return blends and locomotion interruption. Validation includes three initial headings, walking before/after, repeated episodes without robot reset, keyboard/pause/reset, numerical reference checks and malformed-asset rollback. Initial integration: `docs/superpowers/verification/2026-10-29-rp1-completed-skills.md`; current dance weights: `docs/superpowers/verification/2026-10-29-rp1-dance-23998.md`. UI labels are simply `Dance` and `Wave`; durations and transition behavior remain unchanged.
|
||||
|
||||
## User-provided GLB material replacement
|
||||
|
||||
`RP1机器人glb.zip` supplies 63 Blender-exported, self-contained GLBs. `visual-source-manifest.json` records the archive SHA-256, all 63 source-part hashes, 25 output hashes and the exact body mapping. Original MJCF/STL, policy and motion files retain their existing hashes; the only manifest change is `render.body_visuals`.
|
||||
|
||||
- Twenty-three bodies use byte-identical source GLBs. Their Blender Y-up coordinates are rotated +90° about X into MuJoCo body Z-up. All 63 source-part bounds were independently checked against the upstream STL bounds after this axis conversion: exact agreement.
|
||||
- The existing 24-DOF model has only one `left_wrist_link` / `right_wrist_link` body per side. Each visual wrist therefore composes **20 parts**: wrist roll/yaw/pitch plus the palm and 16 finger pieces. Transforms come from the copied upstream `visuals/rp1_hand_fixed.urdf`; extra wrist yaw/pitch stay neutral, fingers stay in their fixed poses. There are **no additional physical joints or finger-control claims**.
|
||||
- The assembler preserves source vertex/index/image bytes, remaps GLTF indices and retains original PBR colours, roughness/metalness, normal maps, face screen texture and emissive torso logo. It adds only visual transform wrapper nodes.
|
||||
- Reproduce with `python3 app/scripts/import-rp1-visuals.py /path/to/RP1机器人glb.zip app/public/robots/rp1/visuals/rp1_hand_fixed.urdf` from the repo root. All inputs/outputs validate before installation; ZIP paths are never extracted.
|
||||
- Geometry additions in the hands are visual only. Existing collision envelopes intentionally remain those used by the trained 24-DOF model.
|
||||
|
||||
The ZIP supplied no license/attribution file. Do not infer redistribution rights from receipt of these assets. It remains a local-evaluation package under the limitations below.
|
||||
|
||||
## License limitation — local evaluation only
|
||||
|
||||
The RP1 description submodule does not supply a license file in this checkout. Do **not** infer an Apache/BSD license for its meshes/model or motion data from the platform or RoboLab. Confirm upstream rights before redistributing this package or deploying publicly.
|
||||
|
||||
`LICENSES/RoboLab-BSD-3-Clause.txt` preserves RoboLab's code notice; it does not grant rights to separately sourced RP1 description assets, motion recordings/retargeting data or the user's checkpoints. Training-code, model, checkpoint and motion provenance must be reviewed independently for redistribution. No public deployment was performed.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user