4 Commits

Author SHA1 Message Date
chenlin 2b0c395508 feat: release v0.6 with T1 and Apollo upright-v3 locomotion 2026-11-03 10:05:53 +08:00
chenlin a8be5e0134 feat: release v0.5 with shared interactive arenas and textured RP1
Unify lighting and line-colour controls across robots, replace the football with a shared layout of draggable physical props, and import the supplied RP1 GLBs without changing trained physics or policies.

Include reproducible visual import/provenance, regression coverage and verification records. Verified 66 unit tests, 55 browser tests and production-build checks.
2026-10-30 14:14:03 +08:00
chenlin 57b3108ab3 feat: release v0.4 with textured Microban visuals 2026-10-29 15:55:17 +08:00
chenlin 09f7b02c3e feat: release v0.3 with RP1 trained skills and scaled arenas 2026-10-29 14:16:04 +08:00
256 changed files with 14032 additions and 490 deletions
+2
View File
@@ -29,11 +29,13 @@ 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
+47 -10
View File
@@ -11,20 +11,44 @@ license: apache-2.0
# Browser robot simulation platform
MuJoCo WASM + onnxruntime-web + three.js, with **Microduck** (legs / rollers) and **Microban** Robot Packages. Physics and ONNX inference run locally in the browser; no simulation backend is required.
MuJoCo WASM + onnxruntime-web + three.js, with **Microduck** (legs / rollers), **Microban**, **RP1**, **Booster T1**, and **Apptronik Apollo** Robot Packages. Physics and ONNX inference run locally in the browser; no simulation backend is required.
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.
## v0.6
- Added Booster T1 and Apptronik Apollo packages with browser-native ONNX locomotion and WASD control.
- Apollo uses the explicitly selected upright-v3 `model_9999.pt`, including its calibrated stand pose, spawn height and fall threshold.
- Added body-frame linear-velocity observations and explicit World floor collision settings for imported models.
- Reproducible import scripts, source hashes and browser regression tests accompany both new robots.
- Verified: 68 unit tests, 19 targeted browser regression tests (all five robot families), package/hash validation, formatting and production build. See [v0.6 verification](docs/robots/v0.6-verification.md).
## v0.5
- 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.
## Robots
| Robot | Default scene / presentation | Controls |
|---|---|---|
| Microduck | Shared 4.5 × 4.5 m bounded arena, ball, original GLB/palette/comic effects | Existing walking, skating, skills and recovery |
| Microban | Shared 4.5 × 4.5 m bounded arena, dark/orange grid and comic UI, MJCF robot visuals | Walking policy + independent head rotation |
| 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) |
Switch robots using **Robot** in the toolbar. Returning to Microduck restores the session's colour and feet / rollers choice, but initializes a fresh physical state. Failed loads keep the previous robot available and show an inline retry action.
**Booster T1** is also available in the Robot selector: W/S walks forward/backward, A/D turns, Space resets, Escape pauses, and C restores the chase camera. It uses the latest checkpoint at import (`model_6700.pt`, run `2026-11-02_15-03-39_t1_flat`) via ONNX, with original 23-DOF physics and STL visuals. See [T1 provenance, re-import and verification](app/public/robots/t1/SOURCE.md).
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 assets originate from [Rhoban/microban](https://github.com/Rhoban/microban); exact source hashes, dirty-worktree provenance and license notices are included in its Package.
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.
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).
### Shared scene controls (all robots)
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 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.
## Keyboard and mouse
@@ -40,12 +64,13 @@ Microduck policies / assets originate from [pollen-robotics/microduck](https://g
| Microduck ground pick | G |
| Microduck forward roll; roller crouch | T |
| Microduck feet / rollers | M or quickbar |
| Restore rear chase camera (both robots) | C |
| Restore rear chase camera (all robots) | C |
| Microban independent head rotation | H |
| RP1 trained dance (10 s segment) / wave (4.36 s) | J / H |
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.
All bundled robots, and future Packages omitting `presentation.world`, use the shared **4.5 × 4.5 m** arena (length and width increased 50% from 3 m). Its four real collision walls are 0.25 m high and 0.05 m thick, with Microduck's dark glowing grid. Microban's interior stays flat; no relief or automatic coordinate clamping is added. Explicit `world: "flat"` remains available for generic-runtime diagnostics. Both 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). Microduck mouse dragging still applies physical forces to the robot / ball. Microban mouse dragging orbits the camera. Gamepad / touch are not part of this release's acceptance scope.
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 robots. Gamepad / touch are not part of this release's acceptance scope.
## Microban fidelity and limits
@@ -60,9 +85,21 @@ All bundled robots, and future Packages omitting `presentation.world`, use the s
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.
## Apptronik Apollo
Select **Apptronik Apollo** in the Robot menu. **W/S** walks forward/backward, **A/D** turns, **Space** resets, **Escape** pauses, and **C** restores the chase camera. Releasing movement keys stops the command. The package uses the explicitly selected checkpoint `apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/model_9999.pt` (32 actions, 108 observations), its calibrated upright stand pose, original STL visuals and native position actuators. No scripted motion is substituted. See [Apollo source, re-import and verification](app/public/robots/apollo/SOURCE.md).
## RP1 trained skills
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
Binary robot meshes and ONNX files use Git LFS:
Binary robot meshes, ONNX policies and `.f32` motion samples use Git LFS:
```bash
git lfs install
@@ -106,9 +143,9 @@ For prefixed hosting, build and preview with `VITE_BASE=/play/`; `DEPLOY_PATH=/p
- `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 terms, ONNX primary control, position targets and optional sinusoidal overlays. Unsupported capabilities are rejected, not silently simulated incorrectly. New capabilities require explicit registry / schema work.
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 [current bounded-default verification](docs/superpowers/verification/2026-10-28-default-bounded-arena.md).
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
+117
View File
@@ -0,0 +1,117 @@
import { test, expect } from "@playwright/test";
test("Apollo: native MuJoCo/ONNX, WASD, stable locomotion and reset", async ({
page,
}, info) => {
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.goto("/");
await expect(
page.getByRole("button", { name: "Pause", exact: true }),
).toBeEnabled();
await page.getByLabel("Robot", { exact: true }).selectOption("apollo");
await page.waitForFunction(
() =>
window.__store.getState().robotId === "apollo" ||
window.__store.getState().runtimeError,
);
expect(
await page.evaluate(() => window.__store.getState().runtimeError),
).toBeNull();
await page.evaluate(() => window.rl.pause());
expect(await page.evaluate(() => window.rl.buildObs().length)).toBe(108);
expect(await page.evaluate(() => window.rl.lastAction.length)).toBe(32);
// Apollo defaults disable visual-geom collisions: the World floor must
// explicitly override those defaults rather than inherit a ghost floor.
const floor = await page.evaluate(() => {
const m = window.rl.model,
id = m.geom("platform_floor").id;
return [m.geom_contype[id], m.geom_conaffinity[id], m.geom_group[id]];
});
expect(floor).toEqual([1, 1, 0]);
await page
.locator("canvas")
.first()
.click({ position: { x: 700, y: 600 } });
for (const [key, expected] of [
["KeyW", [0.5, 0, 0]],
["KeyS", [-0.3, 0, 0]],
["KeyA", [0, 0, 0.4]],
["KeyD", [0, 0, -0.4]],
]) {
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 trials = await page.evaluate(async () => {
const r = window.rl,
reports = [];
r.setPropsParked(true);
for (const [name, command] of [
["stand", [0, 0, 0]],
["forward", [0.5, 0, 0]],
["backward", [-0.3, 0, 0]],
["left", [0, 0, 0.4]],
["right", [0, 0, -0.4]],
]) {
await r.resetSim();
r.command.set(command);
for (let i = 0; i < 250; i++) {
await r.step(1);
if (
![...r.data.qpos, ...r.data.qvel, ...r.lastAction].every(
Number.isFinite,
)
)
throw new Error("Non-finite Apollo state");
if (r.fallen) break;
}
const [w, x, y, z] = r.data.qpos.slice(3, 7);
reports.push({
name,
position: Array.from(r.data.qpos.slice(0, 3)),
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
fallen: r.fallen,
time: r.data.time,
});
}
return reports;
});
console.log("Apollo trials", JSON.stringify(trials));
await info.attach("apollo-trials.json", {
body: JSON.stringify(trials, null, 2),
contentType: "application/json",
});
for (const trial of trials) {
expect(trial.fallen, trial.name).toBe(false);
expect(trial.position[2], `${trial.name}: upright height`).toBeGreaterThan(
1.04,
);
}
expect(trials[1].position[0]).toBeGreaterThan(1);
expect(trials[2].position[0]).toBeLessThan(-0.5);
expect(trials[3].yaw).toBeGreaterThan(0.8);
expect(trials[4].yaw).toBeLessThan(-0.8);
await page.keyboard.press("Space");
await expect.poll(() => page.evaluate(() => window.rl.data.time)).toBe(0);
await page.screenshot({ path: info.outputPath("apollo.png") });
for (const id of ["microban", "rp1", "t1", "apollo"]) {
await page.getByLabel("Robot", { exact: true }).selectOption(id);
await expect
.poll(() => page.evaluate(() => window.__store.getState().robotId))
.toBe(id);
expect(
await page.evaluate(() => window.__store.getState().runtimeError),
).toBeNull();
}
expect(errors).toEqual([]);
});
+3 -3
View File
@@ -57,9 +57,9 @@ test("arena appearance matches Microduck while Microban physics stays flat and W
};
});
expect(state).toEqual({
cell: 0.1,
section: 0.6,
color: 0xffb366,
cell: 0.1 * (0.33 / 0.27),
section: 0.6 * (0.33 / 0.27),
color: 0xf7e6cb,
reveal: 1,
topo: 0,
hiddenFloor: true,
+101 -67
View File
@@ -2,21 +2,37 @@ 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("Microduck and Microban share the 4.5m collision arena; visual inner faces match and C remains attached", async ({
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 of ["microduck-legs", "microban"]) {
if (id === "microban")
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(() => window.__gameApi.switchRobot("microban")),
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 {
@@ -33,24 +49,30 @@ test("Microduck and Microban share the 4.5m collision arena; visual inner faces
};
});
expect(state.id).toBe("arena");
expect(state.boundary).toEqual(boundary);
expect(state.boundary).toEqual(fitted);
expect(state.scale).toBe(scale);
expect(state.following).toBe(true);
expect(state.walls).toEqual(
arenaWalls(boundary).map((w) => ({ ...w, type: 6, body: 0 })),
arenaWalls(fitted).map((w) => ({ ...w, type: 6, body: 0 })),
);
expect(state.visuals).toEqual([
[2.25, 0.125, 0],
[-2.25, 0.125, 0],
[0, 0.125, 2.25],
[0, 0.125, -2.25],
[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;
r.controls.maxDistance = 8;
r.camera.position.set(-3, 3, 3);
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();
});
@@ -87,63 +109,75 @@ test("a future Package with no world field automatically loads the bounded defau
world: window.rl.world.id,
bounds: window.rl.world.boundary,
})),
).toEqual({ id: "future-bot", world: "arena", bounds: boundary });
).toEqual({
id: "future-bot",
world: "arena",
bounds: Object.fromEntries(
Object.entries(boundary).map(([k, v]) => [k, v * (0.33 / 0.27)]),
),
});
});
test("real MuJoCo wall contacts block commanded motion on all four sides without coordinate clamping", async ({
page,
}, info) => {
await bootDuck(page);
expect(
await page.evaluate(() => window.__gameApi.switchRobot("microban")),
).toBe(true);
const results = await page.evaluate(async () => {
const r = window.rl,
report = [];
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 * 2.05;
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([0.15, 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();
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();
}
list.delete();
report.push({
name,
contacts,
max,
half,
time: r.data.time,
fallen: r.fallen,
finite: Array.from(r.data.qpos).every(Number.isFinite),
});
}
report.push({
name,
contacts,
max,
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);
}
return report;
await info.attach("wall-contacts.json", {
body: JSON.stringify(results, null, 2),
contentType: "application/json",
});
});
for (const r of results) {
expect(r.contacts, JSON.stringify(r)).toBeGreaterThan(0);
expect(r.max, JSON.stringify(r)).toBeLessThan(2.25);
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",
});
});
+9 -5
View File
@@ -60,13 +60,15 @@ test("both robots default to the same rear camera and comic UI; Microban keeps f
await expect(
page.getByRole("navigation", { name: "Simulation controls" }),
).toHaveCSS("border-top-width", "2px");
await expect(page.getByRole("group", { name: "Duck colours" })).toHaveCount(
0,
);
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 / ball: apply force")).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),
@@ -74,7 +76,9 @@ test("both robots default to the same rear camera and comic UI; Microban keeps f
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: "Duck colours" })).toBeVisible();
await expect(
page.getByRole("group", { name: "Scene line colours" }),
).toBeVisible();
expect(errors).toEqual([]);
});
for (const id of ["microban", "microduck-legs"])
+25 -2
View File
@@ -1,6 +1,6 @@
import { test, expect } from "@playwright/test";
test.use({ video: { mode: "on", size: { width: 1280, height: 800 } } });
test("deployed assets respect the base path and both Robot Packages boot", async ({
test("deployed assets respect the base path and all three Robot Packages boot", async ({
page,
}, info) => {
const failures = [],
@@ -20,7 +20,24 @@ test("deployed assets respect the base path and both Robot Packages boot", async
await expect(
page.getByRole("button", { name: "Pause", exact: true }),
).toBeEnabled();
await page.waitForTimeout(500); // capture after the ball's existing appear FX
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
@@ -29,6 +46,12 @@ test("deployed assets respect the base path and both Robot Packages boot", async
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;
+212
View File
@@ -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);
});
+1 -1
View File
@@ -26,7 +26,7 @@ for (const scenario of [
world.boundary.half_extent = 1.5;
await route.fulfill({ response, json: world });
});
const errors = await bootDuck(page);
const errors = await bootDuck(page, { legacyPhysics: true });
await page.evaluate(async (scenario) => {
const r = window.rl;
if (scenario === "rollers" || scenario === "crouch") {
+5 -5
View File
@@ -11,7 +11,7 @@ test("Microduck → Microban → Microduck restores theme, colours and locomotio
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await ready(page);
await page.getByRole("button", { name: "Lavender colours" }).click();
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");
@@ -26,9 +26,9 @@ test("Microduck → Microban → Microduck restores theme, colours and locomotio
await expect(
page.getByText("Toggle head rotation", { exact: false }),
).toBeVisible();
await expect(page.getByRole("group", { name: "Duck colours" })).toHaveCount(
0,
);
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(
@@ -37,7 +37,7 @@ test("Microduck → Microban → Microduck restores theme, colours and locomotio
window.rl?.loco === "rollers",
);
await expect(
page.getByRole("button", { name: "Lavender colours" }),
page.getByRole("button", { name: "Lavender scene lines" }),
).toHaveAttribute("aria-pressed", "true");
expect(await page.evaluate(() => window.rl.data.time)).toBeLessThan(3);
expect(errors).toEqual([]);
+347
View File
@@ -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();
});
+274
View File
@@ -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);
});
+291
View File
@@ -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(5);
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);
});
+16 -6
View File
@@ -3,7 +3,9 @@ import { test, expect } from "@playwright/test";
test("20 robot transitions release old WASM objects and plateau scene/GPU/listeners", async ({
page,
}, info) => {
test.setTimeout(180_000);
// 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,
@@ -41,7 +43,7 @@ test("20 robot transitions release old WASM objects and plateau scene/GPU/listen
await page.evaluate(() => window.__gameApi.pause());
const measurements = [];
for (let i = 0; i < 20; i++) {
const id = i % 2 === 0 ? "microban" : "microduck-legs";
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,
@@ -57,6 +59,9 @@ test("20 robot transitions release old WASM objects and plateau scene/GPU/listen
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);
@@ -65,12 +70,17 @@ test("20 robot transitions release old WASM objects and plateau scene/GPU/listen
measurements.push(sample);
}
const duck = measurements.filter((s) => s.id === "microduck-legs"),
ban = measurements.filter((s) => s.id === "microban");
for (const samples of [duck, ban]) {
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);
expect(samples.at(-1).memory.geometries).toBeLessThanOrEqual(
samples[1].memory.geometries + 1,
// 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,
+255
View File
@@ -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([]);
});
+68
View File
@@ -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([]);
});
+157
View File
@@ -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([]);
});
}
+2 -2
View File
@@ -1,5 +1,5 @@
import { expect } from "@playwright/test";
export async function bootDuck(page) {
export async function bootDuck(page, { legacyPhysics = false } = {}) {
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.addInitScript(() => {
@@ -7,7 +7,7 @@ export async function bootDuck(page) {
Math.random = () =>
(seed = (1664525 * seed + 1013904223) >>> 0) / 4294967296;
});
await page.goto("/?boot=1&test=1");
await page.goto(`/?boot=1&test=1${legacyPhysics ? "&oracle=legacy" : ""}`);
await page.waitForFunction(
() => window.rl?.prepareTest || window.__store?.getState().bootFailed,
);
+101
View File
@@ -0,0 +1,101 @@
import { test, expect } from "@playwright/test";
test("T1: native MuJoCo/ONNX, WASD, stable locomotion and reset", async ({
page,
}, info) => {
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.goto("/");
await expect(
page.getByRole("button", { name: "Pause", exact: true }),
).toBeEnabled();
await page.getByLabel("Robot", { exact: true }).selectOption("t1");
await page.waitForFunction(
() =>
window.__store.getState().robotId === "t1" ||
window.__store.getState().runtimeError,
);
expect(
await page.evaluate(() => window.__store.getState().runtimeError),
).toBeNull();
await page.evaluate(() => window.rl.pause());
expect(await page.evaluate(() => window.rl.buildObs().length)).toBe(81);
expect(await page.evaluate(() => window.rl.lastAction.length)).toBe(23);
await page
.locator("canvas")
.first()
.click({ position: { x: 700, y: 600 } });
for (const [key, expected] of [
["KeyW", [0.6, 0, 0]],
["KeyS", [-0.4, 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 trials = await page.evaluate(async () => {
const r = window.rl,
reports = [];
r.setPropsParked(true);
for (const [name, command] of [
["stand", [0, 0, 0]],
["forward", [0.6, 0, 0]],
["backward", [-0.4, 0, 0]],
["left", [0, 0, 0.6]],
["right", [0, 0, -0.6]],
]) {
await r.resetSim();
r.command.set(command);
for (let i = 0; i < 250; i++) {
await r.step(1);
if (
![...r.data.qpos, ...r.data.qvel, ...r.lastAction].every(
Number.isFinite,
)
)
throw new Error("Non-finite T1 state");
if (r.fallen) break;
}
const [w, x, y, z] = r.data.qpos.slice(3, 7);
reports.push({
name,
position: Array.from(r.data.qpos.slice(0, 3)),
yaw: Math.atan2(2 * (w * z + x * y), 1 - 2 * (y * y + z * z)),
fallen: r.fallen,
time: r.data.time,
});
}
return reports;
});
console.log("T1 trials", JSON.stringify(trials));
await info.attach("t1-trials.json", {
body: JSON.stringify(trials, null, 2),
contentType: "application/json",
});
for (const trial of trials) expect(trial.fallen, trial.name).toBe(false);
expect(trials[1].position[0]).toBeGreaterThan(1);
expect(trials[2].position[0]).toBeLessThan(-0.5);
expect(trials[3].yaw).toBeGreaterThan(1);
expect(trials[4].yaw).toBeLessThan(-1);
await page.keyboard.press("Space");
await expect.poll(() => page.evaluate(() => window.rl.data.time)).toBe(0);
await page.screenshot({ path: info.outputPath("t1.png") });
for (const id of ["microban", "rp1", "t1"]) {
await page.getByLabel("Robot", { exact: true }).selectOption(id);
await expect
.poll(() => page.evaluate(() => window.__store.getState().robotId))
.toBe(id);
}
expect(errors).toEqual([]);
});
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "microduck-sandbox",
"version": "0.2.0",
"version": "0.6.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "microduck-sandbox",
"version": "0.2.0",
"version": "0.6.0",
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "microduck-sandbox",
"private": true,
"version": "0.2.0",
"version": "0.6.0",
"type": "module",
"scripts": {
"dev": "vite",
@@ -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 [2024] [Apptronik]
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.
+202
View File
@@ -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 2025, The mjlab Developers
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.
+40
View File
@@ -0,0 +1,40 @@
# Apptronik Apollo
## Source and checkpoint
- Model: `/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/apptronik_apollo.xml` and its STL assets (Apache-2.0, copyright Apptronik; see `LICENSES/apollo.txt`).
- Training: `/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab` (see `LICENSES/mjlab.txt`).
- Explicitly selected v0.6 checkpoint: `logs/rsl_rl/apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/model_9999.pt`.
- Browser policy: corresponding run's ONNX, copied to `policies/walk.onnx`. Import verifies exported MLP weights, observation mean and folded normalization standard deviation against the checkpoint, not just its file timestamp.
- `source-manifest.json` records checkpoint SHA-256, copied file hashes and training configuration hashes. No runtime access to mjlab is required.
## Contract and modifications
The 108 observations are body-frame linear velocity (base IMU velocimeter), angular velocity (gyro), projected gravity, 32 relative joint positions, 32 joint velocities, 32 previous actions and the three-component velocity command, in that order. Normalization is embedded in ONNX. Action targets are stand-pose defaults plus per-joint residual scales. Head/arm residual scales are zero, as in the training configuration; their original actuators hold the pose.
`import-apollo.py` applies mjlab Entity's collision editors and preserves native actuator gains, damping, armature, force limits and stand defaults. Generated `model.xml` is modified from upstream: named visual geoms, base-aligned IMU, foot sites, training collision filtering, no standalone lights/keyframes, explicit task solver options (5 ms timestep, four substeps per control tick, Newton/pyramidal/implicitfast, 20 iterations). The newer native MuJoCo serializer's `input="pos"` actuator keyword is omitted for WASM compatibility; the equivalent general actuator's position gain/bias is retained. Stand defaults are read from mjlab's calibrated upright-v3 keyframe, not the original deeply flexed asset pose or rounded ONNX metadata. The importer cross-checks the pose against ONNX metadata. Knees default to 0.35 rad, spawn root height is 1.1008385 m (15 mm clearance), grounded target height is 1.0858385 m, and the fall threshold is 0.98 m, matching upright-v3 training.
The shared platform composer creates the floor with explicit collision bits and group, overriding Apollo's visual-only global geom defaults. The arena uses the platform's normal robot-height scaling, interactive objects and camera controls. No pose animation or kinematic walking is used.
Controls: W/S = +0.5/-0.3 m/s forward/backward; A/D = +/-0.4 rad/s yaw command; arrows are aliases. Key release zeros the command. Space resets; Escape pauses; C restores chase camera.
## Re-import
From the mjlab directory:
```sh
uv run python /home/cen/Embodied_Workspace/Mujoco_Projects/microduck-simulator/app/scripts/import-apollo.py . \
--checkpoint-file logs/rsl_rl/apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/model_9999.pt
```
Use `--checkpoint-file` to reproduce this release exactly. Without it, the importer selects the newest checkpoint in `apollo_flat_upright_v3` by modification time (iteration breaks ties). Its run must already contain a matching ONNX export newer than the checkpoint; otherwise import fails rather than silently using stale weights. Set `APOLLO_ASSETS_ROOT` if the source model lives elsewhere.
## Verification
```sh
cd app
npm run validate:packages
npx playwright test apollo.spec.js
```
Real browser MuJoCo WASM and ONNX inference test: 108 observations / 32 actions, WASD commands and key release, floor collision bits, five independent five-second finite-state rollouts, reset, and switching between Apollo/T1/RP1/Microban. Upright-v3 rollouts with props parked: no falls; forward x +2.258 m, backward x -1.174 m, left yaw +1.158 rad, right yaw -1.725 rad, standing height 1.086 m. Tests also require final root height above 1.04 m in every trial. This is browser simulation acceptance, not a claim of perfect velocity tracking or hardware equivalence. Screenshot is generated in Playwright's test-results directory.
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.
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.
+365
View File
@@ -0,0 +1,365 @@
<mujoco model="apptronik_apollo">
<!-- Modified for browser simulation by import-apollo.py; see SOURCE.md. -->
<compiler angle="radian" meshdir="assets" texturedir="assets" />
<default>
<joint limited="true" />
<geom contype="0" conaffinity="0" condim="1" group="1" solref="0.005" margin="0.0005" />
<light diffuse="0.8 0.8 0.8" />
<equality solref="0.005" solimp="0.99 0.999 1e-05" />
<default class="active_adhesion">
<geom margin="0.01" gap="0.01" rgba="0.8 0.5 0.5 1" />
</default>
<default class="visual">
<geom type="mesh" />
<default class="visual_dark">
<geom rgba="0.0980392 0.0980392 0.0980392 1" />
</default>
<default class="visual_light">
<geom rgba="0.960784 0.960784 0.952941 1" />
</default>
</default>
<default class="collision">
<geom group="3" rgba="0 1 0 0.4" />
</default>
</default>
<asset>
<mesh name="neck_mount_fix_link" file="neck_mount_fix_link.stl" />
<mesh name="neck_yaw_link" file="neck_yaw_link.stl" />
<mesh name="afh_2_1_link" file="afh_2_1_link.stl" />
<mesh name="torso_link" content_type="model/stl" file="torso_link.stl" />
<mesh name="battery_mount_fix" file="battery_mount_fix.stl" />
<mesh name="torso_pitch_link" file="torso_pitch_link.stl" />
<mesh name="torso_roll_link" file="torso_roll_link.stl" />
<mesh name="pelvis_link" file="pelvis_link.stl" />
<mesh name="l_shoulder_aa_link" file="l_shoulder_aa_link.stl" />
<mesh name="l_shoulder_ie_link" file="l_shoulder_ie_link.stl" />
<mesh name="l_shoulder_fe_link" file="l_shoulder_fe_link.stl" />
<mesh name="l_elbow_fe_link" file="l_elbow_fe_link.stl" />
<mesh name="l_wrist_roll_link" file="l_wrist_roll_link.stl" />
<mesh name="l_wrist_yaw_link" file="l_wrist_yaw_link.stl" />
<mesh name="l_wrist_pitch_link" file="l_wrist_pitch_link.stl" />
<mesh name="wrist_adapter" file="ability_hand/wrist_adapter.STL" />
<mesh name="wristmesh" file="ability_hand/wristmesh.STL" />
<mesh name="FB_palm_ref" file="ability_hand/FB_palm_ref.STL" />
<mesh name="idx-F1" file="ability_hand/idx-F1.STL" />
<mesh name="idx-F2" file="ability_hand/idx-F2.STL" />
<mesh name="thumb-F1" file="ability_hand/thumb-F1.STL" />
<mesh name="thumb-F2-left" file="ability_hand/thumb-F2-left.STL" />
<mesh name="r_shoulder_aa_link" file="r_shoulder_aa_link.stl" />
<mesh name="r_shoulder_ie_link" file="r_shoulder_ie_link.stl" />
<mesh name="r_shoulder_fe_link" file="r_shoulder_fe_link.stl" />
<mesh name="r_elbow_fe_link" file="r_elbow_fe_link.stl" />
<mesh name="r_wrist_roll_link" file="r_wrist_roll_link.stl" />
<mesh name="r_wrist_yaw_link" file="r_wrist_yaw_link.stl" />
<mesh name="r_wrist_pitch_link" file="r_wrist_pitch_link.stl" />
<mesh name="FB_palm_ref_MIR" file="ability_hand/FB_palm_ref_MIR.STL" />
<mesh name="thumb-F1-MIR" file="ability_hand/thumb-F1-MIR.STL" />
<mesh name="thumb-F2-right" file="ability_hand/thumb-F2-right.STL" />
<mesh name="l_hip_ie_link" file="l_hip_ie_link.stl" />
<mesh name="l_hip_aa_link" file="l_hip_aa_link.stl" />
<mesh name="l_hip_fe_link" file="l_hip_fe_link.stl" />
<mesh name="l_knee_fe_link" file="l_knee_fe_link.stl" />
<mesh name="l_ankle_ie_link" file="l_ankle_ie_link.stl" />
<mesh name="l_foot_link" file="l_foot_link.stl" />
<mesh name="r_hip_ie_link" file="r_hip_ie_link.stl" />
<mesh name="r_hip_aa_link" file="r_hip_aa_link.stl" />
<mesh name="r_hip_fe_link" file="r_hip_fe_link.stl" />
<mesh name="r_knee_fe_link" file="r_knee_fe_link.stl" />
<mesh name="r_ankle_ie_link" file="r_ankle_ie_link.stl" />
<mesh name="r_foot_link" file="r_foot_link.stl" />
</asset>
<worldbody>
<body name="base_link" pos="0 0 1.0813">
<inertial pos="-0.0466459 -2.50736e-05 -0.0721416" quat="0.661991 0.662086 0.248682 -0.248127" mass="7.43582" diaginertia="0.0633318 0.0512326 0.0281854" />
<joint name="floating_base" type="free" />
<geom name="base_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="pelvis_link" />
<geom name="collision_capsule_body_pelvis" class="collision" size="0.1 0.09" pos="-0.06 0 -0.08" quat="0.707388 0.706825 0 0" type="capsule" conaffinity="1" friction="0.8" margin="0" />
<site name="base_imu" size="0.01" />
<camera name="track" quat="0.791164 0.554139 0.148485 0.211997" pos="1.69 -2.93 1.232" mode="trackcom" />
<body name="torso_oak_d_pro_w_rear_frame_link" pos="-0.164306 5e-08 0.0140886" quat="0.000689634 -0.500011 0.000398172 0.866019">
<inertial pos="0 0 0" mass="0.115" diaginertia="0.000144423 3.89011e-05 0.000126395" />
<camera name="torso_oak_d_pro_w_rear" quat="0.500398 0.5 -0.499602 -0.5" fovy="70" />
</body>
<body name="torso_oak_d_pro_w_front_frame_link" pos="0.087306 -5e-08 0.0480886" quat="0.866025 0 0.500001 0">
<inertial pos="0 0 0" mass="0.115" diaginertia="0.000144423 3.89011e-05 0.000126395" />
<camera name="torso_oak_d_pro_w_front" quat="0.500398 0.5 -0.499602 -0.5" fovy="70" />
</body>
<body name="torso_roll_link" pos="0.03 0 0.03125">
<inertial pos="-0.0337439 7.47864e-09 -0.0199137" quat="0.5297 0.511275 -0.470427 0.486532" mass="0.824114" diaginertia="0.00159405 0.00123171 0.000760001" />
<joint name="torso_yaw" range="-0.829031 0.829031" actuatorfrcrange="-120 120" armature="0.231424" damping="200" frictionloss="0.7" axis="0 0 -1" />
<geom name="torso_roll_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="torso_roll_link" />
<body name="torso_pitch_link">
<inertial pos="-0.0120797 5.39687e-05 -0.00065376" quat="0.49026 0.489868 -0.50995 0.509534" mass="0.313137" diaginertia="0.000415493 0.000345069 9.17604e-05" />
<joint name="torso_roll" range="-0.20944 0.20944" actuatorfrcrange="-414 414" armature="1.56493" damping="165" frictionloss="4.53" axis="1 0 0" />
<geom name="torso_pitch_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="torso_pitch_link" />
<body name="torso_link">
<inertial pos="-0.0484952 0.00143204 0.185535" quat="0.702792 0.0157426 -6.68569e-05 0.711221" mass="19.3408" diaginertia="0.303595 0.272287 0.22035" />
<joint name="torso_pitch" range="-0.305433 1.35263" actuatorfrcrange="-315 315" armature="0.970692" damping="142" frictionloss="13.15" axis="0 1 0" />
<geom name="torso_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="torso_link" />
<geom name="collision_cylinder_torso" class="collision" size="0.16 0.05" pos="-0.045 0 0.2" type="capsule" conaffinity="1" friction="0.8" margin="0" />
<geom name="torso_link_visual_2" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="neck_mount_fix_link" />
<geom name="torso_link_visual_3" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="battery_mount_fix" />
<site name="imu" pos="0.067 0 0.124874" quat="9.38184e-07 0.707105 9.38187e-07 -0.707108" />
<body name="neck_yaw_link" pos="-0.0303298 0 0.32841" quat="0.991445 0 0.130526 0">
<inertial pos="-0.0110616 0.000438589 0.066541" quat="0.715974 -0.0707674 -0.0795701 0.689958" mass="0.707753" diaginertia="0.00278981 0.002738 0.00071974" />
<joint name="neck_yaw" range="-1.65806 1.65806" actuatorfrcrange="-10.6 10.6" armature="0.0368" damping="15" />
<geom name="neck_yaw_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="neck_yaw_link" />
<body name="neck_roll_link" pos="-0.025 0 0.2" quat="1.32679e-06 -1 0 0">
<inertial pos="9.66662e-05 -0.000233736 -0.000463806" quat="0.000426355 0.703652 0.00178423 0.710542" mass="0.0189001" diaginertia="1.89727e-06 1.24254e-06 1.0322e-06" />
<joint name="neck_roll" range="-0.785398 0.785398" actuatorfrcrange="-34.2 34.2" armature="0.00305531" damping="3" axis="1 0 0" />
<body name="neck_pitch_link" quat="1.17527e-06 0.885799 6.15724e-07 -0.464069">
<inertial pos="0.0412474 -0.00081671 0.0152493" quat="0.350337 0.613318 0.617311 0.346457" mass="1.78084" diaginertia="0.0135957 0.0109432 0.00697581" />
<joint name="neck_pitch" range="-0.261799 0.523599" actuatorfrcrange="-34.2 34.2" armature="0.00256298" damping="3" axis="0 1 0" />
<geom name="neck_pitch_link_visual_0" class="visual_light" pos="0 0 0" quat="0.938794 0 0.344479 0" mesh="afh_2_1_link" />
</body>
</body>
</body>
<body name="l_shoulder_aa_link" pos="-0.05 0.2 0.32">
<inertial pos="0.000169922 0.0025177 -0.0190065" quat="0.710165 -0.0144759 0.023056 0.703508" mass="0.0980048" diaginertia="4.61576e-05 3.97046e-05 1.43504e-05" />
<joint name="l_shoulder_aa" range="-0.122173 1.6057" actuatorfrcrange="-78 78" armature="0.0982771" damping="26" frictionloss="2" axis="1 0 0" />
<geom name="l_shoulder_aa_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_shoulder_aa_link" />
<body name="l_shoulder_ie_link">
<inertial pos="-0.00799772 0.0154729 -0.0231746" quat="0.0914838 0.586016 -0.671384 0.444364" mass="0.451281" diaginertia="0.00069896 0.000628486 0.000278066" />
<joint name="l_shoulder_ie" range="-0.471239 0.471239" actuatorfrcrange="-67 67" armature="0.0823104" damping="35" frictionloss="1.48" />
<geom name="l_shoulder_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_shoulder_ie_link" />
<body name="l_shoulder_fe_link" pos="0.0104822 0.03912 0" quat="0.991445 0 0 -0.130526">
<inertial pos="0.00453031 0.00134632 -0.143556" quat="0.707095 0.0140891 -0.00274087 0.706973" mass="3.51271" diaginertia="0.0284589 0.0232812 0.00763948" />
<joint name="l_shoulder_fe" range="-2.18166 0.610865" actuatorfrcrange="-114 114" armature="0.112768" damping="18" frictionloss="1.94" axis="0 1 0" />
<geom name="l_shoulder_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="l_shoulder_fe_link" />
<geom name="collision_capsule_body_l_arm_1" class="collision" size="0.055 0.14" pos="-0.005 0.01 -0.16" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<geom name="collision_capsule_body_l_arm_2" class="collision" size="0.055 0.055" pos="0.05 0.005 -0.125" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<geom name="collision_capsule_body_l_arm_3" class="collision" size="0.055 0.02" pos="-0.06 0.0025 -0.13" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<body name="l_elbow_fe_link" pos="0.025 0 -0.315">
<inertial pos="-0.0407636 -0.000100019 -0.0277184" quat="0.446501 0.557407 0.539502 0.445951" mass="0.947642" diaginertia="0.00105876 0.000944065 0.00076124" />
<joint name="l_elbow_fe" range="-2.61799 0.174533" actuatorfrcrange="-114 114" armature="0.102645" damping="17" frictionloss="2.55" axis="0 1 0" />
<geom name="l_elbow_fe_link_visual_0" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="l_elbow_fe_link" />
<body name="l_wrist_roll_link" pos="-0.04 0 -0.06" quat="0.707105 0 0 0.707108">
<inertial pos="0.0088493 0.000434657 -0.071867" quat="0.701782 -0.0503482 -0.0435035 0.709278" mass="0.694478" diaginertia="0.00294512 0.00284275 0.000723985" />
<joint name="l_wrist_roll" range="-1.65806 1.65806" actuatorfrcrange="-10.6 10.6" armature="0.0368" damping="15" />
<geom name="l_wrist_roll_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="l_wrist_roll_link" />
<geom name="collision_cylinder_l_arm" class="collision" size="0.04755 0.1076" pos="0 0 -0.1" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<body name="l_wrist_yaw_link" pos="0.025 0 -0.2">
<inertial pos="-9.66662e-05 0.000233736 -0.000463806" quat="-0.00178423 0.710542 -0.000426355 0.703652" mass="0.0189001" diaginertia="1.89727e-06 1.24254e-06 1.0322e-06" />
<joint name="l_wrist_yaw" range="-0.698 0.698" actuatorfrcrange="-34.2 34.2" armature="0.00329371" damping="3" axis="1 0 0" />
<geom name="l_wrist_yaw_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_wrist_yaw_link" />
<body name="l_wrist_pitch_link" quat="0.707105 0 0 -0.707108">
<inertial pos="0.0071177 -0.038442 -0.0669519" quat="0.614861 0.00892233 0.0323416 0.787921" mass="0.806883" diaginertia="0.00459474 0.00452816 0.00206219" />
<joint name="l_wrist_pitch" range="-0.75 1.588" actuatorfrcrange="-34.2 34.2" armature="0.00288074" damping="3" axis="1 0 0" />
<geom name="l_wrist_pitch_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_wrist_pitch_link" />
<geom name="wrist_adapter_mesh" class="visual_dark" pos="0 -0.0297676 -0.0277946" quat="1 0 0 0" mesh="wrist_adapter" />
<geom name="wrist_mesh" class="visual_dark" pos="0 -0.0343657 -0.0392954" quat="0.130526 0.991445 0 0" mesh="wristmesh" />
<geom name="palm_mesh" class="visual_dark" pos="0.0240477 -0.0463856 -0.0695448" quat="0.00516808 0.0439309 0.130372 0.990478" mesh="FB_palm_ref" />
<geom name="index_mesh_1" class="visual_dark" pos="0.0279216 -0.0502244 -0.134299" quat="0.0355504 -0.725304 0.0429902 0.686165" mesh="idx-F1" />
<frame pos="0.0296624 -0.053984 -0.172686" quat="-0.873305 0.487175 0 0">
<geom name="index_mesh_2" class="visual_dark" quat="0.00654576 -0.722842 0.0735774 0.687054" mesh="idx-F2" />
</frame>
<geom name="middle_mesh_1" class="visual_dark" pos="0.00841718 -0.0488804 -0.137964" quat="0.0114639 -0.705931 0.0210022 0.707876" mesh="idx-F1" />
<frame pos="0.00814998 -0.0526507 -0.176389" quat="-0.873305 0.487175 0 0">
<geom name="middle_mesh_2" class="visual_dark" quat="-0.018436 -0.704415 0.0507911 0.707729" mesh="idx-F2" />
</frame>
<geom name="ring_mesh_1" class="visual_dark" pos="-0.0117529 -0.049354 -0.135394" quat="-0.0126044 -0.685391 -0.0036555 0.728057" mesh="idx-F1" />
<frame pos="-0.0139914 -0.0531239 -0.173755" quat="-0.873305 0.487175 0 0">
<geom name="ring_mesh_2" class="visual_dark" quat="-0.0433349 -0.684934 0.025288 0.726875" mesh="idx-F2" />
</frame>
<geom name="pinky_mesh_1" class="visual_dark" pos="-0.0308633 -0.0509308 -0.128792" quat="-0.0350419 -0.683018 -0.0274385 0.729045" mesh="idx-F1" />
<frame pos="-0.0330569 -0.0546993 -0.167156" quat="-0.873305 0.487175 0 0">
<geom name="pinky_mesh_2" class="visual_dark" quat="-0.0657942 -0.683567 0.00142601 0.726915" mesh="idx-F2" />
</frame>
<geom name="thumb_mesh_1" class="visual_dark" pos="0.0240477 -0.0463856 -0.0695448" quat="-0.986553 0.125649 -0.0560269 -0.0882391" mesh="thumb-F1" />
<geom name="thumb_mesh_2" class="visual_dark" pos="0.0499644 -0.0457352 -0.0874305" quat="0.500891 -0.859176 -0.0358978 0.0981657" mesh="thumb-F2-left" />
<geom name="collision_l_hand_plate" class="collision" size="0.041 0.02 0.083" pos="0.00749988 -0.025 -0.112" type="box" contype="8" conaffinity="7" friction="0.8" margin="0" />
</body>
</body>
</body>
</body>
</body>
</body>
</body>
<body name="r_shoulder_aa_link" pos="-0.05 -0.2 0.32">
<inertial pos="0.000169922 0.0025177 -0.0190065" quat="0.710165 -0.0144759 0.023056 0.703508" mass="0.0980048" diaginertia="4.61576e-05 3.97046e-05 1.43504e-05" />
<joint name="r_shoulder_aa" range="-1.6057 0.122173" actuatorfrcrange="-78 78" armature="0.098338" damping="26" frictionloss="2" axis="1 0 0" />
<geom name="r_shoulder_aa_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_shoulder_aa_link" />
<body name="r_shoulder_ie_link">
<inertial pos="-0.00800045 -0.0154894 -0.0231814" quat="0.583857 0.0885889 -0.445504 0.672897" mass="0.451079" diaginertia="0.000700361 0.00062725 0.000277886" />
<joint name="r_shoulder_ie" range="-0.471239 0.471239" actuatorfrcrange="-67 67" armature="0.0823191" damping="35" frictionloss="1.48" />
<geom name="r_shoulder_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_shoulder_ie_link" />
<body name="r_shoulder_fe_link" pos="0.0104822 -0.03912 0" quat="0.991445 0 0 0.130526">
<inertial pos="0.00420186 -0.00125575 -0.142983" quat="0.7032 -0.00225527 0.011754 0.710892" mass="3.50359" diaginertia="0.0282519 0.0230724 0.00763457" />
<joint name="r_shoulder_fe" range="-2.18166 0.610865" actuatorfrcrange="-114 114" armature="0.112768" damping="18" frictionloss="1.94" axis="0 1 0" />
<geom name="r_shoulder_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="r_shoulder_fe_link" />
<geom name="collision_capsule_body_r_arm_1" class="collision" size="0.055 0.14" pos="-0.005 -0.01 -0.16" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<geom name="collision_capsule_body_r_arm_2" class="collision" size="0.055 0.055" pos="0.05 -0.005 -0.125" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<geom name="collision_capsule_body_r_arm_3" class="collision" size="0.055 0.02" pos="-0.06 -0.0025 -0.13" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<body name="r_elbow_fe_link" pos="0.025 0 -0.315">
<inertial pos="-0.0407591 0.000134025 -0.0277185" quat="0.458533 0.527215 0.568785 0.433907" mass="0.947653" diaginertia="0.00105948 0.000943838 0.000761313" />
<joint name="r_elbow_fe" range="-2.61799 0.174533" actuatorfrcrange="-114 114" armature="0.102645" damping="17" frictionloss="2.55" axis="0 1 0" />
<geom name="r_elbow_fe_link_visual_0" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="r_elbow_fe_link" />
<body name="r_wrist_roll_link" pos="-0.04 0 -0.06" quat="0.707105 0 0 -0.707108">
<inertial pos="0.00887138 -0.000263913 -0.0718159" quat="0.698707 -0.0449538 -0.0486448 0.712336" mass="0.695137" diaginertia="0.00294733 0.00284457 0.000724756" />
<joint name="r_wrist_roll" range="-1.65806 1.65806" actuatorfrcrange="-10.6 10.6" armature="0.0368" damping="15" />
<geom name="r_wrist_roll_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="r_wrist_roll_link" />
<geom name="collision_cylinder_r_arm" class="collision" size="0.04755 0.1076" pos="0 0 -0.1" type="capsule" contype="8" conaffinity="7" friction="0.8" margin="0" />
<body name="r_wrist_yaw_link" pos="0.025 0 -0.2" quat="1.32679e-06 0 0 -1">
<inertial pos="9.66662e-05 0.000233736 -0.000463806" quat="-0.00044002 0.703652 -0.00179716 0.710542" mass="0.0189001" diaginertia="1.89727e-06 1.24254e-06 1.0322e-06" />
<joint name="r_wrist_yaw" range="-0.698 0.698" actuatorfrcrange="-34.2 34.2" armature="0.0032937" damping="3" axis="1 0 0" />
<geom name="r_wrist_yaw_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_wrist_yaw_link" />
<body name="r_wrist_pitch_link" quat="0.707105 0 0 -0.707108">
<inertial pos="0.0181202 0.0388729 -0.0688824" quat="0.630263 -0.0221958 -0.0501406 0.774443" mass="0.806683" diaginertia="0.00526208 0.00452156 0.0026899" />
<joint name="r_wrist_pitch" range="-1.588 0.75" actuatorfrcrange="-34.2 34.2" armature="0.00288075" damping="3" axis="1 0 0" />
<geom name="r_wrist_pitch_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_wrist_pitch_link" />
<geom name="r_wrist_pitch_link_visual_1" class="visual_dark" pos="0 0.0297676 -0.0277946" quat="1.32679e-06 0 0 1" mesh="wrist_adapter" />
<geom name="r_wrist_pitch_link_visual_2" class="visual_dark" pos="1.22016e-08 0.0343657 -0.0392954" quat="1.73181e-07 1.31544e-06 0.991445 0.130526" mesh="wristmesh" />
<geom name="r_wrist_pitch_link_visual_3" class="visual_dark" pos="0.0240477 0.0463855 -0.0695448" quat="0.990478 0.130372 0.0439307 0.00516677" mesh="FB_palm_ref_MIR" />
<geom name="r_wrist_pitch_link_visual_4" class="visual_dark" pos="0.0279216 0.0502243 -0.134299" quat="0.725304 -0.0355495 0.686165 0.0429892" mesh="idx-F1" />
<frame pos="0.0296625 0.053984 -0.172686" quat="-0.873305 -0.487175 0 0">
<geom name="r_wrist_pitch_link_visual_5" class="visual_dark" quat="0.722842 -0.00654484 0.687054 0.0735764" mesh="idx-F2" />
</frame>
<geom name="r_wrist_pitch_link_visual_6" class="visual_dark" pos="0.00841723 0.0488804 -0.137964" quat="0.705931 -0.0114629 0.707876 0.0210013" mesh="idx-F1" />
<frame pos="0.00815005 0.0526507 -0.176389" quat="-0.873305 -0.487175 0 0">
<geom name="r_wrist_pitch_link_visual_7" class="visual_dark" quat="0.704415 0.018437 0.707729 0.0507901" mesh="idx-F2" />
</frame>
<geom name="r_wrist_pitch_link_visual_8" class="visual_dark" pos="-0.0117529 0.0493541 -0.135394" quat="0.685391 0.0126053 0.728057 -0.00365641" mesh="idx-F1" />
<frame pos="-0.0139913 0.053124 -0.173755" quat="-0.873305 -0.487175 0 0">
<geom name="r_wrist_pitch_link_visual_9" class="visual_dark" quat="0.684934 0.0433359 0.726875 0.0252871" mesh="idx-F2" />
</frame>
<geom name="r_wrist_pitch_link_visual_10" class="visual_dark" pos="-0.0308632 0.0509308 -0.128792" quat="0.683018 0.0350429 0.729045 -0.0274394" mesh="idx-F1" />
<frame pos="-0.0330568 0.0546993 -0.167156" quat="-0.873305 -0.487175 0 0">
<geom name="r_wrist_pitch_link_visual_11" class="visual_dark" quat="0.683567 0.0657951 0.726915 0.00142511" mesh="idx-F2" />
</frame>
<geom name="r_wrist_pitch_link_visual_12" class="visual_dark" pos="0.0240477 0.0463855 -0.0695448" quat="-0.125649 0.986553 -0.0882404 -0.0560268" mesh="thumb-F1-MIR" />
<geom name="r_wrist_pitch_link_visual_13" class="visual_dark" pos="0.0499644 0.0457351 -0.0874305" quat="-0.859175 0.500891 -0.0981665 0.0358989" mesh="thumb-F2-right" />
<geom name="collision_r_hand_plate" class="collision" size="0.041 0.02 0.083" pos="0.00749988 0.025 -0.112" type="box" contype="8" conaffinity="7" friction="0.8" margin="0" />
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
<body name="l_hip_ie_link" pos="-0.02 0.11 -0.16875" quat="0.957662 0.126078 -0.256605 0.0337826">
<inertial pos="-0.0275726 0.000155527 0.0265849" quat="-0.0182885 0.43376 -0.029543 0.900358" mass="1.49972" diaginertia="0.00446385 0.00343018 0.00205254" />
<joint name="l_hip_ie" range="-0.567232 1.09083" actuatorfrcrange="-120 120" armature="0.231424" damping="171" frictionloss="7.95" />
<geom name="l_hip_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_hip_ie_link" />
<body name="l_hip_aa_link">
<inertial pos="0.000193883 0.00068757 0.00240456" quat="0.488822 0.400587 -0.484645 0.604733" mass="0.429858" diaginertia="0.000370659 0.000322451 0.000129015" />
<joint name="l_hip_aa" range="-0.218166 0.741765" actuatorfrcrange="-494 494" armature="0.399395" damping="153" frictionloss="7" axis="1 0 0" />
<geom name="l_hip_aa_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_hip_aa_link" />
<body name="l_hip_fe_link" quat="0.957662 -0.126079 0.256605 -0.0337828">
<inertial pos="0.0065559 0.00346415 -0.207233" quat="0.864334 0.00804176 0.0489557 0.500466" mass="10.7833" diaginertia="0.124113 0.120556 0.0499696" />
<joint name="l_hip_fe" range="-1.85005 0.476475" actuatorfrcrange="-342 342" armature="0.187096" damping="92" frictionloss="21.06" axis="0 1 0" />
<geom name="l_hip_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="l_hip_fe_link" />
<geom name="collision_capsule_body_l_thigh" class="collision" size="0.105 0.1" pos="0 0.005 -0.215" type="capsule" contype="2" conaffinity="13" friction="0.8" margin="0" />
<body name="l_knee_fe_link" pos="-0.05 0 -0.425">
<inertial pos="0.043534 0.00505054 -0.152417" quat="0.917057 0.00954505 0.0113608 0.398479" mass="4.57515" diaginertia="0.0639569 0.0630895 0.0108036" />
<joint name="l_knee_fe" range="0 2.61799" actuatorfrcrange="-336 336" armature="0.292264" damping="46" frictionloss="7.7" axis="0 1 0" />
<geom name="l_knee_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="l_knee_fe_link" />
<geom name="collision_capsule_body_l_shin" class="collision" size="0.071 0.15" pos="0.0476 0.0061 -0.19" quat="0.998048 0 0.0624593 0" type="capsule" contype="2" conaffinity="13" friction="0.8" margin="0" />
<body name="l_ankle_ie_link" pos="0.05 0 -0.425" quat="0.987672 0.0864102 -0.130029 0.0113761">
<inertial pos="0.00995038 9.93144e-05 0.000832075" quat="0.692933 0.691803 0.145013 -0.14221" mass="0.12478" diaginertia="4.80038e-05 4.18024e-05 1.66067e-05" />
<joint name="l_ankle_ie" range="-0.654498 0.305433" actuatorfrcrange="-120 120" armature="0.121874" damping="11" frictionloss="0.89" axis="1 0 0" />
<geom name="l_ankle_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="l_ankle_ie_link" />
<body name="l_foot_link" quat="0.965926 0 0.258819 0">
<inertial pos="0.056607 -0.00200339 -0.0304112" quat="0.432893 0.587516 0.510475 0.454802" mass="1.1808" diaginertia="0.0088235 0.00838261 0.00210633" />
<joint name="l_ankle_pd" range="-1.5708 0.436332" actuatorfrcrange="-150 150" armature="0.205456" damping="21" frictionloss="1.87" axis="0 1 0" />
<geom name="l_foot_link_visual_0" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="l_foot_link" />
<geom name="collision_l_sole" class="collision" size="0.1 0.0425 0.009" pos="0.0646931 -0.00550529 -0.03843" quat="0.987443 -0.0797175 -0.132426 -0.0326442" type="box" contype="2" conaffinity="13" condim="3" priority="1" friction="0.8" margin="0" />
<frame pos="0.0614891 -0.00342931 -0.0265273" quat="0.987443 -0.0797175 -0.132426 -0.0326442">
<site name="l_foot_fr" pos="0.1 0.0425 -0.0215" />
<site name="l_foot_br" pos="-0.1 0.0425 -0.0215" />
<site name="l_foot_fl" pos="0.1 -0.0425 -0.0215" />
<site name="l_foot_bl" pos="-0.1 -0.0425 -0.0215" />
</frame>
<site name="l_foot" size="0.01" pos="0.067 -0.007 -0.047" />
</body>
</body>
</body>
</body>
</body>
</body>
<body name="r_hip_ie_link" pos="-0.02 -0.11 -0.16875" quat="0.957662 -0.126078 -0.256605 -0.0337826">
<inertial pos="-0.0275542 -0.000156081 0.0265869" quat="0.0347714 0.433956 0.0469856 0.899036" mass="1.49972" diaginertia="0.00446281 0.00343307 0.00204473" />
<joint name="r_hip_ie" range="-1.09083 0.567232" actuatorfrcrange="-120 120" armature="0.231424" damping="171" frictionloss="7.95" />
<geom name="r_hip_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_hip_ie_link" />
<body name="r_hip_aa_link">
<inertial pos="0.000193891 -0.000687548 0.00240456" quat="0.469753 0.583843 -0.513458 0.418115" mass="0.429858" diaginertia="0.000369398 0.000323696 0.000129031" />
<joint name="r_hip_aa" range="-0.741765 0.218166" actuatorfrcrange="-494 494" armature="0.399396" damping="153" frictionloss="7" axis="1 0 0" />
<geom name="r_hip_aa_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_hip_aa_link" />
<body name="r_hip_fe_link" quat="0.957662 0.126079 0.256605 0.0337828">
<inertial pos="0.00662296 -0.00380822 -0.207131" quat="0.493002 0.049361 0.00782621 0.868591" mass="10.7924" diaginertia="0.124314 0.120603 0.0499318" />
<joint name="r_hip_fe" range="-1.85005 0.476475" actuatorfrcrange="-342 342" armature="0.187096" damping="92" frictionloss="21.06" axis="0 1 0" />
<geom name="r_hip_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="r_hip_fe_link" />
<geom name="collision_capsule_body_r_thigh" class="collision" size="0.105 0.1" pos="0 -0.005 -0.215" type="capsule" contype="4" conaffinity="11" friction="0.8" margin="0" />
<body name="r_knee_fe_link" pos="-0.05 0 -0.425">
<inertial pos="0.0432854 -0.00516245 -0.152442" quat="0.399848 0.0111994 0.00899692 0.916469" mass="4.57434" diaginertia="0.063915 0.0630953 0.0107961" />
<joint name="r_knee_fe" range="0 2.61799" actuatorfrcrange="-336 336" armature="0.292264" damping="46" frictionloss="7.7" axis="0 1 0" />
<geom name="r_knee_fe_link_visual_0" class="visual_light" pos="0 0 0" quat="1 0 0 0" mesh="r_knee_fe_link" />
<geom name="collision_capsule_body_r_shin" class="collision" size="0.071 0.15" pos="0.0476 0.0061 -0.19" quat="0.998048 0 0.0624593 0" type="capsule" contype="4" conaffinity="11" friction="0.8" margin="0" />
<body name="r_ankle_ie_link" pos="0.05 0 -0.425" quat="0.987672 -0.0864102 -0.130029 -0.0113761">
<inertial pos="0.00995037 -9.921e-05 0.000832071" quat="0.69181 0.692928 0.142207 -0.145006" mass="0.12478" diaginertia="4.80035e-05 4.18021e-05 1.66065e-05" />
<joint name="r_ankle_ie" range="-0.305433 0.654498" actuatorfrcrange="-120 120" armature="0.121874" damping="11" frictionloss="0.89" axis="1 0 0" />
<geom name="r_ankle_ie_link_visual_0" class="visual_dark" quat="1 0 0 0" mesh="r_ankle_ie_link" />
<body name="r_foot_link" quat="0.965926 0 0.258819 0">
<inertial pos="0.056607 0.00200339 -0.0304112" quat="0.414902 0.606299 0.487904 0.471389" mass="1.1808" diaginertia="0.00883289 0.00837251 0.00210704" />
<joint name="r_ankle_pd" range="-1.5708 0.436332" actuatorfrcrange="-150 150" armature="0.205456" damping="21" frictionloss="1.87" axis="0 1 0" />
<geom name="r_foot_link_visual_0" class="visual_dark" pos="0 0 0" quat="1 0 0 0" mesh="r_foot_link" />
<geom name="collision_r_sole" class="collision" size="0.1 0.0425 0.009" pos="0.0646931 0.00550529 -0.03843" quat="0.987443 0.0797175 -0.132426 0.0326442" type="box" contype="4" conaffinity="11" condim="3" priority="1" friction="0.8" margin="0" />
<frame pos="0.0614891 0.00342931 -0.0265273" quat="0.987443 0.0797175 -0.132426 0.0326442">
<site name="r_foot_fr" pos="0.1 0.0425 -0.0215" />
<site name="r_foot_br" pos="-0.1 0.0425 -0.0215" />
<site name="r_foot_fl" pos="0.1 -0.0425 -0.0215" />
<site name="r_foot_bl" pos="-0.1 -0.0425 -0.0215" />
</frame>
<site name="r_foot" size="0.01" pos="0.067 0.007 -0.047" />
</body>
</body>
</body>
</body>
</body>
</body>
</body>
<body name="world_link" />
</worldbody>
<actuator>
<general name="torso_yaw" joint="torso_yaw" ctrlrange="-0.829031 0.829031" forcerange="-120 120" biastype="affine" gainprm="500" biasprm="0 -500" />
<general name="torso_roll" joint="torso_roll" ctrlrange="-0.20944 0.20944" forcerange="-414 414" biastype="affine" gainprm="2052" biasprm="0 -2052" />
<general name="torso_pitch" joint="torso_pitch" ctrlrange="-0.305433 1.35263" forcerange="-315 315" biastype="affine" gainprm="1525" biasprm="0 -1525" />
<general name="neck_yaw" joint="neck_yaw" ctrlrange="-1.65806 1.65806" forcerange="-10.6 10.6" biastype="affine" gainprm="28" biasprm="0 -28" />
<general name="neck_roll" joint="neck_roll" ctrlrange="-0.785398 0.785398" forcerange="-34.2 34.2" biastype="affine" gainprm="9" biasprm="0 -9" />
<general name="neck_pitch" joint="neck_pitch" ctrlrange="-0.261799 0.523599" forcerange="-34.2 34.2" biastype="affine" gainprm="8" biasprm="0 -8" />
<general name="l_shoulder_aa" joint="l_shoulder_aa" ctrlrange="-0.122173 1.6057" forcerange="-78 78" biastype="affine" gainprm="395" biasprm="0 -395" />
<general name="l_shoulder_ie" joint="l_shoulder_ie" ctrlrange="-0.471239 0.471239" forcerange="-67 67" biastype="affine" gainprm="436" biasprm="0 -436" />
<general name="l_shoulder_fe" joint="l_shoulder_fe" ctrlrange="-2.18166 0.610865" forcerange="-114 114" biastype="affine" gainprm="214" biasprm="0 -214" />
<general name="l_elbow_fe" joint="l_elbow_fe" ctrlrange="-2.61799 0.174533" forcerange="-114 114" biastype="affine" gainprm="200" biasprm="0 -200" />
<general name="l_wrist_roll" joint="l_wrist_roll" ctrlrange="-1.65806 1.65806" forcerange="-10.6 10.6" biastype="affine" gainprm="47" biasprm="0 -47" />
<general name="l_wrist_yaw" joint="l_wrist_yaw" ctrlrange="-0.785398 0.785398" forcerange="-34.2 34.2" biastype="affine" gainprm="20" biasprm="0 -20" />
<general name="l_wrist_pitch" joint="l_wrist_pitch" ctrlrange="-0.837758 1.67552" forcerange="-34.2 34.2" biastype="affine" gainprm="18" biasprm="0 -18" />
<general name="r_shoulder_aa" joint="r_shoulder_aa" ctrlrange="-1.6057 0.122173" forcerange="-78 78" biastype="affine" gainprm="395" biasprm="0 -395" />
<general name="r_shoulder_ie" joint="r_shoulder_ie" ctrlrange="-0.471239 0.471239" forcerange="-67 67" biastype="affine" gainprm="436" biasprm="0 -436" />
<general name="r_shoulder_fe" joint="r_shoulder_fe" ctrlrange="-2.18166 0.610865" forcerange="-114 114" biastype="affine" gainprm="214" biasprm="0 -214" />
<general name="r_elbow_fe" joint="r_elbow_fe" ctrlrange="-2.61799 0.174533" forcerange="-114 114" biastype="affine" gainprm="200" biasprm="0 -200" />
<general name="r_wrist_roll" joint="r_wrist_roll" ctrlrange="-1.65806 1.65806" forcerange="-10.6 10.6" biastype="affine" gainprm="47" biasprm="0 -47" />
<general name="r_wrist_yaw" joint="r_wrist_yaw" ctrlrange="-0.785398 0.785398" forcerange="-34.2 34.2" biastype="affine" gainprm="20" biasprm="0 -20" />
<general name="r_wrist_pitch" joint="r_wrist_pitch" ctrlrange="-1.67552 0.837758" forcerange="-34.2 34.2" biastype="affine" gainprm="18" biasprm="0 -18" />
<general name="l_hip_ie" joint="l_hip_ie" ctrlrange="-0.567232 1.09083" forcerange="-120 120" biastype="affine" gainprm="595" biasprm="0 -595" />
<general name="l_hip_aa" joint="l_hip_aa" ctrlrange="-0.218166 0.741765" forcerange="-494 494" biastype="affine" gainprm="1880" biasprm="0 -1880" />
<general name="l_hip_fe" joint="l_hip_fe" ctrlrange="-1.85005 0.476475" forcerange="-342 342" biastype="affine" gainprm="1047" biasprm="0 -1047" />
<general name="l_knee_fe" joint="l_knee_fe" ctrlrange="0 2.61799" forcerange="-336 336" biastype="affine" gainprm="606" biasprm="0 -606" />
<general name="l_ankle_ie" joint="l_ankle_ie" ctrlrange="-0.654498 0.305433" forcerange="-120 120" biastype="affine" gainprm="420" biasprm="0 -420" />
<general name="l_ankle_pd" joint="l_ankle_pd" ctrlrange="-1.5708 0.436332" forcerange="-150 150" biastype="affine" gainprm="882" biasprm="0 -882" />
<general name="r_hip_ie" joint="r_hip_ie" ctrlrange="-1.09083 0.567232" forcerange="-120 120" biastype="affine" gainprm="595" biasprm="0 -595" />
<general name="r_hip_aa" joint="r_hip_aa" ctrlrange="-0.741765 0.218166" forcerange="-494 494" biastype="affine" gainprm="1880" biasprm="0 -1880" />
<general name="r_hip_fe" joint="r_hip_fe" ctrlrange="-1.85005 0.476475" forcerange="-342 342" biastype="affine" gainprm="1047" biasprm="0 -1047" />
<general name="r_knee_fe" joint="r_knee_fe" ctrlrange="0 2.61799" forcerange="-336 336" biastype="affine" gainprm="606" biasprm="0 -606" />
<general name="r_ankle_ie" joint="r_ankle_ie" ctrlrange="-0.305433 0.654498" forcerange="-120 120" biastype="affine" gainprm="420" biasprm="0 -420" />
<general name="r_ankle_pd" joint="r_ankle_pd" ctrlrange="-1.5708 0.436332" forcerange="-150 150" biastype="affine" gainprm="882" biasprm="0 -882" />
</actuator>
<sensor>
<velocimeter site="base_imu" name="imu_lin_vel" />
<gyro site="base_imu" name="imu_ang_vel" />
<subtreeangmom body="base_link" name="root_angmom" />
</sensor>
<option timestep="0.005" integrator="implicitfast" solver="Newton" cone="pyramidal" iterations="20" ls_iterations="20" ccd_iterations="50" />
</mujoco>
Binary file not shown.
+699
View File
@@ -0,0 +1,699 @@
{
"schema": 1,
"id": "apollo",
"name": "Apptronik Apollo",
"family": "apollo",
"adapter": "generic",
"dimensions": {
"height": 1.73
},
"model": "model.xml",
"assets": [
{
"path": "assets/neck_mount_fix_link.stl",
"vfs": "assets/neck_mount_fix_link.stl"
},
{
"path": "assets/neck_yaw_link.stl",
"vfs": "assets/neck_yaw_link.stl"
},
{
"path": "assets/afh_2_1_link.stl",
"vfs": "assets/afh_2_1_link.stl"
},
{
"path": "assets/torso_link.stl",
"vfs": "assets/torso_link.stl"
},
{
"path": "assets/battery_mount_fix.stl",
"vfs": "assets/battery_mount_fix.stl"
},
{
"path": "assets/torso_pitch_link.stl",
"vfs": "assets/torso_pitch_link.stl"
},
{
"path": "assets/torso_roll_link.stl",
"vfs": "assets/torso_roll_link.stl"
},
{
"path": "assets/pelvis_link.stl",
"vfs": "assets/pelvis_link.stl"
},
{
"path": "assets/l_shoulder_aa_link.stl",
"vfs": "assets/l_shoulder_aa_link.stl"
},
{
"path": "assets/l_shoulder_ie_link.stl",
"vfs": "assets/l_shoulder_ie_link.stl"
},
{
"path": "assets/l_shoulder_fe_link.stl",
"vfs": "assets/l_shoulder_fe_link.stl"
},
{
"path": "assets/l_elbow_fe_link.stl",
"vfs": "assets/l_elbow_fe_link.stl"
},
{
"path": "assets/l_wrist_roll_link.stl",
"vfs": "assets/l_wrist_roll_link.stl"
},
{
"path": "assets/l_wrist_yaw_link.stl",
"vfs": "assets/l_wrist_yaw_link.stl"
},
{
"path": "assets/l_wrist_pitch_link.stl",
"vfs": "assets/l_wrist_pitch_link.stl"
},
{
"path": "assets/ability_hand/wrist_adapter.STL",
"vfs": "assets/ability_hand/wrist_adapter.STL"
},
{
"path": "assets/ability_hand/wristmesh.STL",
"vfs": "assets/ability_hand/wristmesh.STL"
},
{
"path": "assets/ability_hand/FB_palm_ref.STL",
"vfs": "assets/ability_hand/FB_palm_ref.STL"
},
{
"path": "assets/ability_hand/idx-F1.STL",
"vfs": "assets/ability_hand/idx-F1.STL"
},
{
"path": "assets/ability_hand/idx-F2.STL",
"vfs": "assets/ability_hand/idx-F2.STL"
},
{
"path": "assets/ability_hand/thumb-F1.STL",
"vfs": "assets/ability_hand/thumb-F1.STL"
},
{
"path": "assets/ability_hand/thumb-F2-left.STL",
"vfs": "assets/ability_hand/thumb-F2-left.STL"
},
{
"path": "assets/r_shoulder_aa_link.stl",
"vfs": "assets/r_shoulder_aa_link.stl"
},
{
"path": "assets/r_shoulder_ie_link.stl",
"vfs": "assets/r_shoulder_ie_link.stl"
},
{
"path": "assets/r_shoulder_fe_link.stl",
"vfs": "assets/r_shoulder_fe_link.stl"
},
{
"path": "assets/r_elbow_fe_link.stl",
"vfs": "assets/r_elbow_fe_link.stl"
},
{
"path": "assets/r_wrist_roll_link.stl",
"vfs": "assets/r_wrist_roll_link.stl"
},
{
"path": "assets/r_wrist_yaw_link.stl",
"vfs": "assets/r_wrist_yaw_link.stl"
},
{
"path": "assets/r_wrist_pitch_link.stl",
"vfs": "assets/r_wrist_pitch_link.stl"
},
{
"path": "assets/ability_hand/FB_palm_ref_MIR.STL",
"vfs": "assets/ability_hand/FB_palm_ref_MIR.STL"
},
{
"path": "assets/ability_hand/thumb-F1-MIR.STL",
"vfs": "assets/ability_hand/thumb-F1-MIR.STL"
},
{
"path": "assets/ability_hand/thumb-F2-right.STL",
"vfs": "assets/ability_hand/thumb-F2-right.STL"
},
{
"path": "assets/l_hip_ie_link.stl",
"vfs": "assets/l_hip_ie_link.stl"
},
{
"path": "assets/l_hip_aa_link.stl",
"vfs": "assets/l_hip_aa_link.stl"
},
{
"path": "assets/l_hip_fe_link.stl",
"vfs": "assets/l_hip_fe_link.stl"
},
{
"path": "assets/l_knee_fe_link.stl",
"vfs": "assets/l_knee_fe_link.stl"
},
{
"path": "assets/l_ankle_ie_link.stl",
"vfs": "assets/l_ankle_ie_link.stl"
},
{
"path": "assets/l_foot_link.stl",
"vfs": "assets/l_foot_link.stl"
},
{
"path": "assets/r_hip_ie_link.stl",
"vfs": "assets/r_hip_ie_link.stl"
},
{
"path": "assets/r_hip_aa_link.stl",
"vfs": "assets/r_hip_aa_link.stl"
},
{
"path": "assets/r_hip_fe_link.stl",
"vfs": "assets/r_hip_fe_link.stl"
},
{
"path": "assets/r_knee_fe_link.stl",
"vfs": "assets/r_knee_fe_link.stl"
},
{
"path": "assets/r_ankle_ie_link.stl",
"vfs": "assets/r_ankle_ie_link.stl"
},
{
"path": "assets/r_foot_link.stl",
"vfs": "assets/r_foot_link.stl"
}
],
"base": {
"type": "floating",
"root_body": "base_link",
"freejoint": "floating_base",
"spawn": {
"pos": [
0,
0,
1.1008384999999998
],
"yaw": 0
}
},
"sim": {
"timestep": 0.005,
"decimation": 4
},
"joints": {
"groups": {
"policy": [
"torso_yaw",
"torso_roll",
"torso_pitch",
"neck_yaw",
"neck_roll",
"neck_pitch",
"l_shoulder_aa",
"l_shoulder_ie",
"l_shoulder_fe",
"l_elbow_fe",
"l_wrist_roll",
"l_wrist_yaw",
"l_wrist_pitch",
"r_shoulder_aa",
"r_shoulder_ie",
"r_shoulder_fe",
"r_elbow_fe",
"r_wrist_roll",
"r_wrist_yaw",
"r_wrist_pitch",
"l_hip_ie",
"l_hip_aa",
"l_hip_fe",
"l_knee_fe",
"l_ankle_ie",
"l_ankle_pd",
"r_hip_ie",
"r_hip_aa",
"r_hip_fe",
"r_knee_fe",
"r_ankle_ie",
"r_ankle_pd"
],
"torso_yaw": [
"torso_yaw"
],
"torso_roll": [
"torso_roll"
],
"torso_pitch": [
"torso_pitch"
],
"neck_yaw": [
"neck_yaw"
],
"neck_roll": [
"neck_roll"
],
"neck_pitch": [
"neck_pitch"
],
"l_shoulder_aa": [
"l_shoulder_aa"
],
"l_shoulder_ie": [
"l_shoulder_ie"
],
"l_shoulder_fe": [
"l_shoulder_fe"
],
"l_elbow_fe": [
"l_elbow_fe"
],
"l_wrist_roll": [
"l_wrist_roll"
],
"l_wrist_yaw": [
"l_wrist_yaw"
],
"l_wrist_pitch": [
"l_wrist_pitch"
],
"r_shoulder_aa": [
"r_shoulder_aa"
],
"r_shoulder_ie": [
"r_shoulder_ie"
],
"r_shoulder_fe": [
"r_shoulder_fe"
],
"r_elbow_fe": [
"r_elbow_fe"
],
"r_wrist_roll": [
"r_wrist_roll"
],
"r_wrist_yaw": [
"r_wrist_yaw"
],
"r_wrist_pitch": [
"r_wrist_pitch"
],
"l_hip_ie": [
"l_hip_ie"
],
"l_hip_aa": [
"l_hip_aa"
],
"l_hip_fe": [
"l_hip_fe"
],
"l_knee_fe": [
"l_knee_fe"
],
"l_ankle_ie": [
"l_ankle_ie"
],
"l_ankle_pd": [
"l_ankle_pd"
],
"r_hip_ie": [
"r_hip_ie"
],
"r_hip_aa": [
"r_hip_aa"
],
"r_hip_fe": [
"r_hip_fe"
],
"r_knee_fe": [
"r_knee_fe"
],
"r_ankle_ie": [
"r_ankle_ie"
],
"r_ankle_pd": [
"r_ankle_pd"
]
},
"defaults": {
"torso_yaw": 0.0,
"torso_roll": 0.0,
"torso_pitch": 0.0,
"neck_yaw": 0.0,
"neck_roll": 0.0,
"neck_pitch": 0.0,
"l_shoulder_aa": 0.15,
"l_shoulder_ie": 0.0,
"l_shoulder_fe": 0.05,
"l_elbow_fe": -0.25,
"l_wrist_roll": 0.0,
"l_wrist_yaw": 0.0,
"l_wrist_pitch": 0.0,
"r_shoulder_aa": -0.15,
"r_shoulder_ie": 0.0,
"r_shoulder_fe": 0.05,
"r_elbow_fe": -0.25,
"r_wrist_roll": 0.0,
"r_wrist_yaw": 0.0,
"r_wrist_pitch": 0.0,
"l_hip_ie": 0.01516856,
"l_hip_aa": 0.04179601,
"l_hip_fe": -0.15749093,
"l_knee_fe": 0.35,
"l_ankle_ie": -0.03606629,
"l_ankle_pd": -0.18624892,
"r_hip_ie": -0.01516856,
"r_hip_aa": -0.04179601,
"r_hip_fe": -0.15749093,
"r_knee_fe": 0.35,
"r_ankle_ie": 0.03606629,
"r_ankle_pd": -0.18624892
}
},
"observations": {
"obs": {
"terms": [
{
"type": "linear_velocity",
"sensor": "imu_lin_vel"
},
{
"type": "gyro",
"sensor": "imu_ang_vel"
},
{
"type": "projected_gravity",
"body": "base_link"
},
{
"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": "torso_yaw",
"scale": 0.08,
"offset": "default"
},
{
"type": "joint_position",
"group": "torso_roll",
"scale": 0.08,
"offset": "default"
},
{
"type": "joint_position",
"group": "torso_pitch",
"scale": 0.08,
"offset": "default"
},
{
"type": "joint_position",
"group": "neck_yaw",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "neck_roll",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "neck_pitch",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_shoulder_aa",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_shoulder_ie",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_shoulder_fe",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_elbow_fe",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_wrist_roll",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_wrist_yaw",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_wrist_pitch",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_shoulder_aa",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_shoulder_ie",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_shoulder_fe",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_elbow_fe",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_wrist_roll",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_wrist_yaw",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_wrist_pitch",
"scale": 0.0,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_hip_ie",
"scale": 0.2,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_hip_aa",
"scale": 0.2,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_hip_fe",
"scale": 0.3,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_knee_fe",
"scale": 0.4,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_ankle_ie",
"scale": 0.15,
"offset": "default"
},
{
"type": "joint_position",
"group": "l_ankle_pd",
"scale": 0.2,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_hip_ie",
"scale": 0.2,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_hip_aa",
"scale": 0.2,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_hip_fe",
"scale": 0.3,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_knee_fe",
"scale": 0.4,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_ankle_ie",
"scale": 0.15,
"offset": "default"
},
{
"type": "joint_position",
"group": "r_ankle_pd",
"scale": 0.2,
"offset": "default"
}
],
"actuation": {
"type": "native_position"
},
"commands": {
"size": 3,
"limits": [
0.5,
-0.3,
0.4
]
},
"skills": [
{
"id": "walk",
"kind": "primary",
"owns": "policy",
"controller": {
"type": "onnx",
"policy": "policies/walk.onnx"
}
}
],
"input": {
"bindings": [
{
"action": "move_forward",
"codes": [
"KeyW",
"ArrowUp"
],
"label": "Forward"
},
{
"action": "move_backward",
"codes": [
"KeyS",
"ArrowDown"
],
"label": "Backward"
},
{
"action": "turn_left",
"codes": [
"KeyA",
"ArrowLeft"
],
"label": "Turn left"
},
{
"action": "turn_right",
"codes": [
"KeyD",
"ArrowRight"
],
"label": "Turn right"
},
{
"action": "reset",
"codes": [
"Space"
],
"label": "Reset"
},
{
"action": "pause",
"codes": [
"Escape"
],
"label": "Pause / continue"
},
{
"action": "chaseToggle",
"codes": [
"KeyC"
],
"label": "Restore chase camera"
}
]
},
"render": {
"source": "mjcf_visual",
"groups": [
1
],
"camera": {
"distance": 3.5
}
},
"presentation": {
"theme": "comic"
},
"termination": {
"tilt_z": -0.5,
"min_height": 0.98,
"on_fall": "hold"
},
"license": "See LICENSES/apollo.txt and LICENSES/mjlab.txt; policy is locally trained."
}
@@ -0,0 +1,303 @@
{
"checkpoint": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/logs/rsl_rl/apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/model_9999.pt",
"checkpoint_sha256": "608895433d8ff3edfcd06d1ff583d7de1346415897182ec673a32af8af38dcba",
"model_source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/apptronik_apollo.xml",
"files": [
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/neck_mount_fix_link.stl",
"file": "assets/neck_mount_fix_link.stl",
"bytes": 2267984,
"sha256": "d6f64c42a5bfed7abb0dc48414e58164ad0042a71f5f5fe27382049e48608d7a"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/neck_yaw_link.stl",
"file": "assets/neck_yaw_link.stl",
"bytes": 3512084,
"sha256": "86160c43db315955e9e24c323602a74bad026bdd83df55fecb3413c333b2e453"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/afh_2_1_link.stl",
"file": "assets/afh_2_1_link.stl",
"bytes": 2711384,
"sha256": "76604d5c5db8472bf24322c33fe03b32c0f2dff45985edefb96c11e1c9b0e801"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/torso_link.stl",
"file": "assets/torso_link.stl",
"bytes": 7500084,
"sha256": "0301f1d9c925df169ba12a79cb2dab532156aae3821750cb5820349ac60a92f6"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/battery_mount_fix.stl",
"file": "assets/battery_mount_fix.stl",
"bytes": 300084,
"sha256": "9785105c0b606b5f229b70ba95bd64b239ddb90578f1dc9ccd439f4c182b5c33"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/torso_pitch_link.stl",
"file": "assets/torso_pitch_link.stl",
"bytes": 705334,
"sha256": "dc5174d8a748a0c372641dca94172646693edd1d6ead8fb1259a26cf53a08f93"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/torso_roll_link.stl",
"file": "assets/torso_roll_link.stl",
"bytes": 1819384,
"sha256": "db0bfaecf809e3f877cbdfadcf7e3ec162b4f5f362f61d3ea62d26ab3e1983a6"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/pelvis_link.stl",
"file": "assets/pelvis_link.stl",
"bytes": 3500084,
"sha256": "f344c0928d39626394edff076e9eca00274cbf69830f6ff1b3ff6d019baa1a65"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_shoulder_aa_link.stl",
"file": "assets/l_shoulder_aa_link.stl",
"bytes": 276084,
"sha256": "96dea690d6288d5e81b651d4da7214ccf860aed74329d261aaef760533c12742"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_shoulder_ie_link.stl",
"file": "assets/l_shoulder_ie_link.stl",
"bytes": 3142984,
"sha256": "1932049068158367e09a6ee70a0a6d908c6e2adc6dcf471cb451205c320c4a2d"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_shoulder_fe_link.stl",
"file": "assets/l_shoulder_fe_link.stl",
"bytes": 2053634,
"sha256": "cd6b89ece6320388b792e910ddac222d6e4244d310efe4aa642788dc00232fb4"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_elbow_fe_link.stl",
"file": "assets/l_elbow_fe_link.stl",
"bytes": 1290984,
"sha256": "ac17ac98b6564a75886311fe88482b9cdbcb632556c80bdc3fd338dca26d43dd"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_wrist_roll_link.stl",
"file": "assets/l_wrist_roll_link.stl",
"bytes": 2500084,
"sha256": "e752b5aca75ebd5430e45ee37c9eb57f4cf9d6def6370c29234c811d40a028c0"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_wrist_yaw_link.stl",
"file": "assets/l_wrist_yaw_link.stl",
"bytes": 370384,
"sha256": "06b118e59ec0e6308a842f7fd3c572ed657c7d3cb93b17fb1de72ea56b3f27eb"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_wrist_pitch_link.stl",
"file": "assets/l_wrist_pitch_link.stl",
"bytes": 1587934,
"sha256": "6ae61d22369ae6ed0f7122df902c9ebabc482891739460cbb953317de24b90ab"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/wrist_adapter.STL",
"file": "assets/ability_hand/wrist_adapter.STL",
"bytes": 3853984,
"sha256": "b1d1c627d239acf058bb5df4b270e8f6ab7728c5b01f5fb7f0d269994f55b1a8"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/wristmesh.STL",
"file": "assets/ability_hand/wristmesh.STL",
"bytes": 2143184,
"sha256": "4d67306f775a5da7d6e8c9c2faddb12f1497ea289a6c7dc1584c213b42da43ee"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/FB_palm_ref.STL",
"file": "assets/ability_hand/FB_palm_ref.STL",
"bytes": 581984,
"sha256": "d9917a43ca1ce6fb2cbf7b651e0ed6b0c322acf75b8485806cc5d5a365b06db0"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/idx-F1.STL",
"file": "assets/ability_hand/idx-F1.STL",
"bytes": 44284,
"sha256": "f983d18177fecfdcf0141bd8e94e351fad67f62a74fb70819cdc017ae5af6d0e"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/idx-F2.STL",
"file": "assets/ability_hand/idx-F2.STL",
"bytes": 24384,
"sha256": "37d5e938e9e924fbf0262bd044ee04eec28c73cd73ea91ad97b37bf037c12198"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/thumb-F1.STL",
"file": "assets/ability_hand/thumb-F1.STL",
"bytes": 6084,
"sha256": "b20ec97a4682e85abe977fbe0d0108362719573830556f3b75350fe8a084af21"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/thumb-F2-left.STL",
"file": "assets/ability_hand/thumb-F2-left.STL",
"bytes": 13484,
"sha256": "9dcd48a151fe1de3f3eee0615ac679f0eb4182ae0ebee398d372ea102e718c89"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_shoulder_aa_link.stl",
"file": "assets/r_shoulder_aa_link.stl",
"bytes": 290084,
"sha256": "d41fd7d6d599cb28cdd8fb135bc1f905f89acf0f768d771d1c0d24fa54921247"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_shoulder_ie_link.stl",
"file": "assets/r_shoulder_ie_link.stl",
"bytes": 2896884,
"sha256": "0ccc0413f98ed9a9549a6a6cbc0395c69fa4516381956d37b7717c0cb8e89dbd"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_shoulder_fe_link.stl",
"file": "assets/r_shoulder_fe_link.stl",
"bytes": 2053084,
"sha256": "9d702645d36fc09958b9c61cb92cab48c4902b2049f0d7839cea61761c521fd0"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_elbow_fe_link.stl",
"file": "assets/r_elbow_fe_link.stl",
"bytes": 1290684,
"sha256": "9564899c9031c4d68942c5d6e065d3e8b39634bcaaf0a23b91f0241420d8530f"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_wrist_roll_link.stl",
"file": "assets/r_wrist_roll_link.stl",
"bytes": 2500084,
"sha256": "97a2459f5cba8c03a59c9f8a7e9795a91c1b46a5d81d054bbb6cbb629e8cdafd"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_wrist_yaw_link.stl",
"file": "assets/r_wrist_yaw_link.stl",
"bytes": 369534,
"sha256": "84ac6e91f41cd993ceba238969e7b09facc1733df603ac7dc439dfb327c60c12"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_wrist_pitch_link.stl",
"file": "assets/r_wrist_pitch_link.stl",
"bytes": 1589534,
"sha256": "61a85a23dc80ebbe954fcc669655d36159d4a7cb91a7a815f244f5ff94455f30"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/FB_palm_ref_MIR.STL",
"file": "assets/ability_hand/FB_palm_ref_MIR.STL",
"bytes": 581984,
"sha256": "3d0e9d29efbd8deb94bfab1c84464a2c46a33e839cb5f553115b27d2610193c2"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/thumb-F1-MIR.STL",
"file": "assets/ability_hand/thumb-F1-MIR.STL",
"bytes": 6084,
"sha256": "0ff962d2c6f8b0af39607439f4d48a247e4eb925f7a0c20ca00b0d27d8e7c2e0"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/ability_hand/thumb-F2-right.STL",
"file": "assets/ability_hand/thumb-F2-right.STL",
"bytes": 13484,
"sha256": "09623bce14d85db7b035ab4333f702505fa13f834845adda1179544d3c456a77"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_hip_ie_link.stl",
"file": "assets/l_hip_ie_link.stl",
"bytes": 2961884,
"sha256": "db5e43d77b0308b0aaed54b54f022c90d8d8efc9f809de14d8eee8ddda2d7430"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_hip_aa_link.stl",
"file": "assets/l_hip_aa_link.stl",
"bytes": 538784,
"sha256": "9192292ec7093bde26d5ead25685d69e1a75d079f5cd800ae1817e789977c515"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_hip_fe_link.stl",
"file": "assets/l_hip_fe_link.stl",
"bytes": 2499784,
"sha256": "3c0729f7988d19a99caecda8afedd690dfc939cf2017680b15af7906186aecf2"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_knee_fe_link.stl",
"file": "assets/l_knee_fe_link.stl",
"bytes": 1403484,
"sha256": "818d5660fb778eae7d28c05be806f76cbc298bd4fe8a8db7417a93b8ee9b48ed"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_ankle_ie_link.stl",
"file": "assets/l_ankle_ie_link.stl",
"bytes": 679134,
"sha256": "1e5526d09d5f418c4c428e5e58497c2807df06742e0e24874ccbcadd11e9bea1"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/l_foot_link.stl",
"file": "assets/l_foot_link.stl",
"bytes": 1841984,
"sha256": "6506c651d16a4fcf6f8ce37a056b349bd1abea1c4526866383249addd3609659"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_hip_ie_link.stl",
"file": "assets/r_hip_ie_link.stl",
"bytes": 2961634,
"sha256": "3b9cee0dab3e564b12fd6293fe21da1724261dd7347e184d84239d60cfe6551c"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_hip_aa_link.stl",
"file": "assets/r_hip_aa_link.stl",
"bytes": 539884,
"sha256": "5cca53bcd1cedff71106dd0d276d6767e1bd7a7ceb6a6a0601b28c7d4361f79c"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_hip_fe_link.stl",
"file": "assets/r_hip_fe_link.stl",
"bytes": 2103184,
"sha256": "53bbb28f4688e4a9562d6d54a51c1d7784774117ecb2034f10f6f9ee470e0fa7"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_knee_fe_link.stl",
"file": "assets/r_knee_fe_link.stl",
"bytes": 1386984,
"sha256": "19a73643d4dd8ff90894b0a712cf828c7f79a8091218ad2dee8fec419f5f0666"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_ankle_ie_link.stl",
"file": "assets/r_ankle_ie_link.stl",
"bytes": 652134,
"sha256": "cb33be19fe5202b6ed638c1816e3ba8e14d8407be9e0045c6e644f1fd54a5056"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/assets/r_foot_link.stl",
"file": "assets/r_foot_link.stl",
"bytes": 1845934,
"sha256": "0ea4a2c27a89f944cd838c6c6c471c1b3a859bc4174c86c41773e6a20079b903"
},
{
"source": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/logs/rsl_rl/apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/2026-11-02_17-39-21_apollo_upright_v3.onnx",
"file": "policies/walk.onnx",
"bytes": 900731,
"sha256": "0dc72b1965b9a37d43c4224dc5dd81d8df8520b40ed02d6ef7ff44e0e90987b5"
},
{
"source": "/home/cen/Embodied_Workspace/PlatformProject/apptronik_apollo/LICENSE",
"file": "LICENSES/apollo.txt",
"bytes": 11344,
"sha256": "10b53325854d8aa8172b846f96eb47d5fbba6366161c480292cf4627606ef430"
},
{
"source": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/LICENSE",
"file": "LICENSES/mjlab.txt",
"bytes": 11352,
"sha256": "8ca04d9dbbccd20f0f1842fb33e13949f9e57064b150dad36af8e7a751ca3321"
}
],
"behaviorReferences": [
{
"file": "src/mjlab/asset_zoo/robots/apptronik_apollo/apollo_constants.py",
"sha256": "29b341ce6603f77d15a608b9b2a4a3005c0db5b569006a154f894e8b18b1d8b1"
},
{
"file": "src/mjlab/tasks/velocity/config/apptronik_apollo/env_cfgs.py",
"sha256": "5170f829d2753eed8859e7a6c29b615c30da27a33d3c428a9836518b6f1a87a8"
},
{
"file": "src/mjlab/tasks/velocity/velocity_env_cfg.py",
"sha256": "8a272a8b3c81c4a0321027e404645c99a4143076522ed3521636bf293dd3137b"
}
]
}
+18
View File
@@ -16,5 +16,23 @@
"family": "microban",
"name": "Microban",
"manifest": "microban/robot.json"
},
{
"id": "rp1",
"family": "rp1",
"name": "RP1",
"manifest": "rp1/robot.json"
},
{
"id": "t1",
"family": "t1",
"name": "Booster T1",
"manifest": "t1/robot.json"
},
{
"id": "apollo",
"family": "apollo",
"name": "Apptronik Apollo",
"manifest": "apollo/robot.json"
}
]
+8
View File
@@ -11,4 +11,12 @@ The precise origin remote, HEAD, dirty-worktree flag, per-file SHA-256 and behav
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.
+114
View File
@@ -4,6 +4,7 @@
"name": "Microban",
"family": "microban",
"adapter": "generic",
"dimensions": { "height": 0.33 },
"model": "model.xml",
"assets": [
{
@@ -314,6 +315,119 @@
},
"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
],
@@ -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"
}
]
}
@@ -4,6 +4,7 @@
"name": "Microduck",
"family": "microduck",
"adapter": "microduck",
"dimensions": { "height": 0.27 },
"model": "../../robot/mjlab/robot_allcollisions.xml",
"assets": [],
"base": {
@@ -4,6 +4,7 @@
"name": "Microduck",
"family": "microduck",
"adapter": "microduck",
"dimensions": { "height": 0.27 },
"model": "../../robot/mjlab/robot_allcollisions_rollers.xml",
"assets": [],
"base": {
@@ -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.
+49
View File
@@ -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.

Some files were not shown because too many files have changed in this diff Show More