Files
VibemakerSandbox/docs/superpowers/verification/2026-10-28-robot-scaled-arena.md
T

4.1 KiB
Raw Blame History

Robot-relative arena sizing — 2026-10-28

Requested behavior

Use Microduck's arena/body proportions for each robot instead of assigning all robots the same absolute 4.5 m arena and 0.25 m walls.

Size convention

robot.json now declares dimensions.height: nominal full-body standing height in metres. Source MJCF visual-geometry bounds were measured at each package's reference/reset pose, excluding non-robot bodies. Approximate measured heights: Microduck legs 0.272 m, Microban 0.332 m, RP1 1.321 m. Declared rounded values are 0.27 / 0.33 / 1.32 m. Both Microduck locomotion variants use the same family reference height, avoiding scene resizing when switching feet/rollers.

This is deliberately not root spawn height, camera distance, or live pose height. Walking, crouching, falling or waving must not move the walls.

The arena template declares scale_to_robot.reference_height = 0.27. All lengths scale by dimensions.height / reference_height:

Robot Scale Inner arena width × length Wall height Wall thickness
Microduck 1 4.5 × 4.5 m 0.25 m 0.05 m
Microban 1.222222 5.5 × 5.5 m 0.305556 m 0.061111 m
RP1 4.888889 22 × 22 m 1.222222 m 0.244444 m

Arena width / robot height remains 16.6667; wall height / robot height remains 0.925926. Existing Microduck baseline behavior is unchanged.

Implementation

  • platform/worlds/arena.js::fitWorldToRobot clones/resolves the authored World before MuJoCo compilation. It does not mutate shared configuration and repeated resolution does not double-scale.
  • PackageLoader.loadWorld(id, config) is used by RuntimeManager and the standalone Microduck entry. There are no robot-id branches in scaling logic.
  • Physical walls use the resolved boundary. Visual wall positions, heights and spans use those same dimensions.
  • Arena grid spacing, geometry extent and radial fade distances scale together; colours, reveal behavior and flat floor physics are unchanged. Without scaled fade, RP1's distant walls would disappear.
  • world.scale is runtime-only metadata; it cannot be injected as an authored world.json property.
  • Missing dimensions retain reference scale 1 for old packages. Future packages should explicitly declare nominal height. Worlds without scale_to_robot (including flat) retain fixed metre dimensions.
  • The RP1 full importer preserves its 1.32 m nominal height; policy-only export leaves package dimensions intact.

No robot meshes, masses, gains, gravity, command speeds or physics timestep are rescaled. No position clamp or automatic reset is used to create the boundary effect.

Verification

  • Unit tests: 49/49 pass, including per-package scale, unchanged template, idempotence, fallback, explicit fixed Worlds, invalid dimensions/reference scale, visual/physical dimensions, grid/fade scaling and disposal.
  • Targeted browser checks: 5/5 pass using actual MuJoCo WASM: all three robots' compiled collision walls and visual faces agree, future-package sizing, presentation cleanup, plus actual four-sided wall contacts for both Microban and RP1. Robots are placed near each wall and commanded forward; each wall reports contacts, finite state and root positions remaining inside the boundary, without coordinate clamping.
  • Full browser regression: 37/37 pass, including unchanged Microduck deterministic baselines, Microban long walking trials, RP1 locomotion/skills/reset, 20 three-family ownership transitions, and deployment. Runtime model/data disposal and scene/GPU/listener plateaus remain valid.
  • Production build and format check pass; the existing non-fatal MuJoCo browser module warning remains.
  • Screenshot: app/test-results/bounded-world-all-three-*/bounded-arena.png shows RP1 at arena overview scale (generated and ignored by git).
npm --prefix app test
npm --prefix app run validate:packages
npm --prefix app run build
npm --prefix app run test:e2e

This record supersedes the fixed-size field dimensions in earlier default-arena/RP1-integration verification records; those records describe the earlier implementation and remain historical evidence.