From 5ae85ff62a9321905735aa2e299234f051ab7b50 Mon Sep 17 00:00:00 2001 From: cen617-code <1057290604@qq.com> Date: Tue, 3 Nov 2026 10:05:53 +0800 Subject: [PATCH] feat: release v0.6 with T1 and Apollo upright-v3 locomotion --- README.md | 18 +- app/e2e/apollo.spec.js | 117 +++ app/e2e/rp1.spec.js | 2 +- app/e2e/t1.spec.js | 101 +++ app/package-lock.json | 4 +- app/package.json | 2 +- app/public/robots/apollo/LICENSES/apollo.txt | 202 +++++ app/public/robots/apollo/LICENSES/mjlab.txt | 202 +++++ app/public/robots/apollo/SOURCE.md | 40 + .../assets/ability_hand/FB_palm_ref.STL | 3 + .../assets/ability_hand/FB_palm_ref_MIR.STL | 3 + .../apollo/assets/ability_hand/idx-F1.STL | 3 + .../apollo/assets/ability_hand/idx-F2.STL | 3 + .../assets/ability_hand/thumb-F1-MIR.STL | 3 + .../apollo/assets/ability_hand/thumb-F1.STL | 3 + .../assets/ability_hand/thumb-F2-left.STL | 3 + .../assets/ability_hand/thumb-F2-right.STL | 3 + .../assets/ability_hand/wrist_adapter.STL | 3 + .../apollo/assets/ability_hand/wristmesh.STL | 3 + .../robots/apollo/assets/afh_2_1_link.stl | 3 + .../apollo/assets/battery_mount_fix.stl | 3 + .../robots/apollo/assets/l_ankle_ie_link.stl | 3 + .../robots/apollo/assets/l_elbow_fe_link.stl | 3 + .../robots/apollo/assets/l_foot_link.stl | 3 + .../robots/apollo/assets/l_hip_aa_link.stl | 3 + .../robots/apollo/assets/l_hip_fe_link.stl | 3 + .../robots/apollo/assets/l_hip_ie_link.stl | 3 + .../robots/apollo/assets/l_knee_fe_link.stl | 3 + .../apollo/assets/l_shoulder_aa_link.stl | 3 + .../apollo/assets/l_shoulder_fe_link.stl | 3 + .../apollo/assets/l_shoulder_ie_link.stl | 3 + .../apollo/assets/l_wrist_pitch_link.stl | 3 + .../apollo/assets/l_wrist_roll_link.stl | 3 + .../robots/apollo/assets/l_wrist_yaw_link.stl | 3 + .../apollo/assets/neck_mount_fix_link.stl | 3 + .../robots/apollo/assets/neck_yaw_link.stl | 3 + .../robots/apollo/assets/pelvis_link.stl | 3 + .../robots/apollo/assets/r_ankle_ie_link.stl | 3 + .../robots/apollo/assets/r_elbow_fe_link.stl | 3 + .../robots/apollo/assets/r_foot_link.stl | 3 + .../robots/apollo/assets/r_hip_aa_link.stl | 3 + .../robots/apollo/assets/r_hip_fe_link.stl | 3 + .../robots/apollo/assets/r_hip_ie_link.stl | 3 + .../robots/apollo/assets/r_knee_fe_link.stl | 3 + .../apollo/assets/r_shoulder_aa_link.stl | 3 + .../apollo/assets/r_shoulder_fe_link.stl | 3 + .../apollo/assets/r_shoulder_ie_link.stl | 3 + .../apollo/assets/r_wrist_pitch_link.stl | 3 + .../apollo/assets/r_wrist_roll_link.stl | 3 + .../robots/apollo/assets/r_wrist_yaw_link.stl | 3 + .../robots/apollo/assets/torso_link.stl | 3 + .../robots/apollo/assets/torso_pitch_link.stl | 3 + .../robots/apollo/assets/torso_roll_link.stl | 3 + app/public/robots/apollo/model.xml | 365 +++++++++ app/public/robots/apollo/policies/walk.onnx | 3 + app/public/robots/apollo/robot.json | 699 ++++++++++++++++++ app/public/robots/apollo/source-manifest.json | 303 ++++++++ app/public/robots/index.json | 12 + .../robots/t1/LICENSES/booster-assets.txt | 28 + app/public/robots/t1/LICENSES/mjlab.txt | 202 +++++ app/public/robots/t1/SOURCE.md | 35 + app/public/robots/t1/meshes/AL1.STL | 3 + app/public/robots/t1/meshes/AL2.STL | 3 + app/public/robots/t1/meshes/AL3.STL | 3 + app/public/robots/t1/meshes/AR1.STL | 3 + app/public/robots/t1/meshes/AR2.STL | 3 + app/public/robots/t1/meshes/AR3.STL | 3 + .../robots/t1/meshes/Ankle_Cross_Left.STL | 3 + .../robots/t1/meshes/Ankle_Cross_Right.STL | 3 + app/public/robots/t1/meshes/H1.STL | 3 + app/public/robots/t1/meshes/H2.STL | 3 + .../robots/t1/meshes/Hip_Pitch_Left.STL | 3 + .../robots/t1/meshes/Hip_Pitch_Right.STL | 3 + app/public/robots/t1/meshes/Hip_Roll_Left.STL | 3 + .../robots/t1/meshes/Hip_Roll_Right.STL | 3 + app/public/robots/t1/meshes/Hip_Yaw_Left.STL | 3 + app/public/robots/t1/meshes/Hip_Yaw_Right.STL | 3 + app/public/robots/t1/meshes/Logo.STL | 3 + app/public/robots/t1/meshes/Shank_Left.STL | 3 + app/public/robots/t1/meshes/Shank_Right.STL | 3 + app/public/robots/t1/meshes/Trunk.STL | 3 + app/public/robots/t1/meshes/Waist.STL | 3 + .../robots/t1/meshes/left_foot_link.STL | 3 + .../robots/t1/meshes/left_hand_link.STL | 3 + .../robots/t1/meshes/right_foot_link.STL | 3 + .../robots/t1/meshes/right_hand_link.STL | 3 + app/public/robots/t1/model.xml | 213 ++++++ app/public/robots/t1/policies/walk.onnx | 3 + app/public/robots/t1/robot.json | 524 +++++++++++++ app/public/robots/t1/source-manifest.json | 189 +++++ app/scripts/import-apollo.py | 168 +++++ app/scripts/import-t1.py | 124 ++++ app/src/platform/loader/SchemaValidator.js | 4 +- app/src/platform/loader/robot.schema.json | 1 + .../platform/policy/ObservationPipeline.js | 4 +- app/src/platform/policy/TermRegistry.js | 2 + app/src/platform/sim/SceneComposer.js | 4 + app/test/apollo-contract.test.js | 46 ++ app/test/policy-pipelines.test.js | 22 + docs/robots/v0.6-verification.md | 41 + 100 files changed, 3877 insertions(+), 10 deletions(-) create mode 100644 app/e2e/apollo.spec.js create mode 100644 app/e2e/t1.spec.js create mode 100644 app/public/robots/apollo/LICENSES/apollo.txt create mode 100644 app/public/robots/apollo/LICENSES/mjlab.txt create mode 100644 app/public/robots/apollo/SOURCE.md create mode 100644 app/public/robots/apollo/assets/ability_hand/FB_palm_ref.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/FB_palm_ref_MIR.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/idx-F1.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/idx-F2.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/thumb-F1-MIR.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/thumb-F1.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/thumb-F2-left.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/thumb-F2-right.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/wrist_adapter.STL create mode 100644 app/public/robots/apollo/assets/ability_hand/wristmesh.STL create mode 100644 app/public/robots/apollo/assets/afh_2_1_link.stl create mode 100644 app/public/robots/apollo/assets/battery_mount_fix.stl create mode 100644 app/public/robots/apollo/assets/l_ankle_ie_link.stl create mode 100644 app/public/robots/apollo/assets/l_elbow_fe_link.stl create mode 100644 app/public/robots/apollo/assets/l_foot_link.stl create mode 100644 app/public/robots/apollo/assets/l_hip_aa_link.stl create mode 100644 app/public/robots/apollo/assets/l_hip_fe_link.stl create mode 100644 app/public/robots/apollo/assets/l_hip_ie_link.stl create mode 100644 app/public/robots/apollo/assets/l_knee_fe_link.stl create mode 100644 app/public/robots/apollo/assets/l_shoulder_aa_link.stl create mode 100644 app/public/robots/apollo/assets/l_shoulder_fe_link.stl create mode 100644 app/public/robots/apollo/assets/l_shoulder_ie_link.stl create mode 100644 app/public/robots/apollo/assets/l_wrist_pitch_link.stl create mode 100644 app/public/robots/apollo/assets/l_wrist_roll_link.stl create mode 100644 app/public/robots/apollo/assets/l_wrist_yaw_link.stl create mode 100644 app/public/robots/apollo/assets/neck_mount_fix_link.stl create mode 100644 app/public/robots/apollo/assets/neck_yaw_link.stl create mode 100644 app/public/robots/apollo/assets/pelvis_link.stl create mode 100644 app/public/robots/apollo/assets/r_ankle_ie_link.stl create mode 100644 app/public/robots/apollo/assets/r_elbow_fe_link.stl create mode 100644 app/public/robots/apollo/assets/r_foot_link.stl create mode 100644 app/public/robots/apollo/assets/r_hip_aa_link.stl create mode 100644 app/public/robots/apollo/assets/r_hip_fe_link.stl create mode 100644 app/public/robots/apollo/assets/r_hip_ie_link.stl create mode 100644 app/public/robots/apollo/assets/r_knee_fe_link.stl create mode 100644 app/public/robots/apollo/assets/r_shoulder_aa_link.stl create mode 100644 app/public/robots/apollo/assets/r_shoulder_fe_link.stl create mode 100644 app/public/robots/apollo/assets/r_shoulder_ie_link.stl create mode 100644 app/public/robots/apollo/assets/r_wrist_pitch_link.stl create mode 100644 app/public/robots/apollo/assets/r_wrist_roll_link.stl create mode 100644 app/public/robots/apollo/assets/r_wrist_yaw_link.stl create mode 100644 app/public/robots/apollo/assets/torso_link.stl create mode 100644 app/public/robots/apollo/assets/torso_pitch_link.stl create mode 100644 app/public/robots/apollo/assets/torso_roll_link.stl create mode 100644 app/public/robots/apollo/model.xml create mode 100644 app/public/robots/apollo/policies/walk.onnx create mode 100644 app/public/robots/apollo/robot.json create mode 100644 app/public/robots/apollo/source-manifest.json create mode 100644 app/public/robots/t1/LICENSES/booster-assets.txt create mode 100644 app/public/robots/t1/LICENSES/mjlab.txt create mode 100644 app/public/robots/t1/SOURCE.md create mode 100644 app/public/robots/t1/meshes/AL1.STL create mode 100644 app/public/robots/t1/meshes/AL2.STL create mode 100644 app/public/robots/t1/meshes/AL3.STL create mode 100644 app/public/robots/t1/meshes/AR1.STL create mode 100644 app/public/robots/t1/meshes/AR2.STL create mode 100644 app/public/robots/t1/meshes/AR3.STL create mode 100644 app/public/robots/t1/meshes/Ankle_Cross_Left.STL create mode 100644 app/public/robots/t1/meshes/Ankle_Cross_Right.STL create mode 100644 app/public/robots/t1/meshes/H1.STL create mode 100644 app/public/robots/t1/meshes/H2.STL create mode 100644 app/public/robots/t1/meshes/Hip_Pitch_Left.STL create mode 100644 app/public/robots/t1/meshes/Hip_Pitch_Right.STL create mode 100644 app/public/robots/t1/meshes/Hip_Roll_Left.STL create mode 100644 app/public/robots/t1/meshes/Hip_Roll_Right.STL create mode 100644 app/public/robots/t1/meshes/Hip_Yaw_Left.STL create mode 100644 app/public/robots/t1/meshes/Hip_Yaw_Right.STL create mode 100644 app/public/robots/t1/meshes/Logo.STL create mode 100644 app/public/robots/t1/meshes/Shank_Left.STL create mode 100644 app/public/robots/t1/meshes/Shank_Right.STL create mode 100644 app/public/robots/t1/meshes/Trunk.STL create mode 100644 app/public/robots/t1/meshes/Waist.STL create mode 100644 app/public/robots/t1/meshes/left_foot_link.STL create mode 100644 app/public/robots/t1/meshes/left_hand_link.STL create mode 100644 app/public/robots/t1/meshes/right_foot_link.STL create mode 100644 app/public/robots/t1/meshes/right_hand_link.STL create mode 100644 app/public/robots/t1/model.xml create mode 100644 app/public/robots/t1/policies/walk.onnx create mode 100644 app/public/robots/t1/robot.json create mode 100644 app/public/robots/t1/source-manifest.json create mode 100644 app/scripts/import-apollo.py create mode 100644 app/scripts/import-t1.py create mode 100644 app/test/apollo-contract.test.js create mode 100644 docs/robots/v0.6-verification.md diff --git a/README.md b/README.md index f6626b6..83c627e 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,18 @@ license: apache-2.0 # Browser robot simulation platform -MuJoCo WASM + onnxruntime-web + three.js, with **Microduck** (legs / rollers), **Microban**, and **RP1** Robot Packages. Physics and ONNX inference run locally in the browser; no simulation backend is required. +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. @@ -30,6 +38,8 @@ The application opens directly into simulation, defaults to Microduck, and keeps | 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) | +**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). + 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). @@ -60,7 +70,7 @@ The football is removed. One browser session randomly generates **5–7 lightwei 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 same **robot-scaled arena template**. Microduck remains at **4.5 × 4.5 m**, with 0.25 m high / 0.05 m thick collision walls. World lengths scale by `dimensions.height / 0.27`: Microban gets **5.5 × 5.5 m**, walls ≈0.306 m high; RP1 gets **22 × 22 m**, walls ≈1.222 m high. Wall thickness, visual geometry, grid spacing and fade distances scale together, preserving Microduck's scene-to-body proportions. Nominal standing height is fixed per package, not inferred from the live pose or root spawn height; missing dimensions retain the reference scale. Interiors stay flat; no relief or automatic coordinate clamping is added. Explicit `world: "flat"` remains available for generic-runtime diagnostics. All robots start with the camera behind the body. Mouse orbit detaches chase mode; **C** restores rear following and the default zoom, including while paused (pressing C again does not detach). Dragging any robot or interactive geometry applies physical forces; dragging empty space orbits the camera, consistently for all three robots. Gamepad / touch are not part of this release's acceptance scope. +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 @@ -75,6 +85,10 @@ 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. diff --git a/app/e2e/apollo.spec.js b/app/e2e/apollo.spec.js new file mode 100644 index 0000000..328ad7c --- /dev/null +++ b/app/e2e/apollo.spec.js @@ -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([]); +}); diff --git a/app/e2e/rp1.spec.js b/app/e2e/rp1.spec.js index 49f8966..e88a273 100644 --- a/app/e2e/rp1.spec.js +++ b/app/e2e/rp1.spec.js @@ -23,7 +23,7 @@ test("third robot: real WASM/ONNX, keyboard command contract, trained skill bind await boot(page); expect( await page.getByLabel("Robot", { exact: true }).locator("option").count(), - ).toBe(3); + ).toBe(5); expect(await page.evaluate(() => window.rl.buildObs().length)).toBe(243); expect(await page.evaluate(() => window.rl.lastAction.length)).toBe(24); await page diff --git a/app/e2e/t1.spec.js b/app/e2e/t1.spec.js new file mode 100644 index 0000000..a94fa32 --- /dev/null +++ b/app/e2e/t1.spec.js @@ -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([]); +}); diff --git a/app/package-lock.json b/app/package-lock.json index 211120f..7c1e8be 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "microduck-sandbox", - "version": "0.5.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "microduck-sandbox", - "version": "0.5.0", + "version": "0.6.0", "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", diff --git a/app/package.json b/app/package.json index b79c275..dca7ac0 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "microduck-sandbox", "private": true, - "version": "0.5.0", + "version": "0.6.0", "type": "module", "scripts": { "dev": "vite", diff --git a/app/public/robots/apollo/LICENSES/apollo.txt b/app/public/robots/apollo/LICENSES/apollo.txt new file mode 100644 index 0000000..63be3c4 --- /dev/null +++ b/app/public/robots/apollo/LICENSES/apollo.txt @@ -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. diff --git a/app/public/robots/apollo/LICENSES/mjlab.txt b/app/public/robots/apollo/LICENSES/mjlab.txt new file mode 100644 index 0000000..7eb574f --- /dev/null +++ b/app/public/robots/apollo/LICENSES/mjlab.txt @@ -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. diff --git a/app/public/robots/apollo/SOURCE.md b/app/public/robots/apollo/SOURCE.md new file mode 100644 index 0000000..0297572 --- /dev/null +++ b/app/public/robots/apollo/SOURCE.md @@ -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. diff --git a/app/public/robots/apollo/assets/ability_hand/FB_palm_ref.STL b/app/public/robots/apollo/assets/ability_hand/FB_palm_ref.STL new file mode 100644 index 0000000..af789ec --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/FB_palm_ref.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9917a43ca1ce6fb2cbf7b651e0ed6b0c322acf75b8485806cc5d5a365b06db0 +size 581984 diff --git a/app/public/robots/apollo/assets/ability_hand/FB_palm_ref_MIR.STL b/app/public/robots/apollo/assets/ability_hand/FB_palm_ref_MIR.STL new file mode 100644 index 0000000..73efe9b --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/FB_palm_ref_MIR.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d0e9d29efbd8deb94bfab1c84464a2c46a33e839cb5f553115b27d2610193c2 +size 581984 diff --git a/app/public/robots/apollo/assets/ability_hand/idx-F1.STL b/app/public/robots/apollo/assets/ability_hand/idx-F1.STL new file mode 100644 index 0000000..6fcd2d8 --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/idx-F1.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f983d18177fecfdcf0141bd8e94e351fad67f62a74fb70819cdc017ae5af6d0e +size 44284 diff --git a/app/public/robots/apollo/assets/ability_hand/idx-F2.STL b/app/public/robots/apollo/assets/ability_hand/idx-F2.STL new file mode 100644 index 0000000..c266916 --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/idx-F2.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37d5e938e9e924fbf0262bd044ee04eec28c73cd73ea91ad97b37bf037c12198 +size 24384 diff --git a/app/public/robots/apollo/assets/ability_hand/thumb-F1-MIR.STL b/app/public/robots/apollo/assets/ability_hand/thumb-F1-MIR.STL new file mode 100644 index 0000000..72ef968 --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/thumb-F1-MIR.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ff962d2c6f8b0af39607439f4d48a247e4eb925f7a0c20ca00b0d27d8e7c2e0 +size 6084 diff --git a/app/public/robots/apollo/assets/ability_hand/thumb-F1.STL b/app/public/robots/apollo/assets/ability_hand/thumb-F1.STL new file mode 100644 index 0000000..2bd557f --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/thumb-F1.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20ec97a4682e85abe977fbe0d0108362719573830556f3b75350fe8a084af21 +size 6084 diff --git a/app/public/robots/apollo/assets/ability_hand/thumb-F2-left.STL b/app/public/robots/apollo/assets/ability_hand/thumb-F2-left.STL new file mode 100644 index 0000000..6893608 --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/thumb-F2-left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dcd48a151fe1de3f3eee0615ac679f0eb4182ae0ebee398d372ea102e718c89 +size 13484 diff --git a/app/public/robots/apollo/assets/ability_hand/thumb-F2-right.STL b/app/public/robots/apollo/assets/ability_hand/thumb-F2-right.STL new file mode 100644 index 0000000..104728c --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/thumb-F2-right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09623bce14d85db7b035ab4333f702505fa13f834845adda1179544d3c456a77 +size 13484 diff --git a/app/public/robots/apollo/assets/ability_hand/wrist_adapter.STL b/app/public/robots/apollo/assets/ability_hand/wrist_adapter.STL new file mode 100644 index 0000000..94d161e --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/wrist_adapter.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1d1c627d239acf058bb5df4b270e8f6ab7728c5b01f5fb7f0d269994f55b1a8 +size 3853984 diff --git a/app/public/robots/apollo/assets/ability_hand/wristmesh.STL b/app/public/robots/apollo/assets/ability_hand/wristmesh.STL new file mode 100644 index 0000000..d924f83 --- /dev/null +++ b/app/public/robots/apollo/assets/ability_hand/wristmesh.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d67306f775a5da7d6e8c9c2faddb12f1497ea289a6c7dc1584c213b42da43ee +size 2143184 diff --git a/app/public/robots/apollo/assets/afh_2_1_link.stl b/app/public/robots/apollo/assets/afh_2_1_link.stl new file mode 100644 index 0000000..e23633e --- /dev/null +++ b/app/public/robots/apollo/assets/afh_2_1_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76604d5c5db8472bf24322c33fe03b32c0f2dff45985edefb96c11e1c9b0e801 +size 2711384 diff --git a/app/public/robots/apollo/assets/battery_mount_fix.stl b/app/public/robots/apollo/assets/battery_mount_fix.stl new file mode 100644 index 0000000..75b6d31 --- /dev/null +++ b/app/public/robots/apollo/assets/battery_mount_fix.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9785105c0b606b5f229b70ba95bd64b239ddb90578f1dc9ccd439f4c182b5c33 +size 300084 diff --git a/app/public/robots/apollo/assets/l_ankle_ie_link.stl b/app/public/robots/apollo/assets/l_ankle_ie_link.stl new file mode 100644 index 0000000..eb87065 --- /dev/null +++ b/app/public/robots/apollo/assets/l_ankle_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e5526d09d5f418c4c428e5e58497c2807df06742e0e24874ccbcadd11e9bea1 +size 679134 diff --git a/app/public/robots/apollo/assets/l_elbow_fe_link.stl b/app/public/robots/apollo/assets/l_elbow_fe_link.stl new file mode 100644 index 0000000..971bd34 --- /dev/null +++ b/app/public/robots/apollo/assets/l_elbow_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac17ac98b6564a75886311fe88482b9cdbcb632556c80bdc3fd338dca26d43dd +size 1290984 diff --git a/app/public/robots/apollo/assets/l_foot_link.stl b/app/public/robots/apollo/assets/l_foot_link.stl new file mode 100644 index 0000000..5576c40 --- /dev/null +++ b/app/public/robots/apollo/assets/l_foot_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6506c651d16a4fcf6f8ce37a056b349bd1abea1c4526866383249addd3609659 +size 1841984 diff --git a/app/public/robots/apollo/assets/l_hip_aa_link.stl b/app/public/robots/apollo/assets/l_hip_aa_link.stl new file mode 100644 index 0000000..db20ed1 --- /dev/null +++ b/app/public/robots/apollo/assets/l_hip_aa_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9192292ec7093bde26d5ead25685d69e1a75d079f5cd800ae1817e789977c515 +size 538784 diff --git a/app/public/robots/apollo/assets/l_hip_fe_link.stl b/app/public/robots/apollo/assets/l_hip_fe_link.stl new file mode 100644 index 0000000..cc8c9fc --- /dev/null +++ b/app/public/robots/apollo/assets/l_hip_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c0729f7988d19a99caecda8afedd690dfc939cf2017680b15af7906186aecf2 +size 2499784 diff --git a/app/public/robots/apollo/assets/l_hip_ie_link.stl b/app/public/robots/apollo/assets/l_hip_ie_link.stl new file mode 100644 index 0000000..09f6ca5 --- /dev/null +++ b/app/public/robots/apollo/assets/l_hip_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db5e43d77b0308b0aaed54b54f022c90d8d8efc9f809de14d8eee8ddda2d7430 +size 2961884 diff --git a/app/public/robots/apollo/assets/l_knee_fe_link.stl b/app/public/robots/apollo/assets/l_knee_fe_link.stl new file mode 100644 index 0000000..dd73c81 --- /dev/null +++ b/app/public/robots/apollo/assets/l_knee_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:818d5660fb778eae7d28c05be806f76cbc298bd4fe8a8db7417a93b8ee9b48ed +size 1403484 diff --git a/app/public/robots/apollo/assets/l_shoulder_aa_link.stl b/app/public/robots/apollo/assets/l_shoulder_aa_link.stl new file mode 100644 index 0000000..ac2fdbb --- /dev/null +++ b/app/public/robots/apollo/assets/l_shoulder_aa_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96dea690d6288d5e81b651d4da7214ccf860aed74329d261aaef760533c12742 +size 276084 diff --git a/app/public/robots/apollo/assets/l_shoulder_fe_link.stl b/app/public/robots/apollo/assets/l_shoulder_fe_link.stl new file mode 100644 index 0000000..b32c301 --- /dev/null +++ b/app/public/robots/apollo/assets/l_shoulder_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd6b89ece6320388b792e910ddac222d6e4244d310efe4aa642788dc00232fb4 +size 2053634 diff --git a/app/public/robots/apollo/assets/l_shoulder_ie_link.stl b/app/public/robots/apollo/assets/l_shoulder_ie_link.stl new file mode 100644 index 0000000..77a7eda --- /dev/null +++ b/app/public/robots/apollo/assets/l_shoulder_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1932049068158367e09a6ee70a0a6d908c6e2adc6dcf471cb451205c320c4a2d +size 3142984 diff --git a/app/public/robots/apollo/assets/l_wrist_pitch_link.stl b/app/public/robots/apollo/assets/l_wrist_pitch_link.stl new file mode 100644 index 0000000..bc70b65 --- /dev/null +++ b/app/public/robots/apollo/assets/l_wrist_pitch_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae61d22369ae6ed0f7122df902c9ebabc482891739460cbb953317de24b90ab +size 1587934 diff --git a/app/public/robots/apollo/assets/l_wrist_roll_link.stl b/app/public/robots/apollo/assets/l_wrist_roll_link.stl new file mode 100644 index 0000000..fe21a3e --- /dev/null +++ b/app/public/robots/apollo/assets/l_wrist_roll_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e752b5aca75ebd5430e45ee37c9eb57f4cf9d6def6370c29234c811d40a028c0 +size 2500084 diff --git a/app/public/robots/apollo/assets/l_wrist_yaw_link.stl b/app/public/robots/apollo/assets/l_wrist_yaw_link.stl new file mode 100644 index 0000000..aab8696 --- /dev/null +++ b/app/public/robots/apollo/assets/l_wrist_yaw_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06b118e59ec0e6308a842f7fd3c572ed657c7d3cb93b17fb1de72ea56b3f27eb +size 370384 diff --git a/app/public/robots/apollo/assets/neck_mount_fix_link.stl b/app/public/robots/apollo/assets/neck_mount_fix_link.stl new file mode 100644 index 0000000..1a87ad6 --- /dev/null +++ b/app/public/robots/apollo/assets/neck_mount_fix_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6f64c42a5bfed7abb0dc48414e58164ad0042a71f5f5fe27382049e48608d7a +size 2267984 diff --git a/app/public/robots/apollo/assets/neck_yaw_link.stl b/app/public/robots/apollo/assets/neck_yaw_link.stl new file mode 100644 index 0000000..5b1a454 --- /dev/null +++ b/app/public/robots/apollo/assets/neck_yaw_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86160c43db315955e9e24c323602a74bad026bdd83df55fecb3413c333b2e453 +size 3512084 diff --git a/app/public/robots/apollo/assets/pelvis_link.stl b/app/public/robots/apollo/assets/pelvis_link.stl new file mode 100644 index 0000000..1e61ace --- /dev/null +++ b/app/public/robots/apollo/assets/pelvis_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f344c0928d39626394edff076e9eca00274cbf69830f6ff1b3ff6d019baa1a65 +size 3500084 diff --git a/app/public/robots/apollo/assets/r_ankle_ie_link.stl b/app/public/robots/apollo/assets/r_ankle_ie_link.stl new file mode 100644 index 0000000..aa5c55c --- /dev/null +++ b/app/public/robots/apollo/assets/r_ankle_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb33be19fe5202b6ed638c1816e3ba8e14d8407be9e0045c6e644f1fd54a5056 +size 652134 diff --git a/app/public/robots/apollo/assets/r_elbow_fe_link.stl b/app/public/robots/apollo/assets/r_elbow_fe_link.stl new file mode 100644 index 0000000..2f289ab --- /dev/null +++ b/app/public/robots/apollo/assets/r_elbow_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9564899c9031c4d68942c5d6e065d3e8b39634bcaaf0a23b91f0241420d8530f +size 1290684 diff --git a/app/public/robots/apollo/assets/r_foot_link.stl b/app/public/robots/apollo/assets/r_foot_link.stl new file mode 100644 index 0000000..abed0b4 --- /dev/null +++ b/app/public/robots/apollo/assets/r_foot_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ea4a2c27a89f944cd838c6c6c471c1b3a859bc4174c86c41773e6a20079b903 +size 1845934 diff --git a/app/public/robots/apollo/assets/r_hip_aa_link.stl b/app/public/robots/apollo/assets/r_hip_aa_link.stl new file mode 100644 index 0000000..8a32449 --- /dev/null +++ b/app/public/robots/apollo/assets/r_hip_aa_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cca53bcd1cedff71106dd0d276d6767e1bd7a7ceb6a6a0601b28c7d4361f79c +size 539884 diff --git a/app/public/robots/apollo/assets/r_hip_fe_link.stl b/app/public/robots/apollo/assets/r_hip_fe_link.stl new file mode 100644 index 0000000..527fa38 --- /dev/null +++ b/app/public/robots/apollo/assets/r_hip_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53bbb28f4688e4a9562d6d54a51c1d7784774117ecb2034f10f6f9ee470e0fa7 +size 2103184 diff --git a/app/public/robots/apollo/assets/r_hip_ie_link.stl b/app/public/robots/apollo/assets/r_hip_ie_link.stl new file mode 100644 index 0000000..cbc1835 --- /dev/null +++ b/app/public/robots/apollo/assets/r_hip_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b9cee0dab3e564b12fd6293fe21da1724261dd7347e184d84239d60cfe6551c +size 2961634 diff --git a/app/public/robots/apollo/assets/r_knee_fe_link.stl b/app/public/robots/apollo/assets/r_knee_fe_link.stl new file mode 100644 index 0000000..fa58af5 --- /dev/null +++ b/app/public/robots/apollo/assets/r_knee_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19a73643d4dd8ff90894b0a712cf828c7f79a8091218ad2dee8fec419f5f0666 +size 1386984 diff --git a/app/public/robots/apollo/assets/r_shoulder_aa_link.stl b/app/public/robots/apollo/assets/r_shoulder_aa_link.stl new file mode 100644 index 0000000..e9ad71c --- /dev/null +++ b/app/public/robots/apollo/assets/r_shoulder_aa_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d41fd7d6d599cb28cdd8fb135bc1f905f89acf0f768d771d1c0d24fa54921247 +size 290084 diff --git a/app/public/robots/apollo/assets/r_shoulder_fe_link.stl b/app/public/robots/apollo/assets/r_shoulder_fe_link.stl new file mode 100644 index 0000000..7495d39 --- /dev/null +++ b/app/public/robots/apollo/assets/r_shoulder_fe_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d702645d36fc09958b9c61cb92cab48c4902b2049f0d7839cea61761c521fd0 +size 2053084 diff --git a/app/public/robots/apollo/assets/r_shoulder_ie_link.stl b/app/public/robots/apollo/assets/r_shoulder_ie_link.stl new file mode 100644 index 0000000..2c8a6ad --- /dev/null +++ b/app/public/robots/apollo/assets/r_shoulder_ie_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ccc0413f98ed9a9549a6a6cbc0395c69fa4516381956d37b7717c0cb8e89dbd +size 2896884 diff --git a/app/public/robots/apollo/assets/r_wrist_pitch_link.stl b/app/public/robots/apollo/assets/r_wrist_pitch_link.stl new file mode 100644 index 0000000..acc6823 --- /dev/null +++ b/app/public/robots/apollo/assets/r_wrist_pitch_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61a85a23dc80ebbe954fcc669655d36159d4a7cb91a7a815f244f5ff94455f30 +size 1589534 diff --git a/app/public/robots/apollo/assets/r_wrist_roll_link.stl b/app/public/robots/apollo/assets/r_wrist_roll_link.stl new file mode 100644 index 0000000..9f9d52f --- /dev/null +++ b/app/public/robots/apollo/assets/r_wrist_roll_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97a2459f5cba8c03a59c9f8a7e9795a91c1b46a5d81d054bbb6cbb629e8cdafd +size 2500084 diff --git a/app/public/robots/apollo/assets/r_wrist_yaw_link.stl b/app/public/robots/apollo/assets/r_wrist_yaw_link.stl new file mode 100644 index 0000000..461423f --- /dev/null +++ b/app/public/robots/apollo/assets/r_wrist_yaw_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84ac6e91f41cd993ceba238969e7b09facc1733df603ac7dc439dfb327c60c12 +size 369534 diff --git a/app/public/robots/apollo/assets/torso_link.stl b/app/public/robots/apollo/assets/torso_link.stl new file mode 100644 index 0000000..b9da77e --- /dev/null +++ b/app/public/robots/apollo/assets/torso_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0301f1d9c925df169ba12a79cb2dab532156aae3821750cb5820349ac60a92f6 +size 7500084 diff --git a/app/public/robots/apollo/assets/torso_pitch_link.stl b/app/public/robots/apollo/assets/torso_pitch_link.stl new file mode 100644 index 0000000..3e9e40c --- /dev/null +++ b/app/public/robots/apollo/assets/torso_pitch_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc5174d8a748a0c372641dca94172646693edd1d6ead8fb1259a26cf53a08f93 +size 705334 diff --git a/app/public/robots/apollo/assets/torso_roll_link.stl b/app/public/robots/apollo/assets/torso_roll_link.stl new file mode 100644 index 0000000..fd43221 --- /dev/null +++ b/app/public/robots/apollo/assets/torso_roll_link.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db0bfaecf809e3f877cbdfadcf7e3ec162b4f5f362f61d3ea62d26ab3e1983a6 +size 1819384 diff --git a/app/public/robots/apollo/model.xml b/app/public/robots/apollo/model.xml new file mode 100644 index 0000000..1c5d478 --- /dev/null +++ b/app/public/robots/apollo/model.xml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/public/robots/apollo/policies/walk.onnx b/app/public/robots/apollo/policies/walk.onnx new file mode 100644 index 0000000..3f926e7 --- /dev/null +++ b/app/public/robots/apollo/policies/walk.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0dc72b1965b9a37d43c4224dc5dd81d8df8520b40ed02d6ef7ff44e0e90987b5 +size 900731 diff --git a/app/public/robots/apollo/robot.json b/app/public/robots/apollo/robot.json new file mode 100644 index 0000000..704c307 --- /dev/null +++ b/app/public/robots/apollo/robot.json @@ -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." +} diff --git a/app/public/robots/apollo/source-manifest.json b/app/public/robots/apollo/source-manifest.json new file mode 100644 index 0000000..4c498e5 --- /dev/null +++ b/app/public/robots/apollo/source-manifest.json @@ -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" + } + ] +} diff --git a/app/public/robots/index.json b/app/public/robots/index.json index f410b23..f606047 100644 --- a/app/public/robots/index.json +++ b/app/public/robots/index.json @@ -22,5 +22,17 @@ "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" } ] diff --git a/app/public/robots/t1/LICENSES/booster-assets.txt b/app/public/robots/t1/LICENSES/booster-assets.txt new file mode 100644 index 0000000..d7a14af --- /dev/null +++ b/app/public/robots/t1/LICENSES/booster-assets.txt @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2025, BoosterRobotics + +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. diff --git a/app/public/robots/t1/LICENSES/mjlab.txt b/app/public/robots/t1/LICENSES/mjlab.txt new file mode 100644 index 0000000..7eb574f --- /dev/null +++ b/app/public/robots/t1/LICENSES/mjlab.txt @@ -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. diff --git a/app/public/robots/t1/SOURCE.md b/app/public/robots/t1/SOURCE.md new file mode 100644 index 0000000..7244399 --- /dev/null +++ b/app/public/robots/t1/SOURCE.md @@ -0,0 +1,35 @@ +# Booster T1 package + +Imported from the local `mjlab` T1 flat-velocity task and `booster_assets/robots/T1/T1_23dof.xml`. + +## Policy snapshot + +- Training run: `2026-11-02_15-03-39_t1_flat`. +- Latest checkpoint at import: `model_6700.pt`; corresponding run-name ONNX export is bundled as `policies/walk.onnx`. +- Training may continue independently. This package intentionally pins the tested snapshot; it does not hot-reload weights. +- File hashes and source paths: `source-manifest.json`. + +## Fidelity + +23 controlled joints; 81 observations in exported policy order: body-frame linear velocity, angular velocity, projected gravity, relative joint positions, joint velocities, previous raw actions, and body-frame velocity command. The ONNX contains the exported observation normalization. + +The MJCF is generated through mjlab's `Entity(get_t1_robot_cfg())`, preserving inertias, armatures, collision masks and native position actuators with per-joint gains and torque limits. Actions use the full-precision training scales (not the rounded ONNX metadata). Simulation timestep is 5 ms with four substeps (50 Hz policy), implicitfast/Newton. Training randomization is disabled; the platform supplies its shared floor, walls and props. Meshes are the source STL visuals; no texture replacement is included. + +W/S command +0.6/-0.4 m/s; A/D command +0.6/-0.6 rad/s. Space resets, Escape pauses, C restores the chase camera. A fall holds targets pending manual reset; no recovery policy is supplied. + +Browser verification: five separate 5-second standing/forward/backward/left/right trials remained upright with finite states. Forward/backward displacement was +2.84/-1.68 m; left/right yaw was +2.97/-2.82 rad. Keyboard press/release, reset and robot switching also passed. This is simulation validation, not hardware qualification. + +## Re-import + +From repository root: + +```sh +/path/to/mjlab/.venv/bin/python app/scripts/import-t1.py /path/to/mjlab +cd app +npm run validate:packages +npx playwright test t1.spec.js +``` + +The importer selects the newest run and its highest numbered checkpoint, and requires a non-stale ONNX export. `BOOSTER_ASSETS_ROOT` can override the asset checkout. Re-run the browser tests after updating weights. + +Licenses from both source repositories are preserved in `LICENSES/`; the policy was trained locally. Confirm asset/model redistribution rights before public deployment. diff --git a/app/public/robots/t1/meshes/AL1.STL b/app/public/robots/t1/meshes/AL1.STL new file mode 100644 index 0000000..73434df --- /dev/null +++ b/app/public/robots/t1/meshes/AL1.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43f5d268152b3c169d34731545ddfa2a510a7e16f209a2a80f8ba9ae0e1a40aa +size 373884 diff --git a/app/public/robots/t1/meshes/AL2.STL b/app/public/robots/t1/meshes/AL2.STL new file mode 100644 index 0000000..c01b75f --- /dev/null +++ b/app/public/robots/t1/meshes/AL2.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bca60adb29c73f701350abd23e8a8d660dc61e87c5163a80157650dd3ad88c3 +size 317584 diff --git a/app/public/robots/t1/meshes/AL3.STL b/app/public/robots/t1/meshes/AL3.STL new file mode 100644 index 0000000..2bb3932 --- /dev/null +++ b/app/public/robots/t1/meshes/AL3.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfdf5611dfe90f8e02b07b037c36a244f4ce7184b45113371ef46e624fb30854 +size 751184 diff --git a/app/public/robots/t1/meshes/AR1.STL b/app/public/robots/t1/meshes/AR1.STL new file mode 100644 index 0000000..ca5872c --- /dev/null +++ b/app/public/robots/t1/meshes/AR1.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dbbd3dab4486600747be9d0e7f8523d67bf00d24d0dc9c23db1766c4d808fcf +size 374984 diff --git a/app/public/robots/t1/meshes/AR2.STL b/app/public/robots/t1/meshes/AR2.STL new file mode 100644 index 0000000..303aa9c --- /dev/null +++ b/app/public/robots/t1/meshes/AR2.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0499136785fe1bc0289d9e503e1e0ea48f5a63420a2e45b0fcd9e6b3bcf8f999 +size 317584 diff --git a/app/public/robots/t1/meshes/AR3.STL b/app/public/robots/t1/meshes/AR3.STL new file mode 100644 index 0000000..b47cc55 --- /dev/null +++ b/app/public/robots/t1/meshes/AR3.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92330bd8286fe420fb76949ee4c5d5bdec2e6bb30426acdc4d6fae9257464631 +size 751184 diff --git a/app/public/robots/t1/meshes/Ankle_Cross_Left.STL b/app/public/robots/t1/meshes/Ankle_Cross_Left.STL new file mode 100644 index 0000000..f96fe85 --- /dev/null +++ b/app/public/robots/t1/meshes/Ankle_Cross_Left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6ec38741838475834c147f2ad18196c0254741e602c2b676f888fd12b5d7981 +size 59084 diff --git a/app/public/robots/t1/meshes/Ankle_Cross_Right.STL b/app/public/robots/t1/meshes/Ankle_Cross_Right.STL new file mode 100644 index 0000000..c84177f --- /dev/null +++ b/app/public/robots/t1/meshes/Ankle_Cross_Right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b15d91f0f2470fc4d5634db906a3d7efaf1f700302e6671824494da8faf50308 +size 59084 diff --git a/app/public/robots/t1/meshes/H1.STL b/app/public/robots/t1/meshes/H1.STL new file mode 100644 index 0000000..47ef81e --- /dev/null +++ b/app/public/robots/t1/meshes/H1.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:527a2e426db4e3d476a195754764b7f9565a950b809a34e47618f177b139c3f2 +size 129084 diff --git a/app/public/robots/t1/meshes/H2.STL b/app/public/robots/t1/meshes/H2.STL new file mode 100644 index 0000000..dffba81 --- /dev/null +++ b/app/public/robots/t1/meshes/H2.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cbf4fe83a721c809de65b1f0d0a379314f4523f7e2f8af7f0edc27c2ce385aa +size 237184 diff --git a/app/public/robots/t1/meshes/Hip_Pitch_Left.STL b/app/public/robots/t1/meshes/Hip_Pitch_Left.STL new file mode 100644 index 0000000..c626ab6 --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Pitch_Left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bcb8be569aeb5379cb75a0827d682bc1d73a52a7f515d3aeffece43842c33c9 +size 64584 diff --git a/app/public/robots/t1/meshes/Hip_Pitch_Right.STL b/app/public/robots/t1/meshes/Hip_Pitch_Right.STL new file mode 100644 index 0000000..d0eb67b --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Pitch_Right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:054d579c3c6ccc1f97aaf1461d802dec748ce1bf26c6fdd289283a2d0dbb2032 +size 64184 diff --git a/app/public/robots/t1/meshes/Hip_Roll_Left.STL b/app/public/robots/t1/meshes/Hip_Roll_Left.STL new file mode 100644 index 0000000..0070eb2 --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Roll_Left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72dbd65bdb4e87444c8e538474f631d63bf8c0960922517456b8cf2be9e1d0f0 +size 57784 diff --git a/app/public/robots/t1/meshes/Hip_Roll_Right.STL b/app/public/robots/t1/meshes/Hip_Roll_Right.STL new file mode 100644 index 0000000..3013014 --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Roll_Right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d715a7649ea4bf20d7ee17b3a57bae31732e467b9da1053fee2242c90f50980f +size 57784 diff --git a/app/public/robots/t1/meshes/Hip_Yaw_Left.STL b/app/public/robots/t1/meshes/Hip_Yaw_Left.STL new file mode 100644 index 0000000..30c39c7 --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Yaw_Left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d7de83ab4034639db3d1be1e6f43ae16e004dc2f1c2bec170b615686d187918 +size 144484 diff --git a/app/public/robots/t1/meshes/Hip_Yaw_Right.STL b/app/public/robots/t1/meshes/Hip_Yaw_Right.STL new file mode 100644 index 0000000..b414bac --- /dev/null +++ b/app/public/robots/t1/meshes/Hip_Yaw_Right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a7d98e021884e313c55780a3c7c24ef2aa322807d8f9f8b18b2a63c7e2b9bf6 +size 144484 diff --git a/app/public/robots/t1/meshes/Logo.STL b/app/public/robots/t1/meshes/Logo.STL new file mode 100644 index 0000000..142b832 --- /dev/null +++ b/app/public/robots/t1/meshes/Logo.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:221b00d090fdc9e684892805db75265c9688b152b3ccf641084f950f220596c8 +size 216984 diff --git a/app/public/robots/t1/meshes/Shank_Left.STL b/app/public/robots/t1/meshes/Shank_Left.STL new file mode 100644 index 0000000..914c1cf --- /dev/null +++ b/app/public/robots/t1/meshes/Shank_Left.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae8dd7f88cb70a4a3cb3972cad4035a76f1604fd73ea66e285da553b3703c40 +size 492684 diff --git a/app/public/robots/t1/meshes/Shank_Right.STL b/app/public/robots/t1/meshes/Shank_Right.STL new file mode 100644 index 0000000..6bc9d69 --- /dev/null +++ b/app/public/robots/t1/meshes/Shank_Right.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc66a8a0e2e31e413884a053e427d9b5007bef4508986587916a638a8a448599 +size 493284 diff --git a/app/public/robots/t1/meshes/Trunk.STL b/app/public/robots/t1/meshes/Trunk.STL new file mode 100644 index 0000000..0fa0dec --- /dev/null +++ b/app/public/robots/t1/meshes/Trunk.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39d9610b23ef8ac7ea4343231a499f9c485903bede62df9729a2cd1254fede8f +size 329384 diff --git a/app/public/robots/t1/meshes/Waist.STL b/app/public/robots/t1/meshes/Waist.STL new file mode 100644 index 0000000..03fd795 --- /dev/null +++ b/app/public/robots/t1/meshes/Waist.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fe0a9ccfc284beca402e554db38e83022592192afa00f02db13cb374ffe9fbc +size 388684 diff --git a/app/public/robots/t1/meshes/left_foot_link.STL b/app/public/robots/t1/meshes/left_foot_link.STL new file mode 100644 index 0000000..47b3c77 --- /dev/null +++ b/app/public/robots/t1/meshes/left_foot_link.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2de026f2269fc55f80d4a8abd2e33dfd152adf9eb2c240d7d7e1dc40c13b55aa +size 979684 diff --git a/app/public/robots/t1/meshes/left_hand_link.STL b/app/public/robots/t1/meshes/left_hand_link.STL new file mode 100644 index 0000000..96fc9d1 --- /dev/null +++ b/app/public/robots/t1/meshes/left_hand_link.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34df992aed438446481cfa20e78327810cd5cc5ecbb4a6f32ba2bf625462f53d +size 435884 diff --git a/app/public/robots/t1/meshes/right_foot_link.STL b/app/public/robots/t1/meshes/right_foot_link.STL new file mode 100644 index 0000000..f84df6c --- /dev/null +++ b/app/public/robots/t1/meshes/right_foot_link.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:313a9ff2f95da5727dce2b98c50b60226bf0a3affc72050ee251ea503e4b370a +size 979684 diff --git a/app/public/robots/t1/meshes/right_hand_link.STL b/app/public/robots/t1/meshes/right_hand_link.STL new file mode 100644 index 0000000..5a38356 --- /dev/null +++ b/app/public/robots/t1/meshes/right_hand_link.STL @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5a73e493e17db7611a81785f80c01167f51018271b4042f72fa8d2351d8b0eb +size 435284 diff --git a/app/public/robots/t1/model.xml b/app/public/robots/t1/model.xml new file mode 100644 index 0000000..a54b4cd --- /dev/null +++ b/app/public/robots/t1/model.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/public/robots/t1/policies/walk.onnx b/app/public/robots/t1/policies/walk.onnx new file mode 100644 index 0000000..419e053 --- /dev/null +++ b/app/public/robots/t1/policies/walk.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58fe3675123badcca4c49ccd214791e4b8dbf63570072ef4b9eda44273bd6703 +size 840431 diff --git a/app/public/robots/t1/robot.json b/app/public/robots/t1/robot.json new file mode 100644 index 0000000..a9d7000 --- /dev/null +++ b/app/public/robots/t1/robot.json @@ -0,0 +1,524 @@ +{ + "schema": 1, + "id": "t1", + "name": "Booster T1", + "family": "t1", + "adapter": "generic", + "dimensions": { + "height": 1.18 + }, + "model": "model.xml", + "assets": [ + { + "path": "meshes/Trunk.STL", + "vfs": "meshes/Trunk.STL" + }, + { + "path": "meshes/H1.STL", + "vfs": "meshes/H1.STL" + }, + { + "path": "meshes/H2.STL", + "vfs": "meshes/H2.STL" + }, + { + "path": "meshes/AL1.STL", + "vfs": "meshes/AL1.STL" + }, + { + "path": "meshes/AL2.STL", + "vfs": "meshes/AL2.STL" + }, + { + "path": "meshes/AL3.STL", + "vfs": "meshes/AL3.STL" + }, + { + "path": "meshes/left_hand_link.STL", + "vfs": "meshes/left_hand_link.STL" + }, + { + "path": "meshes/AR1.STL", + "vfs": "meshes/AR1.STL" + }, + { + "path": "meshes/AR2.STL", + "vfs": "meshes/AR2.STL" + }, + { + "path": "meshes/AR3.STL", + "vfs": "meshes/AR3.STL" + }, + { + "path": "meshes/right_hand_link.STL", + "vfs": "meshes/right_hand_link.STL" + }, + { + "path": "meshes/Waist.STL", + "vfs": "meshes/Waist.STL" + }, + { + "path": "meshes/Hip_Pitch_Left.STL", + "vfs": "meshes/Hip_Pitch_Left.STL" + }, + { + "path": "meshes/Hip_Roll_Left.STL", + "vfs": "meshes/Hip_Roll_Left.STL" + }, + { + "path": "meshes/Hip_Yaw_Left.STL", + "vfs": "meshes/Hip_Yaw_Left.STL" + }, + { + "path": "meshes/Shank_Left.STL", + "vfs": "meshes/Shank_Left.STL" + }, + { + "path": "meshes/Ankle_Cross_Left.STL", + "vfs": "meshes/Ankle_Cross_Left.STL" + }, + { + "path": "meshes/left_foot_link.STL", + "vfs": "meshes/left_foot_link.STL" + }, + { + "path": "meshes/Hip_Pitch_Right.STL", + "vfs": "meshes/Hip_Pitch_Right.STL" + }, + { + "path": "meshes/Hip_Roll_Right.STL", + "vfs": "meshes/Hip_Roll_Right.STL" + }, + { + "path": "meshes/Hip_Yaw_Right.STL", + "vfs": "meshes/Hip_Yaw_Right.STL" + }, + { + "path": "meshes/Shank_Right.STL", + "vfs": "meshes/Shank_Right.STL" + }, + { + "path": "meshes/Ankle_Cross_Right.STL", + "vfs": "meshes/Ankle_Cross_Right.STL" + }, + { + "path": "meshes/right_foot_link.STL", + "vfs": "meshes/right_foot_link.STL" + }, + { + "path": "meshes/Logo.STL", + "vfs": "meshes/Logo.STL" + } + ], + "base": { + "type": "floating", + "root_body": "trunk", + "freejoint": "world_joint", + "spawn": { + "pos": [ + 0, + 0, + 0.6811 + ], + "yaw": 0 + } + }, + "sim": { + "timestep": 0.005, + "decimation": 4 + }, + "joints": { + "groups": { + "policy": [ + "aahead_yaw_joint", + "aahead_pitch_joint", + "left_shoulder_pitch_joint", + "left_shoulder_roll_joint", + "left_elbow_pitch_joint", + "left_elbow_yaw_joint", + "right_shoulder_pitch_joint", + "right_shoulder_roll_joint", + "right_elbow_pitch_joint", + "right_elbow_yaw_joint", + "waist_yaw_joint", + "left_hip_pitch_joint", + "left_hip_roll_joint", + "left_hip_yaw_joint", + "left_knee_pitch_joint", + "left_ankle_pitch_joint", + "left_ankle_roll_joint", + "right_hip_pitch_joint", + "right_hip_roll_joint", + "right_hip_yaw_joint", + "right_knee_pitch_joint", + "right_ankle_pitch_joint", + "right_ankle_roll_joint" + ], + "aahead_yaw_joint": [ + "aahead_yaw_joint" + ], + "aahead_pitch_joint": [ + "aahead_pitch_joint" + ], + "left_shoulder_pitch_joint": [ + "left_shoulder_pitch_joint" + ], + "left_shoulder_roll_joint": [ + "left_shoulder_roll_joint" + ], + "left_elbow_pitch_joint": [ + "left_elbow_pitch_joint" + ], + "left_elbow_yaw_joint": [ + "left_elbow_yaw_joint" + ], + "right_shoulder_pitch_joint": [ + "right_shoulder_pitch_joint" + ], + "right_shoulder_roll_joint": [ + "right_shoulder_roll_joint" + ], + "right_elbow_pitch_joint": [ + "right_elbow_pitch_joint" + ], + "right_elbow_yaw_joint": [ + "right_elbow_yaw_joint" + ], + "waist_yaw_joint": [ + "waist_yaw_joint" + ], + "left_hip_pitch_joint": [ + "left_hip_pitch_joint" + ], + "left_hip_roll_joint": [ + "left_hip_roll_joint" + ], + "left_hip_yaw_joint": [ + "left_hip_yaw_joint" + ], + "left_knee_pitch_joint": [ + "left_knee_pitch_joint" + ], + "left_ankle_pitch_joint": [ + "left_ankle_pitch_joint" + ], + "left_ankle_roll_joint": [ + "left_ankle_roll_joint" + ], + "right_hip_pitch_joint": [ + "right_hip_pitch_joint" + ], + "right_hip_roll_joint": [ + "right_hip_roll_joint" + ], + "right_hip_yaw_joint": [ + "right_hip_yaw_joint" + ], + "right_knee_pitch_joint": [ + "right_knee_pitch_joint" + ], + "right_ankle_pitch_joint": [ + "right_ankle_pitch_joint" + ], + "right_ankle_roll_joint": [ + "right_ankle_roll_joint" + ] + }, + "defaults": { + "aahead_yaw_joint": 0.0, + "aahead_pitch_joint": 0.0, + "left_shoulder_pitch_joint": 0.2, + "left_shoulder_roll_joint": -1.3, + "left_elbow_pitch_joint": 0.0, + "left_elbow_yaw_joint": -0.4, + "right_shoulder_pitch_joint": 0.2, + "right_shoulder_roll_joint": 1.3, + "right_elbow_pitch_joint": 0.0, + "right_elbow_yaw_joint": 0.4, + "waist_yaw_joint": 0.0, + "left_hip_pitch_joint": -0.2, + "left_hip_roll_joint": 0.0, + "left_hip_yaw_joint": 0.0, + "left_knee_pitch_joint": 0.4, + "left_ankle_pitch_joint": -0.2, + "left_ankle_roll_joint": 0.0, + "right_hip_pitch_joint": -0.2, + "right_hip_roll_joint": 0.0, + "right_hip_yaw_joint": 0.0, + "right_knee_pitch_joint": 0.4, + "right_ankle_pitch_joint": -0.2, + "right_ankle_roll_joint": 0.0 + } + }, + "observations": { + "obs": { + "terms": [ + { + "type": "linear_velocity", + "sensor": "imu_lin_vel" + }, + { + "type": "gyro", + "sensor": "imu_ang_vel" + }, + { + "type": "projected_gravity", + "body": "trunk" + }, + { + "type": "joint_pos_rel", + "group": "policy" + }, + { + "type": "joint_vel", + "group": "policy" + }, + { + "type": "last_action", + "group": "policy" + }, + { + "type": "command", + "size": 3 + } + ] + } + }, + "actions": [ + { + "type": "joint_position", + "group": "aahead_yaw_joint", + "scale": 0.35, + "offset": "default" + }, + { + "type": "joint_position", + "group": "aahead_pitch_joint", + "scale": 0.35, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_shoulder_pitch_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_shoulder_roll_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_elbow_pitch_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_elbow_yaw_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_shoulder_pitch_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_shoulder_roll_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_elbow_pitch_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_elbow_yaw_joint", + "scale": 0.23937499999999998, + "offset": "default" + }, + { + "type": "joint_position", + "group": "waist_yaw_joint", + "scale": 0.17, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_hip_pitch_joint", + "scale": 0.1235, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_hip_roll_joint", + "scale": 0.11333333333333333, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_hip_yaw_joint", + "scale": 0.17, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_knee_pitch_joint", + "scale": 0.163125, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_ankle_pitch_joint", + "scale": 0.3655, + "offset": "default" + }, + { + "type": "joint_position", + "group": "left_ankle_roll_joint", + "scale": 0.215, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_hip_pitch_joint", + "scale": 0.1235, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_hip_roll_joint", + "scale": 0.11333333333333333, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_hip_yaw_joint", + "scale": 0.17, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_knee_pitch_joint", + "scale": 0.163125, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_ankle_pitch_joint", + "scale": 0.3655, + "offset": "default" + }, + { + "type": "joint_position", + "group": "right_ankle_roll_joint", + "scale": 0.215, + "offset": "default" + } + ], + "actuation": { + "type": "native_position" + }, + "commands": { + "size": 3, + "limits": [ + 0.6, + -0.4, + 0.6 + ] + }, + "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": 2.5 + } + }, + "presentation": { + "theme": "comic" + }, + "termination": { + "tilt_z": -0.5, + "min_height": 0.42, + "on_fall": "hold" + }, + "license": "See LICENSES/booster-assets.txt and LICENSES/mjlab.txt; policy is locally trained." +} diff --git a/app/public/robots/t1/source-manifest.json b/app/public/robots/t1/source-manifest.json new file mode 100644 index 0000000..e2cb40d --- /dev/null +++ b/app/public/robots/t1/source-manifest.json @@ -0,0 +1,189 @@ +{ + "checkpoint": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/logs/rsl_rl/t1_flat_velocity/2026-11-02_15-03-39_t1_flat/model_6700.pt", + "checkpoint_sha256": "2cde298d0008f676dfebb6748c18531ea589e10bd7bb11dfe0b81dee9441f825", + "model_source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/T1_23dof.xml", + "files": [ + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Trunk.STL", + "file": "meshes/Trunk.STL", + "bytes": 329384, + "sha256": "39d9610b23ef8ac7ea4343231a499f9c485903bede62df9729a2cd1254fede8f" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/H1.STL", + "file": "meshes/H1.STL", + "bytes": 129084, + "sha256": "527a2e426db4e3d476a195754764b7f9565a950b809a34e47618f177b139c3f2" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/H2.STL", + "file": "meshes/H2.STL", + "bytes": 237184, + "sha256": "9cbf4fe83a721c809de65b1f0d0a379314f4523f7e2f8af7f0edc27c2ce385aa" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AL1.STL", + "file": "meshes/AL1.STL", + "bytes": 373884, + "sha256": "43f5d268152b3c169d34731545ddfa2a510a7e16f209a2a80f8ba9ae0e1a40aa" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AL2.STL", + "file": "meshes/AL2.STL", + "bytes": 317584, + "sha256": "4bca60adb29c73f701350abd23e8a8d660dc61e87c5163a80157650dd3ad88c3" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AL3.STL", + "file": "meshes/AL3.STL", + "bytes": 751184, + "sha256": "bfdf5611dfe90f8e02b07b037c36a244f4ce7184b45113371ef46e624fb30854" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/left_hand_link.STL", + "file": "meshes/left_hand_link.STL", + "bytes": 435884, + "sha256": "34df992aed438446481cfa20e78327810cd5cc5ecbb4a6f32ba2bf625462f53d" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AR1.STL", + "file": "meshes/AR1.STL", + "bytes": 374984, + "sha256": "6dbbd3dab4486600747be9d0e7f8523d67bf00d24d0dc9c23db1766c4d808fcf" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AR2.STL", + "file": "meshes/AR2.STL", + "bytes": 317584, + "sha256": "0499136785fe1bc0289d9e503e1e0ea48f5a63420a2e45b0fcd9e6b3bcf8f999" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/AR3.STL", + "file": "meshes/AR3.STL", + "bytes": 751184, + "sha256": "92330bd8286fe420fb76949ee4c5d5bdec2e6bb30426acdc4d6fae9257464631" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/right_hand_link.STL", + "file": "meshes/right_hand_link.STL", + "bytes": 435284, + "sha256": "c5a73e493e17db7611a81785f80c01167f51018271b4042f72fa8d2351d8b0eb" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Waist.STL", + "file": "meshes/Waist.STL", + "bytes": 388684, + "sha256": "2fe0a9ccfc284beca402e554db38e83022592192afa00f02db13cb374ffe9fbc" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Pitch_Left.STL", + "file": "meshes/Hip_Pitch_Left.STL", + "bytes": 64584, + "sha256": "7bcb8be569aeb5379cb75a0827d682bc1d73a52a7f515d3aeffece43842c33c9" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Roll_Left.STL", + "file": "meshes/Hip_Roll_Left.STL", + "bytes": 57784, + "sha256": "72dbd65bdb4e87444c8e538474f631d63bf8c0960922517456b8cf2be9e1d0f0" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Yaw_Left.STL", + "file": "meshes/Hip_Yaw_Left.STL", + "bytes": 144484, + "sha256": "8d7de83ab4034639db3d1be1e6f43ae16e004dc2f1c2bec170b615686d187918" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Shank_Left.STL", + "file": "meshes/Shank_Left.STL", + "bytes": 492684, + "sha256": "6ae8dd7f88cb70a4a3cb3972cad4035a76f1604fd73ea66e285da553b3703c40" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Ankle_Cross_Left.STL", + "file": "meshes/Ankle_Cross_Left.STL", + "bytes": 59084, + "sha256": "e6ec38741838475834c147f2ad18196c0254741e602c2b676f888fd12b5d7981" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/left_foot_link.STL", + "file": "meshes/left_foot_link.STL", + "bytes": 979684, + "sha256": "2de026f2269fc55f80d4a8abd2e33dfd152adf9eb2c240d7d7e1dc40c13b55aa" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Pitch_Right.STL", + "file": "meshes/Hip_Pitch_Right.STL", + "bytes": 64184, + "sha256": "054d579c3c6ccc1f97aaf1461d802dec748ce1bf26c6fdd289283a2d0dbb2032" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Roll_Right.STL", + "file": "meshes/Hip_Roll_Right.STL", + "bytes": 57784, + "sha256": "d715a7649ea4bf20d7ee17b3a57bae31732e467b9da1053fee2242c90f50980f" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Hip_Yaw_Right.STL", + "file": "meshes/Hip_Yaw_Right.STL", + "bytes": 144484, + "sha256": "1a7d98e021884e313c55780a3c7c24ef2aa322807d8f9f8b18b2a63c7e2b9bf6" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Shank_Right.STL", + "file": "meshes/Shank_Right.STL", + "bytes": 493284, + "sha256": "dc66a8a0e2e31e413884a053e427d9b5007bef4508986587916a638a8a448599" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Ankle_Cross_Right.STL", + "file": "meshes/Ankle_Cross_Right.STL", + "bytes": 59084, + "sha256": "b15d91f0f2470fc4d5634db906a3d7efaf1f700302e6671824494da8faf50308" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/right_foot_link.STL", + "file": "meshes/right_foot_link.STL", + "bytes": 979684, + "sha256": "313a9ff2f95da5727dce2b98c50b60226bf0a3affc72050ee251ea503e4b370a" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/robots/T1/meshes/Logo.STL", + "file": "meshes/Logo.STL", + "bytes": 216984, + "sha256": "221b00d090fdc9e684892805db75265c9688b152b3ccf641084f950f220596c8" + }, + { + "source": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/logs/rsl_rl/t1_flat_velocity/2026-11-02_15-03-39_t1_flat/2026-11-02_15-03-39_t1_flat.onnx", + "file": "policies/walk.onnx", + "bytes": 840431, + "sha256": "58fe3675123badcca4c49ccd214791e4b8dbf63570072ef4b9eda44273bd6703" + }, + { + "source": "/home/cen/Embodied_Workspace/PlatformProject/booster_assets/LICENSE", + "file": "LICENSES/booster-assets.txt", + "bytes": 1502, + "sha256": "056db8cc7dcb21feae042d97185d4689c21bb1ba7fe59cefdc7ef5917c0ea77f" + }, + { + "source": "/home/cen/Embodied_Workspace/Mujoco_Projects/mjlab/LICENSE", + "file": "LICENSES/mjlab.txt", + "bytes": 11352, + "sha256": "8ca04d9dbbccd20f0f1842fb33e13949f9e57064b150dad36af8e7a751ca3321" + } + ], + "behaviorReferences": [ + { + "file": "src/mjlab/asset_zoo/robots/booster_t1/t1_constants.py", + "sha256": "46d1f81ba54f5d1018978c3f54aba9cc23693d3cdc4cb967de68200bd766d407" + }, + { + "file": "src/mjlab/tasks/velocity/config/booster_t1/env_cfgs.py", + "sha256": "eb2d8707af01380de8f718585b92912861f9e2172dc06fcfbaddd0e51baa1aa3" + }, + { + "file": "src/mjlab/tasks/velocity/velocity_env_cfg.py", + "sha256": "8a272a8b3c81c4a0321027e404645c99a4143076522ed3521636bf293dd3137b" + } + ] +} diff --git a/app/scripts/import-apollo.py b/app/scripts/import-apollo.py new file mode 100644 index 0000000..04b15ec --- /dev/null +++ b/app/scripts/import-apollo.py @@ -0,0 +1,168 @@ +#!/usr/bin/env python3 +"""Import Apollo with mjlab's environment: uv run python /path/to/import-apollo.py .""" +import argparse +import hashlib +import json +from pathlib import Path +import sys +import xml.etree.ElementTree as ET + +import mujoco +import numpy as np +import onnx +import torch + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument("source", type=Path, help="mjlab checkout") +parser.add_argument("--checkpoint-file", type=Path, help="Exact checkpoint to import") +args = parser.parse_args() +source = args.source.resolve() +sys.path.insert(0, str(source / "src")) +from mjlab.entity import Entity +from mjlab.asset_zoo.robots.apptronik_apollo.apollo_constants import ( + APOLLO_ROOT_HEIGHT, get_apollo_robot_cfg, get_apollo_xml, +) + +if args.checkpoint_file: + checkpoint = args.checkpoint_file.resolve() +else: + checkpoints = list((source / "logs/rsl_rl/apollo_flat_upright_v3").glob("*/model_*.pt")) + checkpoint = max(checkpoints, key=lambda p: (p.stat().st_mtime_ns, int(p.stem.split("_")[-1]))) +if not checkpoint.is_file(): + raise FileNotFoundError(checkpoint) +policy = checkpoint.parent / f"{checkpoint.parent.name}.onnx" +if not policy.exists() or policy.stat().st_mtime_ns < checkpoint.stat().st_mtime_ns: + raise RuntimeError(f"Export the latest checkpoint first: {checkpoint}") +policy_bytes = policy.read_bytes() +export = onnx.load_model_from_string(policy_bytes) +# Verify the export contains this checkpoint's actor, not just a newer file. +state = torch.load(checkpoint, map_location="cpu", weights_only=False)["actor_state_dict"] +checked = set() +for initializer in export.graph.initializer: + if initializer.name in state: + np.testing.assert_array_equal( + onnx.numpy_helper.to_array(initializer), state[initializer.name].numpy(), + err_msg=f"ONNX does not match {checkpoint}: {initializer.name}", + ) + checked.add(initializer.name) +if not ({k for k in state if k.startswith("mlp.")} | {"obs_normalizer._mean"}) <= checked: + raise RuntimeError("ONNX is missing actor weights or normalization mean") +# The exporter folds normalization std + epsilon into the Div initializer. +initializers = {p.name: onnx.numpy_helper.to_array(p) for p in export.graph.initializer} +divisions = [n for n in export.graph.node if n.op_type == "Div"] +if len(divisions) != 1 or divisions[0].input[1] not in initializers: + raise RuntimeError("Unexpected ONNX normalization graph") +np.testing.assert_array_equal( + initializers[divisions[0].input[1]], + (state["obs_normalizer._std"] + 0.01).numpy(), + err_msg="ONNX normalization does not match checkpoint", +) +onnx.checker.check_model(export) +metadata = {p.key: p.value for p in export.metadata_props} +names = metadata["joint_names"].split(",") +scales = list(map(float, metadata["action_scale"].split(","))) +if len(names) != 32 or len(scales) != 32 or metadata["observation_names"] != "base_lin_vel,base_ang_vel,projected_gravity,joint_pos,joint_vel,actions,command": + raise RuntimeError("Unexpected Apollo policy contract") +target = Path(__file__).resolve().parents[1] / "public/robots/apollo" +target.mkdir(parents=True, exist_ok=True) +records = [] + + +def copy(src, dst, data=None): + data = src.read_bytes() if data is None else data + dest = target / dst + dest.parent.mkdir(parents=True, exist_ok=True) + dest.write_bytes(data) + records.append({"source": str(src), "file": dst, "bytes": len(data), + "sha256": hashlib.sha256(data).hexdigest()}) + + +# Apply training-time collision editors and retain original position actuators. +entity = Entity(get_apollo_robot_cfg()) +model = entity.spec.compile() +# Metadata rounds defaults to 3 decimals; use the actual training stand keyframe. +defaults = {} +for name in names: + jid = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, name) + defaults[name] = float(model.key_qpos[0, model.jnt_qposadr[jid]]) +np.testing.assert_allclose( + list(defaults.values()), list(map(float, metadata["default_joint_pos"].split(","))), + atol=0.000501, rtol=0, err_msg="Training pose does not match ONNX metadata", +) +root = ET.fromstring(entity.spec.to_xml()) +for tag in ("keyframe", "size", "option"): + for element in root.findall(tag): + root.remove(element) +ET.SubElement(root, "option", timestep="0.005", integrator="implicitfast", + solver="Newton", cone="pyramidal", iterations="20", ls_iterations="20", + ccd_iterations="50") +# Newer native MuJoCo writes input="pos"; WASM's general actuator uses +# position transmission by default and does not accept that newer keyword. +for actuator in root.findall("./actuator/general"): + if actuator.attrib.get("input") != "pos": + raise RuntimeError("Unexpected non-position Apollo actuator") + del actuator.attrib["input"] +assets = [] +xml = get_apollo_xml() +for mesh in root.findall("./asset/mesh"): + filename = mesh.attrib["file"] + dst = f"assets/{filename}" + copy(xml.parent / "assets" / filename, dst) + assets.append({"path": dst, "vfs": dst}) +root.insert(0, ET.Comment(" Modified for browser simulation by import-apollo.py; see SOURCE.md. ")) +ET.indent(root) +ET.ElementTree(root).write(target / "model.xml", encoding="unicode") +copy(policy, "policies/walk.onnx", policy_bytes) +copy(xml.parent / "LICENSE", "LICENSES/apollo.txt") +copy(source / "LICENSE", "LICENSES/mjlab.txt") +groups = {"policy": names, **{name: [name] for name in names}} +config = { + "schema": 1, "id": "apollo", "name": "Apptronik Apollo", "family": "apollo", "adapter": "generic", + "dimensions": {"height": 1.73}, "model": "model.xml", "assets": assets, + "base": {"type": "floating", "root_body": "base_link", "freejoint": model.joint(0).name, + "spawn": {"pos": [0, 0, APOLLO_ROOT_HEIGHT], "yaw": 0}}, + "sim": {"timestep": 0.005, "decimation": 4}, + "joints": {"groups": groups, "defaults": defaults}, + "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": name, "scale": scale, "offset": "default"} + for name, scale in zip(names, scales, strict=True)], + "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": action, "codes": codes, "label": label} + for action, codes, label in [ + ("move_forward", ["KeyW", "ArrowUp"], "Forward"), + ("move_backward", ["KeyS", "ArrowDown"], "Backward"), + ("turn_left", ["KeyA", "ArrowLeft"], "Turn left"), + ("turn_right", ["KeyD", "ArrowRight"], "Turn right"), + ("reset", ["Space"], "Reset"), + ("pause", ["Escape"], "Pause / continue"), + ("chaseToggle", ["KeyC"], "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.", +} +(target / "robot.json").write_text(json.dumps(config, indent=2) + "\n") +(target / "source-manifest.json").write_text(json.dumps({ + "checkpoint": str(checkpoint), + "checkpoint_sha256": hashlib.sha256(checkpoint.read_bytes()).hexdigest(), + "model_source": str(xml), "files": records, + "behaviorReferences": [ + {"file": str(p.relative_to(source)), "sha256": hashlib.sha256(p.read_bytes()).hexdigest()} + for p in [source / "src/mjlab/asset_zoo/robots/apptronik_apollo/apollo_constants.py", + source / "src/mjlab/tasks/velocity/config/apptronik_apollo/env_cfgs.py", + source / "src/mjlab/tasks/velocity/velocity_env_cfg.py"]], +}, indent=2) + "\n") +print(f"Imported {checkpoint} into {target}") diff --git a/app/scripts/import-t1.py b/app/scripts/import-t1.py new file mode 100644 index 0000000..38c5f92 --- /dev/null +++ b/app/scripts/import-t1.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 +"""Offline import using mjlab's Python environment. +Usage: /path/to/mjlab/.venv/bin/python app/scripts/import-t1.py /path/to/mjlab +Requires BOOSTER_ASSETS_ROOT if booster_assets is not at mjlab's default path. +""" +import hashlib +import json +from pathlib import Path +import re +import sys +import xml.etree.ElementTree as ET + +import onnx + +source = Path(sys.argv[1]).resolve() +sys.path.insert(0, str(source / 'src')) +from mjlab.entity import Entity +from mjlab.asset_zoo.robots.booster_t1.t1_constants import ( + get_t1_robot_cfg, get_t1_xml, T1_ACTION_SCALE, +) + +# Select the newest training run, then its highest numbered checkpoint. +runs = sorted(p for p in (source / 'logs/rsl_rl/t1_flat_velocity').iterdir() + if p.is_dir() and list(p.glob('model_*.pt'))) +run = runs[-1] +checkpoint = max(run.glob('model_*.pt'), key=lambda p: int(p.stem.split('_')[-1])) +policy = run / f'{run.name}.onnx' +if not policy.exists() or policy.stat().st_mtime < checkpoint.stat().st_mtime: + raise RuntimeError(f'Export the latest checkpoint first: {checkpoint}') +# Snapshot the export before model compilation: training may still be running. +policy_bytes = policy.read_bytes() +metadata = {p.key: p.value for p in onnx.load_model_from_string(policy_bytes).metadata_props} +names = metadata['joint_names'].split(',') +if len(names) != 23 or metadata['observation_names'] != 'base_lin_vel,base_ang_vel,projected_gravity,joint_pos,joint_vel,actions,command': + raise RuntimeError('Unexpected T1 policy contract') +defaults = dict(zip(names, map(float, metadata['default_joint_pos'].split(',')), strict=True)) +target = Path(__file__).resolve().parents[1] / 'public/robots/t1' +target.mkdir(parents=True, exist_ok=True) +records = [] + +def copy(src, dst, data=None): + data = src.read_bytes() if data is None else data + dest = target / dst + dest.parent.mkdir(parents=True, exist_ok=True) + dest.write_bytes(data) + records.append({'source': str(src), 'file': dst, 'bytes': len(data), + 'sha256': hashlib.sha256(data).hexdigest()}) + +# Entity applies the same actuator and collision editors used during training. +entity = Entity(get_t1_robot_cfg()) +entity.spec.compile() +root = ET.fromstring(entity.spec.to_xml()) +for tag in ('keyframe', 'size'): + for element in root.findall(tag): + root.remove(element) +ET.SubElement(root, 'option', timestep='0.005', integrator='implicitfast', + solver='Newton', cone='pyramidal', iterations='10', ls_iterations='20', + ccd_iterations='50') +assets = [] +xml = get_t1_xml() +for mesh in root.findall('./asset/mesh'): + filename = mesh.attrib['file'] + dst = f'meshes/{filename}' + copy(xml.parent / 'meshes' / filename, dst) + assets.append({'path': dst, 'vfs': dst}) +ET.indent(root) +ET.ElementTree(root).write(target / 'model.xml', encoding='unicode') +copy(policy, 'policies/walk.onnx', policy_bytes) +copy(xml.parents[2] / 'LICENSE', 'LICENSES/booster-assets.txt') +copy(source / 'LICENSE', 'LICENSES/mjlab.txt') +groups = {'policy': names} +actions = [] +for name in names: + groups[name] = [name] + scale, = [value for pattern, value in T1_ACTION_SCALE.items() if re.fullmatch(pattern, name)] + actions.append({'type': 'joint_position', 'group': name, 'scale': scale, 'offset': 'default'}) +config = { + 'schema': 1, 'id': 't1', 'name': 'Booster T1', 'family': 't1', 'adapter': 'generic', + 'dimensions': {'height': 1.18}, 'model': 'model.xml', 'assets': assets, + 'base': {'type': 'floating', 'root_body': 'trunk', 'freejoint': 'world_joint', + 'spawn': {'pos': [0, 0, 0.6811], 'yaw': 0}}, + 'sim': {'timestep': 0.005, 'decimation': 4}, + 'joints': {'groups': groups, 'defaults': defaults}, + 'observations': {'obs': {'terms': [ + {'type': 'linear_velocity', 'sensor': 'imu_lin_vel'}, + {'type': 'gyro', 'sensor': 'imu_ang_vel'}, + {'type': 'projected_gravity', 'body': 'trunk'}, + {'type': 'joint_pos_rel', 'group': 'policy'}, + {'type': 'joint_vel', 'group': 'policy'}, + {'type': 'last_action', 'group': 'policy'}, + {'type': 'command', 'size': 3}, + ]}}, + 'actions': actions, 'actuation': {'type': 'native_position'}, + 'commands': {'size': 3, 'limits': [0.6, -0.4, 0.6]}, + 'skills': [{'id': 'walk', 'kind': 'primary', 'owns': 'policy', + 'controller': {'type': 'onnx', 'policy': 'policies/walk.onnx'}}], + 'input': {'bindings': [ + {'action': action, 'codes': codes, 'label': label} + for action, codes, label in [ + ('move_forward', ['KeyW', 'ArrowUp'], 'Forward'), + ('move_backward', ['KeyS', 'ArrowDown'], 'Backward'), + ('turn_left', ['KeyA', 'ArrowLeft'], 'Turn left'), + ('turn_right', ['KeyD', 'ArrowRight'], 'Turn right'), + ('reset', ['Space'], 'Reset'), + ('pause', ['Escape'], 'Pause / continue'), + ('chaseToggle', ['KeyC'], 'Restore chase camera'), + ]]}, + 'render': {'source': 'mjcf_visual', 'groups': [1], 'camera': {'distance': 2.5}}, + 'presentation': {'theme': 'comic'}, + 'termination': {'tilt_z': -0.5, 'min_height': 0.42, 'on_fall': 'hold'}, + 'license': 'See LICENSES/booster-assets.txt and LICENSES/mjlab.txt; policy is locally trained.', +} +(target / 'robot.json').write_text(json.dumps(config, indent=2) + '\n') +(target / 'source-manifest.json').write_text(json.dumps({ + 'checkpoint': str(checkpoint), + 'checkpoint_sha256': hashlib.sha256(checkpoint.read_bytes()).hexdigest(), + 'model_source': str(xml), 'files': records, + 'behaviorReferences': [ + {'file': str(p.relative_to(source)), 'sha256': hashlib.sha256(p.read_bytes()).hexdigest()} + for p in [source / 'src/mjlab/asset_zoo/robots/booster_t1/t1_constants.py', + source / 'src/mjlab/tasks/velocity/config/booster_t1/env_cfgs.py', + source / 'src/mjlab/tasks/velocity/velocity_env_cfg.py']], +}, indent=2) + '\n') +print(f'Imported {checkpoint.name} / {policy.name} into {target}') diff --git a/app/src/platform/loader/SchemaValidator.js b/app/src/platform/loader/SchemaValidator.js index b7b65b0..da0e52f 100644 --- a/app/src/platform/loader/SchemaValidator.js +++ b/app/src/platform/loader/SchemaValidator.js @@ -147,8 +147,8 @@ export function validatePackage(config) { !term.group ) throw new Error(`${term.type}: group required`); - if (term.type === "gyro" && !term.sensor) - throw new Error("gyro: sensor required"); + if (["gyro", "linear_velocity"].includes(term.type) && !term.sensor) + throw new Error(`${term.type}: sensor required`); if (term.type === "projected_gravity" && !term.body) throw new Error("projected_gravity: body required"); if ( diff --git a/app/src/platform/loader/robot.schema.json b/app/src/platform/loader/robot.schema.json index 2b798fa..e769d44 100644 --- a/app/src/platform/loader/robot.schema.json +++ b/app/src/platform/loader/robot.schema.json @@ -182,6 +182,7 @@ "type": { "enum": [ "gyro", + "linear_velocity", "projected_gravity", "joint_pos_rel", "joint_vel", diff --git a/app/src/platform/policy/ObservationPipeline.js b/app/src/platform/policy/ObservationPipeline.js index 155372f..6029f2f 100644 --- a/app/src/platform/policy/ObservationPipeline.js +++ b/app/src/platform/policy/ObservationPipeline.js @@ -15,7 +15,7 @@ export class ObservationPipeline { const implementation = registry.get(term.type), size = implementation.size(term, ctx, names); let sensor, body; - if (term.type === "gyro") { + if (["gyro", "linear_velocity"].includes(term.type)) { const id = ctx.sim.mujoco.mj_name2id( ctx.sim.model, ctx.sim.mujoco.mjtObj.mjOBJ_SENSOR.value, @@ -31,7 +31,7 @@ export class ObservationPipeline { }; if (sensor.dim !== 3) throw new Error( - `observations.${name}: gyro ${term.sensor} must have dimension 3`, + `observations.${name}: ${term.type} ${term.sensor} must have dimension 3`, ); } if (term.type === "projected_gravity") { diff --git a/app/src/platform/policy/TermRegistry.js b/app/src/platform/policy/TermRegistry.js index 5d88889..3713243 100644 --- a/app/src/platform/policy/TermRegistry.js +++ b/app/src/platform/policy/TermRegistry.js @@ -33,6 +33,8 @@ observationTerms.register("gyro", { out[offset + i] = c.sim.data.sensordata[op.sensorAdr + i]; }, }); +// Both sensors expose three body-frame components from MuJoCo sensordata. +observationTerms.register("linear_velocity", observationTerms.get("gyro")); observationTerms.register("projected_gravity", { size: () => 3, write: (out, offset, c, op) => { diff --git a/app/src/platform/sim/SceneComposer.js b/app/src/platform/sim/SceneComposer.js index ca1e844..77abdca 100644 --- a/app/src/platform/sim/SceneComposer.js +++ b/app/src/platform/sim/SceneComposer.js @@ -22,6 +22,10 @@ export function composeScene(xml, config, world, interactiveProps = []) { for (const [key, value] of Object.entries({ name: "platform_floor", type: "plane", + // World collisions must not inherit a robot's visual-only geom defaults. + contype: "1", + conaffinity: "1", + group: "0", size: "0 0 0.05", rgba: world.floor.rgba.join(" "), friction: world.floor.friction.join(" "), diff --git a/app/test/apollo-contract.test.js b/app/test/apollo-contract.test.js new file mode 100644 index 0000000..7ff755e --- /dev/null +++ b/app/test/apollo-contract.test.js @@ -0,0 +1,46 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { readFile } from "node:fs/promises"; +import { createHash } from "node:crypto"; +import { readOnnxMetadata } from "../src/platform/loader/metadata.js"; + +const root = new URL("../public/robots/apollo/", import.meta.url); + +test("Apollo v0.6 pins upright v3 model_9999 and matches its pose/action contract", async () => { + const config = JSON.parse(await readFile(new URL("robot.json", root))); + const manifest = JSON.parse( + await readFile(new URL("source-manifest.json", root)), + ); + const policy = await readFile(new URL("policies/walk.onnx", root)); + const meta = readOnnxMetadata(policy); + assert.ok( + manifest.checkpoint.endsWith( + "/apollo_flat_upright_v3/2026-11-02_17-39-21_apollo_upright_v3/model_9999.pt", + ), + ); + assert.equal( + createHash("sha256").update(policy).digest("hex"), + manifest.files.find((f) => f.file === "policies/walk.onnx").sha256, + ); + assert.deepEqual(config.joints.groups.policy, meta.joint_names.split(",")); + assert.equal(config.joints.groups.policy.length, 32); + assert.deepEqual( + config.actions.map((a) => a.scale), + meta.action_scale.split(",").map(Number), + ); + meta.default_joint_pos + .split(",") + .map(Number) + .forEach((value, i) => { + assert.ok( + Math.abs( + config.joints.defaults[config.joints.groups.policy[i]] - value, + ) <= 0.000501, + ); + }); + assert.equal(config.joints.defaults.l_knee_fe, 0.35); + assert.equal(config.joints.defaults.r_knee_fe, 0.35); + assert.ok(Math.abs(config.base.spawn.pos[2] - 1.1008385) < 1e-7); + assert.equal(config.termination.min_height, 0.98); + assert.deepEqual(config.sim, { timestep: 0.005, decimation: 4 }); +}); diff --git a/app/test/policy-pipelines.test.js b/app/test/policy-pipelines.test.js index 18af2a4..9ff45be 100644 --- a/app/test/policy-pipelines.test.js +++ b/app/test/policy-pipelines.test.js @@ -93,6 +93,28 @@ test("observation order/frame/defaults/history use policy order, not model order /missing/, ); }); +test("body-frame linear velocity reads the named sensor and validates its dimension", () => { + const ctx = context(); + const specs = { + obs: { terms: [{ type: "linear_velocity", sensor: "velocity" }] }, + }; + ctx.sim.model.sensor_adr[0] = 3; + ctx.sim.data.sensordata = new Float64Array([99, 98, 97, 1, -2, 3]); + assert.deepEqual( + Array.from(new ObservationPipeline(specs, ctx).write().obs), + [1, -2, 3], + ); + ctx.sim.model.sensor_dim[0] = 1; + assert.throws(() => new ObservationPipeline(specs, ctx), /dimension 3/); + assert.throws( + () => + new ObservationPipeline( + { obs: { terms: [{ type: "linear_velocity", sensor: "missing" }] } }, + ctx, + ), + /missing sensor/, + ); +}); test("actions resolve named defaults and native ctrl order; invalid output is atomic", () => { const ctx = context(), p = new ActionPipeline([{ group: "policy", scale: 2 }], ctx); diff --git a/docs/robots/v0.6-verification.md b/docs/robots/v0.6-verification.md new file mode 100644 index 0000000..f14bc33 --- /dev/null +++ b/docs/robots/v0.6-verification.md @@ -0,0 +1,41 @@ +# v0.6 release verification + +## Scope + +Adds Booster T1 and Apptronik Apollo to the existing browser platform. Apollo is pinned to the requested 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` + +Its matching ONNX export is packaged with calibrated upright-v3 joint defaults and root spawn height, a 0.98 m fall threshold, original native position actuators and source STL visuals. Import validates network parameters, normalization mean/std and stand-pose metadata. Source and checkpoint SHA-256 values are recorded in `app/public/robots/apollo/source-manifest.json`. + +The release includes the previously uncommitted T1 integration, shared linear-velocity observation support, the World floor collision override, package manifests, assets, import scripts and regression tests. Version is `0.6.0`; Git release tag is `v0.6`. + +## Checks passed + +From `app/`: + +```sh +npm test # 68 passed +npm run validate:packages # all six packages, resource paths and source hashes +npm run build # production build +npm run format:check # all matched files +npx playwright test apollo.spec.js t1.spec.js rp1.spec.js \ + microban-walking.spec.js robot-switching.spec.js microduck-regression.spec.js +# 19 passed; targeted suite, not the entire browser suite +``` + +The failed-switch browser case intentionally injects a policy HTTP 404 and confirms rollback/retry; that logged error is expected. + +## Apollo results + +Real MuJoCo WASM and ONNX inference, 108 observations and 32 actions. WASD commands and release-to-zero, reset and inter-robot switching passed. Five independent 5-second trials with props parked: + +| Trial | Final x (m) | Final root z (m) | Final yaw (rad) | Fallen | +|---|---:|---:|---:|---| +| Stand | 0.020 | 1.086 | -0.025 | No | +| Forward | 2.258 | 1.083 | -0.029 | No | +| Backward | -1.174 | 1.086 | -0.096 | No | +| Left | 0.131 | 1.086 | 1.158 | No | +| Right | 0.064 | 1.086 | -1.725 | No | + +Tests require finite simulation state, no falls, final height above 1.04 m, correct translation/turn direction, and active floor collision bits even with Apollo's visual-only geom defaults. These checks do not establish long-duration robustness, perfect command tracking, or hardware compatibility.