← Commit history

Add native Isaac Lab 3.0 + Newton MJWarp 16384-env port, 3-engine sim2sim validation, and full-RoM electronics clearance audit

Drew Owens ·f3db10164a · ·parent cdb9ed9
37 files changed +8901−726
README.md+23−1docs/analysis/electronics_fov_rom_clearance.pngrl/README.md+2−1rl/assets/microgoose.urdf+348−84rl/assets/microgoose.xml+163−57rl/assets/microgoose_allcollisions.xml+270rl/assets/microgoose_walk.xml+265rl/build_mjcf.py+731−499rl/isaaclab_microgoose/README.md+37−33rl/isaaclab_microgoose/__init__.py+17−38rl/isaaclab_microgoose/contrib/microgoose/__init__.py+30rl/isaaclab_microgoose/contrib/microgoose/agents/__init__.py+6rl/isaaclab_microgoose/contrib/microgoose/agents/rsl_rl_ppo_cfg.py+80rl/isaaclab_microgoose/contrib/microgoose/flat_env_cfg.py+488rl/isaaclab_microgoose/contrib/microgoose/mdp/__init__.py+10rl/isaaclab_microgoose/contrib/microgoose/mdp/__init__.pyi+92rl/isaaclab_microgoose/contrib/microgoose/mdp/actions.py+44rl/isaaclab_microgoose/contrib/microgoose/mdp/commands.py+171rl/isaaclab_microgoose/contrib/microgoose/mdp/curriculums.py+95rl/isaaclab_microgoose/contrib/microgoose/mdp/events.py+56rl/isaaclab_microgoose/contrib/microgoose/mdp/observations.py+222rl/isaaclab_microgoose/contrib/microgoose/mdp/rewards.py+339rl/isaaclab_microgoose/contrib/microgoose/mdp/symmetry.py+89rl/isaaclab_microgoose/contrib/microgoose/mdp/terminations.py+37rl/isaaclab_microgoose/contrib/microgoose/rough_env_cfg.py+135rl/isaaclab_microgoose/install_into_isaaclab.sh+22rl/isaaclab_microgoose/robots/microgoose.py+138rl/policies/isaaclab_newton_microgoose_short.onnxtimeline/README.md+6validation/check_electronics_and_rom_clearance.py+1743validation/electronics_clearance_report.json+2228validation/full_stack_report.json+4−4validation/isaaclab_newton_short_validation.json+340validation/quota_and_gpu_log.json+36−5validation/sim2sim_isaaclab_mujoco_drake.py+623validation/validation_master_report.json+2validation/verify_full_stack.py+9−4
README.md+23−1
@@ -72,7 +72,7 @@ The parametric OCCT/CadQuery generator ([mechanical/build_microgoose_cad.py](mec Microgoose implements the complete open sim-to-real recipe highlighted in Jensen Huang's GTC Berlin keynote:  1. **Stage 1: CAD-Exact MJCF/URDF & BAM Actuator Identification** ([rl/assets/microgoose.xml](rl/assets/microgoose.xml), [rl/bam/fit_xl330.py](rl/bam/fit_xl330.py)): Ingests exact OCCT per-link mass, CoM, and inertia tensors (`0.5502 kg`) alongside fitted `XL330-M288-T` BAM friction, reflected rotor armature (`3.443e-4 kg m^2`), `2 ms` bus delay, and `5 V` bus droop (`0.036 deg` validation RMSE).-2. **Stage 2: Isaac Lab 3.0 & Parallel BAM Locomotion Task** ([rl/isaaclab_microgoose/](rl/isaaclab_microgoose/)): Maps the `61`-dimensional proprioceptive, gait-phase, head-pose, and foot-contact observation vector to `14` joint position targets (`action_scale = 0.25 rad` at `50 Hz`, `10x` physics decimation at `dt = 0.002 s`) with domain randomization across payload mass, ground friction, motor strength, and lateral pushes.+2. **Stage 2: Isaac Lab 3.0 & Newton (`MuJoCo-Warp`) BAM Locomotion Task** ([rl/isaaclab_microgoose/](rl/isaaclab_microgoose/)): Registers `IsaacContrib-Velocity-Flat-MicroGoose` and `IsaacContrib-Velocity-Rough-MicroGoose` (`[1, 64] -> [1, 15]` policy, `79`-float critic, sagittal mirror symmetry augmentation, and `XL330-M288-T` Rhoban BAM `m6` voltage control at `50 Hz`) on the `60`-mesh CAD-exact USD articulation (`rl/assets/usd_walk/`). 3. **Stage 3: Live RTX 4090 CUDA PPO Training** ([rl/train_ppo_cuda.py](rl/train_ppo_cuda.py)): Trained `2,016,000` environment steps (`350` PPO updates across `160` vectorized BAM environments in `443.5 s` on CUDA), reaching `100.0%` episode survival. 4. **Stage 4 & 5: Self-Contained ONNX Export & Sim-to-Sim Rollout** ([rl/checkpoints/policy.onnx](rl/checkpoints/policy.onnx), [rl/infer_policy.py](rl/infer_policy.py)): Exports opset-17 `policy.onnx` (`1.31e-6` max diff vs PyTorch) with baked observation normalization; survives the full `10.0 s` CPU MuJoCo rollout (`+1.8987 m` traveled, `30.6 mm` swing clearance) including a `+0.18 m/s` lateral torso impulse at `t = 4.0 s`. 5. **Stage 6: `STM32G431` Spine Firmware & `50 Hz` `goosectl` Runtime** ([firmware/](firmware/), [runtime/](runtime/)): Deterministic `200 Hz` C11 firmware paired with a multi-daemon Python Unix-socket runtime (`goosectl up`, `stand`, `walk --vx 0.15 --vy 0.0 --wz 0.0`, `honk`, `estop`, and live ONNX hot-swap) with automatic crouch rollback on `|roll|, |pitch| > 0.75 rad`, `VBAT < 6.10 V`, or `I_bus > 4.20 A`.@@ -156,6 +156,28 @@ Even dual-engine multibody physics, 3D FEA, SPICE, and 3D field solvers cannot p  The complete staged hardware protocol (1. print single left leg first for fit and clevis load test -> 2. bare-board probing bring-up -> 3. `XL330` BAM pendulum rig measurement -> 4. `15`-servo benchtop HIL -> 5. tethered sim-to-real floor walking and compliant fall arrest) is specified in **[docs/validation/PHYSICAL_TEST_PLAN.md](docs/validation/PHYSICAL_TEST_PLAN.md)**. +### 4.5 Native Isaac Lab 3.0 + Newton (`MuJoCo-Warp`) `16,384`-Env Validation & 3-Engine Cross-Check++The native GPU task in [rl/isaaclab_microgoose/](rl/isaaclab_microgoose/) (`[1, 64] -> [1, 15]`, `rsl_rl` PPO with sagittal symmetry augmentation and Rhoban BAM `m6` `XL330` voltage control across `6.0` to `8.4 V` `2S` sag) was validated on an `NVIDIA GeForce RTX 4090 Laptop GPU` across `16,384` parallel environments (`80` iterations = `31,457,280` environment steps in `417.7 s` training / `440.1 s` wall-clock `[measured]`, `75,311` env steps/s with `2x` mirror symmetry active, peak `8,558 MB` VRAM, `106.3 W`, `76.7 C` `[measured]`). By iteration `79`, `88.37%` of all `16,384` parallel environments survived the full `20.0 s` (`1,000`-step) episode (`mean_reward = 86.78`, `0` NaN terminations `[measured]`).++Packing the exported single-file opset-18 artifact ([rl/policies/isaaclab_newton_microgoose_short.onnx](rl/policies/isaaclab_newton_microgoose_short.onnx), `8.64e-7` max TorchScript diff `[measured]`) and replaying a `10.0 s` stand, `0.25 m/s` forward walk, yaw turn, and settle schedule ([validation/isaaclab_newton_short_validation.json](validation/isaaclab_newton_short_validation.json)) confirmed zero-shot survival across both independent CPU engines:+- **CPU MuJoCo + Rhoban BAM `m6` `XL330`**: `10.0 s` survived (`max_tilt = 7.84 deg`), `0.7141 m` forward displacement (`0.1765 m/s` mean forward speed `[simulated]`), `3.873 A` mean total `2S` bus current.+- **MIT/TRI Drake `1.58.0` `MultibodyPlant` + SAP**: `10.0 s` survived (`max_tilt = 7.97 deg`, within `0.13 deg` of MuJoCo), `0.7318 m` forward displacement (`0.1826 m/s` mean forward speed, within `2.5%` of MuJoCo `[simulated]`).+- **Hardware Design Finding (`beak_pitch` Closed-Stop Stall)**: Because `beak_pitch` (`dxlId 15`) has `[0.0, 0.663 rad]` limits where `0.0 rad` is the hard closed stop, negative policy offsets around `q_default = 0.0 rad` hold `1.01 A` RMS against the mechanical stop (`107.6 C` `10`-minute rise `[simulated]`). Clamping `q_target[14] >= 0.03 rad` in firmware/runtime eliminates closed-stop stall current before full `5,000`-iteration gait training.++### 4.6 Full-RoM Electronics, Optical/RF FoV & Serviceability Clearance Audit++Beyond the nominal standing-pose check (`66` solids, `0` collisions), [validation/check_electronics_and_rom_clearance.py](validation/check_electronics_and_rom_clearance.py) swept all `15` joints across full hardware limits and dynamic gait/get-up poses (`806` CAD mesh pairs enabled) plus optical ray-casting, RF keepout, wire bend radii, connector unmating strokes, and battery extraction ([validation/electronics_clearance_report.json](validation/electronics_clearance_report.json)):++- **`VL53L5CX` `8x8` ToF FoV (`FAIL` on Rev A)**: `64/64` zones (`45 x 45 deg` cone) intersect the `beak_upper` ridge `0.21 mm` forward of the recessed sensor aperture across `beak_pitch` `0` to `38 deg` `[calculated]`. Rev B moves the ToF window flush with the upper-beak dorsal chamfer.+- **Board LEDs & `Radxa Zero 3W` RF Keepout (`FAIL` on Rev A)**: `D1` (`5V_OK`) has `40.8%` upper-hemisphere visibility (`PASS`), whereas `D2` (`STATUS_RGB`) sits `6.5 mm` beneath the `radxa_mezzanine_carrier` crossbar (`23.0%` open) and the `Radxa` `2.4/5 GHz` ceramic antenna sits `1.79 mm` from `M2.5` steel mounting screws vs the `10.0 mm` keepout target `[calculated]`.+- **Full-RoM All-Pairs Mesh Sweep (`FAIL` on Rev A)**: `95` of `806` mesh pairs contact across extreme single-joint limits (`28` from a mirrored `-Y` sign in `right_hip_yoke` / `right_shank_frame` CAD generation and `67` at extreme joint stops including `torso_core_cradle` vs hip brackets) `[calculated]`.+- **Cable Bundle Bend Radius, `J1..J5` Mating & Battery Sled (`FAIL` on Rev A)**: Tightest wire bends reach `1.88x` OD on `battery_vbat_feed` and `2.65x` OD on `neck_head_dxl` (vs `3.5x` static / `5.0x` dynamic target); `J3` has `6.35 mm` vertical clearance under the `Radxa` mezzanine vs the `7.5 mm` `JST-GH` vertical unmate stroke (`14/15` `XL330` ports pass); and tool-free `-X` `NP-F550` sled extraction is blocked by `6.75 mm` `torso_shell` tail fairing overlap `[calculated]`.+- **Camera Documentation Audit & Non-Invasive Rev B Proposal (`PASS`)**: Verified `0` false camera claims across the repo; ray-cast a non-invasive `IMX219` `120 deg` wide-angle brow pod at `(52.5, 0.0, 280.2) mm` (`-10 deg` pitch) achieving unobstructed forward horizon coverage with `33.8%` lower-frame beak tip reference `[calculated]`.++![Electronics FoV, full-RoM clearance, wire bundle bend radius, and serviceability audit summary](docs/analysis/electronics_fov_rom_clearance.png)+*Summary of the 8-part electronics, optical/RF FoV, full-RoM mesh clearance, wire bundle bend-radius, connector access, and battery extraction audit ([validation/electronics_clearance_report.json](validation/electronics_clearance_report.json)).*+ ---  ## Components
docs/analysis/electronics_fov_rom_clearance.pngadded
⋯ 1 unchanged line ⋯
rl/README.md+2−1
@@ -6,7 +6,8 @@ This directory implements the 7-stage reinforcement learning and dual-engine sim  - `build_mjcf.py`: Generates the CAD-exact `assets/microgoose.xml` (`MuJoCo 4.0.1` MJCF with `60` group-0 STL CAD mesh geoms, `0` visible primitives, `[0.000, 284.000] mm` standing Z bounds, `0.5502 kg` total mass) and `assets/microgoose.urdf` + `assets/obj/*.obj` & `materials.mtl` (`44` per-link/per-material Wavefront OBJ+MTL CAD meshes for `MIT/TRI Drake 1.58.0` `RenderEngineVtk`) using exact inverse forward-kinematics transforms `T_world_B(q_cad)^(-1)`. - `bam/`: Multi-mass pendulum identification (`fit_xl330.py`), coupled `XL330` + `LMR33640` electromechanical bus-droop and 2-node stator/case thermal solver (`xl330_electromech.py`), and fitted parameters (`xl330_bam_params.json`).-- `isaaclab_microgoose/`: Isaac Lab 3.0 / Newton `ManagerBasedRLEnvCfg` (`microgoose_env_cfg.py`), `rsl_rl` PPO runner config (`rsl_rl_ppo_cfg.py`), reward terms (`rewards.py`), and full Phase 2 domain randomization bounds (`randomizations.py`), ready for GPU-parallel training in `~/project/robot-sim`.+- `isaaclab_microgoose/`: Native Isaac Lab 3.0 + Newton (`MuJoCo-Warp`) + Rhoban BAM `m6` asset and task package (`robots/microgoose.py`, `contrib/microgoose/flat_env_cfg.py`, `contrib/microgoose/rough_env_cfg.py`, `contrib/microgoose/agents/rsl_rl_ppo_cfg.py`, `contrib/microgoose/mdp/symmetry.py`, and `install_into_isaaclab.sh`) registering `IsaacContrib-Velocity-Flat-MicroGoose` (`[1, 64] -> [1, 15]`, `79`-float critic, `16,384`-env GPU training).+- `policies/isaaclab_newton_microgoose_short.onnx`: Self-contained opset-18 ONNX walking policy exported from the `16,384`-environment Isaac Lab 3.0 + Newton validation run and cross-checked in CPU MuJoCo + BAM and MIT/TRI Drake (`validation/sim2sim_isaaclab_mujoco_drake.py`). - `microgoose_mj_env.py`: Vectorizable `50 Hz` `MuJoCo 4.0.1` + BAM `XL330` environment with full domain randomization (`+-20%` link mass, `[0.40, 1.30]` sole friction, `0.002..0.012 rad` gear backlash, `0..8 ms` UART delay, `6.0..8.4 V` `2S` battery OCV, `+-8.5 deg` slopes, and external planar pushes). - `drake_env.py`: Independent `MIT/TRI Drake 1.58.0` `MultibodyPlant` (Featherstone articulated-body tree + discrete SAP convex contact solver) paired with the identical `XL330` BAM + `LMR33640` Spine bus model. - `getup_controller.py`: Closed-loop `FallRecoveryController` testing both current-budgeted (`<= 3.75 rad/s` slew cap holding `5V_BUS = 5.00 V`) and uncapped (`28 rad/s` simultaneous snap proving `11.88 A` demand and `2.50 V` `LMR33640` foldback brownout) knockdown recovery.
rl/assets/microgoose.urdf+348−84
@@ -2,17 +2,143 @@ <robot name="microgoose">   <link name="torso">     <inertial>-      <origin xyz="-0.00226 0.00001 0.01177" rpy="0 0 0"/>-      <mass value="0.23770"/>-      <inertia ixx="0.0001786" ixy="0" ixz="0" iyy="0.0002516" iyz="0" izz="0.0002461"/>+      <origin xyz="-0.00227 0.00001 0.01175" rpy="0 0 0"/>+      <mass value="0.23745"/>+      <inertia ixx="0.0001776" ixy="0" ixz="0" iyy="0.0002506" iyz="0" izz="0.0002443"/>     </inertial>-    <visual>-      <origin xyz="-0.00400 0.00000 0.01200" rpy="0 0 0"/>+    <visual name="vis_torso_carbon_petg">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.09200 0.07200 0.06400"/>+        <mesh filename="obj/torso__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_goose_white">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__goose_white.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_goose_white">+        <color rgba="0.9450 0.9610 0.9760 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_xl330_charcoal">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_spine_pcb_emerald">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__spine_pcb_emerald.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_spine_pcb_emerald">+        <color rgba="0.0200 0.5880 0.4120 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_jst_ivory">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__jst_ivory.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_torso">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_jst_ivory">+        <color rgba="0.8860 0.9100 0.9410 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_led_green">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__led_green.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_led_green">+        <color rgba="0.1330 0.9000 0.4200 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_radxa_blue">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__radxa_blue.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_radxa_blue">+        <color rgba="0.1140 0.3060 0.8470 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_battery_pack">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__battery_pack.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_battery_pack">+        <color rgba="0.1600 0.1680 0.1850 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_steel_silver">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__steel_silver.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_steel_silver">+        <color rgba="0.7960 0.8350 0.8820 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_red">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_red.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_red">+        <color rgba="0.9370 0.2670 0.2670 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_orange">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_orange.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_orange">+        <color rgba="0.9760 0.4510 0.0860 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_black">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_black.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_black">+        <color rgba="0.1450 0.1800 0.2350 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_green">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_green.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_green">+        <color rgba="0.1330 0.7730 0.3690 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_blue">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_blue.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_blue">+        <color rgba="0.2310 0.5100 0.9650 1.0000"/>+      </material>+    </visual>+    <visual name="vis_torso_wire_yellow">+      <origin xyz="-0.000000 -0.000000 -0.135000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/torso__wire_yellow.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_wire_yellow">+        <color rgba="0.9180 0.7020 0.0310 1.0000"/>       </material>     </visual>     <collision>@@ -28,13 +154,22 @@       <mass value="0.02041"/>       <inertia ixx="0.0000023" ixy="0" ixz="0" iyy="0.0000051" iyz="0" izz="0.0000041"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.00900" rpy="0 0 0"/>+    <visual name="vis_left_hip_yaw_link_xl330_charcoal">+      <origin xyz="-0.000000 -0.034000 -0.114000" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.02000 0.03400 0.02600"/>+        <mesh filename="obj/left_hip_yaw_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_left_hip_yaw_link">-        <color rgba="0.17 0.20 0.24 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_left_hip_yaw_link_carbon_petg">+      <origin xyz="-0.000000 -0.034000 -0.114000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/left_hip_yaw_link__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -52,13 +187,22 @@       <mass value="0.02035"/>       <inertia ixx="0.0000030" ixy="0" ixz="0" iyy="0.0000027" iyz="0" izz="0.0000040"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.00900" rpy="0 0 0"/>+    <visual name="vis_left_hip_roll_link_xl330_charcoal">+      <origin xyz="-0.000000 -0.034000 -0.094000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/left_hip_roll_link__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_left_hip_roll_link_carbon_petg">+      <origin xyz="-0.000000 -0.034000 -0.094000" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.03400 0.02000 0.02600"/>+        <mesh filename="obj/left_hip_roll_link__carbon_petg.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_left_hip_roll_link">-        <color rgba="0.17 0.20 0.24 1"/>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -76,13 +220,22 @@       <mass value="0.01938"/>       <inertia ixx="0.0000074" ixy="0" ixz="0" iyy="0.0000029" iyz="0" izz="0.0000081"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+    <visual name="vis_left_thigh_link_xl330_charcoal">+      <origin xyz="-0.026060 -0.034000 -0.071392" rpy="-0.000000 0.350000 0.000000"/>+      <geometry>+        <mesh filename="obj/left_thigh_link__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_left_thigh_link_carbon_petg">+      <origin xyz="-0.026060 -0.034000 -0.071392" rpy="-0.000000 0.350000 0.000000"/>       <geometry>-        <box size="0.02200 0.02400 0.03400"/>+        <mesh filename="obj/left_thigh_link__carbon_petg.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_left_thigh_link">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -100,15 +253,30 @@       <mass value="0.01945"/>       <inertia ixx="0.0000076" ixy="0" ixz="0" iyy="0.0000029" iyz="0" izz="0.0000079"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+    <visual name="vis_left_shank_link_xl330_charcoal">+      <origin xyz="0.004801 -0.034000 -0.046153" rpy="0.000000 -0.350000 0.000000"/>       <geometry>-        <box size="0.01800 0.02200 0.03400"/>+        <mesh filename="obj/left_shank_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_left_shank_link">-        <color rgba="0.96 0.50 0.09 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>       </material>     </visual>+    <visual name="vis_left_shank_link_carbon_petg">+      <origin xyz="0.004801 -0.034000 -0.046153" rpy="0.000000 -0.350000 0.000000"/>+      <geometry>+        <mesh filename="obj/left_shank_link__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>+      </material>+    </visual>+    <collision>+      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+      <geometry>+        <box size="0.01800 0.02200 0.03400"/>+      </geometry>+    </collision>   </link>   <joint name="left_knee_pitch" type="revolute">     <parent link="left_thigh_link"/>@@ -124,13 +292,22 @@       <mass value="0.02367"/>       <inertia ixx="0.0000031" ixy="0" ixz="0" iyy="0.0000059" iyz="0" izz="0.0000067"/>     </inertial>-    <visual>-      <origin xyz="0.01200 0.00400 -0.01000" rpy="0 0 0"/>+    <visual name="vis_left_foot_link_xl330_charcoal">+      <origin xyz="0.000000 -0.034000 -0.014001" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.08800 0.04600 0.00800"/>+        <mesh filename="obj/left_foot_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_left_foot_link">-        <color rgba="0.96 0.50 0.09 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_left_foot_link_goose_orange">+      <origin xyz="0.000000 -0.034000 -0.014001" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/left_foot_link__goose_orange.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_goose_orange">+        <color rgba="0.9760 0.4510 0.0860 1.0000"/>       </material>     </visual>     <collision>@@ -154,13 +331,22 @@       <mass value="0.02041"/>       <inertia ixx="0.0000023" ixy="0" ixz="0" iyy="0.0000051" iyz="0" izz="0.0000041"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.00900" rpy="0 0 0"/>+    <visual name="vis_right_hip_yaw_link_xl330_charcoal">+      <origin xyz="-0.000000 0.034000 -0.114000" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.02000 0.03400 0.02600"/>+        <mesh filename="obj/right_hip_yaw_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_right_hip_yaw_link">-        <color rgba="0.17 0.20 0.24 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_right_hip_yaw_link_carbon_petg">+      <origin xyz="-0.000000 0.034000 -0.114000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/right_hip_yaw_link__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -178,13 +364,22 @@       <mass value="0.02035"/>       <inertia ixx="0.0000030" ixy="0" ixz="0" iyy="0.0000027" iyz="0" izz="0.0000040"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.00900" rpy="0 0 0"/>+    <visual name="vis_right_hip_roll_link_xl330_charcoal">+      <origin xyz="-0.000000 0.034000 -0.094000" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.03400 0.02000 0.02600"/>+        <mesh filename="obj/right_hip_roll_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_right_hip_roll_link">-        <color rgba="0.17 0.20 0.24 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_right_hip_roll_link_carbon_petg">+      <origin xyz="-0.000000 0.034000 -0.094000" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/right_hip_roll_link__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -202,13 +397,22 @@       <mass value="0.01938"/>       <inertia ixx="0.0000074" ixy="0" ixz="0" iyy="0.0000029" iyz="0" izz="0.0000081"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+    <visual name="vis_right_thigh_link_xl330_charcoal">+      <origin xyz="-0.026060 0.034000 -0.071392" rpy="-0.000000 0.350000 0.000000"/>+      <geometry>+        <mesh filename="obj/right_thigh_link__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_right_thigh_link_carbon_petg">+      <origin xyz="-0.026060 0.034000 -0.071392" rpy="-0.000000 0.350000 0.000000"/>       <geometry>-        <box size="0.02200 0.02400 0.03400"/>+        <mesh filename="obj/right_thigh_link__carbon_petg.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_right_thigh_link">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>       </material>     </visual>   </link>@@ -226,15 +430,30 @@       <mass value="0.01945"/>       <inertia ixx="0.0000076" ixy="0" ixz="0" iyy="0.0000029" iyz="0" izz="0.0000079"/>     </inertial>-    <visual>-      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+    <visual name="vis_right_shank_link_xl330_charcoal">+      <origin xyz="0.004801 0.034000 -0.046153" rpy="0.000000 -0.350000 0.000000"/>       <geometry>-        <box size="0.01800 0.02200 0.03400"/>+        <mesh filename="obj/right_shank_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_right_shank_link">-        <color rgba="0.96 0.50 0.09 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>       </material>     </visual>+    <visual name="vis_right_shank_link_carbon_petg">+      <origin xyz="0.004801 0.034000 -0.046153" rpy="0.000000 -0.350000 0.000000"/>+      <geometry>+        <mesh filename="obj/right_shank_link__carbon_petg.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_carbon_petg">+        <color rgba="0.1450 0.1950 0.2750 1.0000"/>+      </material>+    </visual>+    <collision>+      <origin xyz="0.00000 0.00000 -0.01650" rpy="0 0 0"/>+      <geometry>+        <box size="0.01800 0.02200 0.03400"/>+      </geometry>+    </collision>   </link>   <joint name="right_knee_pitch" type="revolute">     <parent link="right_thigh_link"/>@@ -250,13 +469,22 @@       <mass value="0.02367"/>       <inertia ixx="0.0000031" ixy="0" ixz="0" iyy="0.0000059" iyz="0" izz="0.0000067"/>     </inertial>-    <visual>-      <origin xyz="0.01200 -0.00400 -0.01000" rpy="0 0 0"/>+    <visual name="vis_right_foot_link_xl330_charcoal">+      <origin xyz="0.000000 0.034000 -0.014001" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.08800 0.04600 0.00800"/>+        <mesh filename="obj/right_foot_link__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_right_foot_link_goose_orange">+      <origin xyz="0.000000 0.034000 -0.014001" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/right_foot_link__goose_orange.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_right_foot_link">-        <color rgba="0.96 0.50 0.09 1"/>+      <material name="mat_goose_orange">+        <color rgba="0.9760 0.4510 0.0860 1.0000"/>       </material>     </visual>     <collision>@@ -280,13 +508,22 @@       <mass value="0.02246"/>       <inertia ixx="0.0000047" ixy="0" ixz="0" iyy="0.0000037" iyz="0" izz="0.0000032"/>     </inertial>-    <visual>-      <origin xyz="0.00140 0.00000 0.02350" rpy="0 0 0"/>+    <visual name="vis_neck_pitch_link_goose_white">+      <origin xyz="0.019285 -0.000000 -0.175670" rpy="0.000000 -0.200000 0.000000"/>+      <geometry>+        <mesh filename="obj/neck_pitch_link__goose_white.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_goose_white">+        <color rgba="0.9450 0.9610 0.9760 1.0000"/>+      </material>+    </visual>+    <visual name="vis_neck_pitch_link_xl330_charcoal">+      <origin xyz="0.019285 -0.000000 -0.175670" rpy="0.000000 -0.200000 0.000000"/>       <geometry>-        <box size="0.02400 0.02400 0.04800"/>+        <mesh filename="obj/neck_pitch_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_neck_pitch_link">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>       </material>     </visual>   </link>@@ -304,13 +541,13 @@       <mass value="0.00118"/>       <inertia ixx="0.0000010" ixy="0" ixz="0" iyy="0.0000010" iyz="0" izz="0.0000010"/>     </inertial>-    <visual>-      <origin xyz="0.00100 0.00000 0.01100" rpy="0 0 0"/>+    <visual name="vis_head_pitch_link_goose_white">+      <origin xyz="-0.028062 -0.000000 -0.221409" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.02200 0.02200 0.02400"/>+        <mesh filename="obj/head_pitch_link__goose_white.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_head_pitch_link">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_goose_white">+        <color rgba="0.9450 0.9610 0.9760 1.0000"/>       </material>     </visual>   </link>@@ -324,17 +561,17 @@   </joint>   <link name="head_yaw_link">     <inertial>-      <origin xyz="-0.00669 -0.00000 0.00253" rpy="0 0 0"/>+      <origin xyz="-0.00669 0.00000 0.00253" rpy="0 0 0"/>       <mass value="0.01800"/>       <inertia ixx="0.0000015" ixy="0" ixz="0" iyy="0.0000026" iyz="0" izz="0.0000023"/>     </inertial>-    <visual>-      <origin xyz="0.00200 0.00000 0.00800" rpy="0 0 0"/>+    <visual name="vis_head_yaw_link_xl330_charcoal">+      <origin xyz="-0.030062 -0.000000 -0.243409" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.02000 0.02200 0.02000"/>+        <mesh filename="obj/head_yaw_link__xl330_charcoal.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_head_yaw_link">-        <color rgba="0.17 0.20 0.24 1"/>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>       </material>     </visual>   </link>@@ -352,13 +589,40 @@       <mass value="0.06166"/>       <inertia ixx="0.0000141" ixy="0" ixz="0" iyy="0.0000765" iyz="0" izz="0.0000726"/>     </inertial>-    <visual>-      <origin xyz="0.00600 0.00000 0.00200" rpy="0 0 0"/>+    <visual name="vis_head_roll_link_xl330_charcoal">+      <origin xyz="-0.034062 -0.000000 -0.259409" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.04600 0.03600 0.04000"/>+        <mesh filename="obj/head_roll_link__xl330_charcoal.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_xl330_charcoal">+        <color rgba="0.0950 0.1220 0.1750 1.0000"/>+      </material>+    </visual>+    <visual name="vis_head_roll_link_goose_white">+      <origin xyz="-0.034062 -0.000000 -0.259409" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/head_roll_link__goose_white.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_goose_white">+        <color rgba="0.9450 0.9610 0.9760 1.0000"/>+      </material>+    </visual>+    <visual name="vis_head_roll_link_goose_orange">+      <origin xyz="-0.034062 -0.000000 -0.259409" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/head_roll_link__goose_orange.obj" scale="1 1 1"/>+      </geometry>+      <material name="mat_goose_orange">+        <color rgba="0.9760 0.4510 0.0860 1.0000"/>+      </material>+    </visual>+    <visual name="vis_head_roll_link_spine_pcb_emerald">+      <origin xyz="-0.034062 -0.000000 -0.259409" rpy="0.000000 0.000000 0.000000"/>+      <geometry>+        <mesh filename="obj/head_roll_link__spine_pcb_emerald.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_head_roll_link">-        <color rgba="0.93 0.95 0.97 1"/>+      <material name="mat_spine_pcb_emerald">+        <color rgba="0.0200 0.5880 0.4120 1.0000"/>       </material>     </visual>     <collision>@@ -382,13 +646,13 @@       <mass value="0.00289"/>       <inertia ixx="0.0000010" ixy="0" ixz="0" iyy="0.0000010" iyz="0" izz="0.0000010"/>     </inertial>-    <visual>-      <origin xyz="0.01400 0.00000 -0.00150" rpy="0 0 0"/>+    <visual name="vis_beak_link_goose_orange">+      <origin xyz="-0.056062 -0.000000 -0.253409" rpy="0.000000 0.000000 0.000000"/>       <geometry>-        <box size="0.03000 0.01900 0.00560"/>+        <mesh filename="obj/beak_link__goose_orange.obj" scale="1 1 1"/>       </geometry>-      <material name="mat_beak_link">-        <color rgba="0.96 0.50 0.09 1"/>+      <material name="mat_goose_orange">+        <color rgba="0.9760 0.4510 0.0860 1.0000"/>       </material>     </visual>   </link>
rl/assets/microgoose.xml+163−57
@@ -1,11 +1,11 @@ <?xml version="1.0" ?> <mujoco model="microgoose">-  <compiler angle="radian" coordinate="local" inertiafromgeom="false" autolimits="true"/>+  <compiler angle="radian" coordinate="local" inertiafromgeom="false" autolimits="true" meshdir="../../mechanical"/>   <option timestep="0.0020" gravity="0 0 -9.80665" integrator="implicitfast" iterations="35" ls_iterations="10"/>   <visual>-    <global offwidth="1920" offheight="1080" fovy="42"/>+    <global offwidth="1920" offheight="1080" fovy="34"/>     <quality shadowsize="4096" offsamples="4"/>-    <headlight ambient="0.38 0.40 0.44" diffuse="0.55 0.56 0.58" specular="0.2 0.2 0.2"/>+    <headlight ambient="0.34 0.36 0.40" diffuse="0.46 0.48 0.52" specular="0.22 0.24 0.28"/>     <rgba haze="0.05 0.075 0.09 1"/>   </visual>   <default>@@ -14,124 +14,230 @@     <motor ctrllimited="true" ctrlrange="-0.420 0.420" gear="1"/>   </default>   <asset>-    <texture type="skybox" builtin="gradient" rgb1="0.07 0.10 0.13" rgb2="0.03 0.05 0.07" width="512" height="512"/>-    <texture name="grid_tex" type="2d" builtin="checker" rgb1="0.08 0.11 0.14" rgb2="0.11 0.15 0.19" mark="edge" markrgb="0.20 0.27 0.34" width="512" height="512"/>-    <material name="floor_mat" texture="grid_tex" texrepeat="6 6" texuniform="true" reflectance="0.08"/>-    <material name="goose_shell" rgba="0.93 0.95 0.97 1" specular="0.35" shininess="0.4"/>-    <material name="goose_orange" rgba="0.96 0.50 0.09 1" specular="0.40" shininess="0.5"/>-    <material name="xl330_dark" rgba="0.17 0.20 0.24 1" specular="0.30" shininess="0.3"/>-    <material name="spine_pcb" rgba="0.08 0.45 0.26 1" specular="0.50" shininess="0.6"/>-    <material name="radxa_blue" rgba="0.15 0.38 0.72 1" specular="0.40" shininess="0.5"/>-    <material name="battery_pack" rgba="0.12 0.13 0.15 1" specular="0.20" shininess="0.2"/>-    <material name="eye_dark" rgba="0.05 0.06 0.08 1" specular="0.90" shininess="0.9"/>+    <texture type="skybox" builtin="gradient" rgb1="0.065 0.095 0.120" rgb2="0.035 0.050 0.065" width="512" height="512"/>+    <texture name="grid_tex" type="2d" builtin="checker" rgb1="0.075 0.105 0.130" rgb2="0.105 0.142 0.178" mark="edge" markrgb="0.18 0.26 0.33" width="512" height="512"/>+    <material name="floor_mat" texture="grid_tex" texrepeat="6 6" texuniform="true" reflectance="0.06"/>+    <material name="mat_goose_white" rgba="0.9450 0.9610 0.9760 1.0000" specular="0.220" shininess="0.420"/>+    <material name="mat_goose_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.280" shininess="0.540"/>+    <material name="mat_carbon_petg" rgba="0.1450 0.1950 0.2750 1.0000" specular="0.380" shininess="0.480"/>+    <material name="mat_xl330_charcoal" rgba="0.0950 0.1220 0.1750 1.0000" specular="0.420" shininess="0.620"/>+    <material name="mat_spine_pcb_emerald" rgba="0.0200 0.5880 0.4120 1.0000" specular="0.350" shininess="0.640"/>+    <material name="mat_gold_pin" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.750" shininess="0.780"/>+    <material name="mat_jst_ivory" rgba="0.8860 0.9100 0.9410 1.0000" specular="0.200" shininess="0.550"/>+    <material name="mat_ic_dark" rgba="0.1100 0.1150 0.1300 1.0000" specular="0.320" shininess="0.640"/>+    <material name="mat_passive_tan" rgba="0.7650 0.6120 0.4040 1.0000" specular="0.250" shininess="0.580"/>+    <material name="mat_led_green" rgba="0.1330 0.9000 0.4200 1.0000" specular="0.250" shininess="0.750"/>+    <material name="mat_radxa_blue" rgba="0.1140 0.3060 0.8470 1.0000" specular="0.340" shininess="0.620"/>+    <material name="mat_battery_pack" rgba="0.1600 0.1680 0.1850 1.0000" specular="0.260" shininess="0.520"/>+    <material name="mat_steel_silver" rgba="0.7960 0.8350 0.8820 1.0000" specular="0.680" shininess="0.750"/>+    <material name="mat_wire_red" rgba="0.9370 0.2670 0.2670 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_black" rgba="0.1450 0.1800 0.2350 1.0000" specular="0.220" shininess="0.640"/>+    <material name="mat_wire_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_yellow" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_green" rgba="0.1330 0.7730 0.3690 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_blue" rgba="0.2310 0.5100 0.9650 1.0000" specular="0.220" shininess="0.660"/>+    <mesh name="mesh_torso_core_cradle" file="stl/torso_core_cradle.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_mezzanine_carrier" file="stl/radxa_mezzanine_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_battery_sled" file="stl/battery_sled.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_left" file="stl/torso_shell_left.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_right" file="stl/torso_shell_right.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_dorsal_hatch" file="stl/torso_dorsal_hatch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_11_neck_pitch" file="parts/hero_meshes/dxl_11_neck_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_spine_pcb_emerald" file="parts/hero_meshes/board_spine_pcb_emerald.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_jst_ivory" file="parts/hero_meshes/board_jst_ivory.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_ic_dark" file="parts/hero_meshes/board_ic_dark.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_passive_tan" file="parts/hero_meshes/board_passive_tan.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_gold_pin" file="parts/hero_meshes/board_gold_pin.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_led_green" file="parts/hero_meshes/board_led_green.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_zero_3w" file="parts/hero_meshes/radxa_zero_3w.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_np_f550_battery" file="parts/hero_meshes/np_f550_battery.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_m25_radxa_screws" file="parts/hero_meshes/m25_radxa_screws.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_a" file="parts/hero_meshes/wire_radxa_link_5v_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_b" file="parts/hero_meshes/wire_radxa_link_5v_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_gnd" file="parts/hero_meshes/wire_radxa_link_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_tx" file="parts/hero_meshes/wire_radxa_link_tx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_rx" file="parts/hero_meshes/wire_radxa_link_rx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_a" file="parts/hero_meshes/wire_battery_vbat_pos_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_b" file="parts/hero_meshes/wire_battery_vbat_pos_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_gnd" file="parts/hero_meshes/wire_battery_vbat_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_gnd" file="parts/hero_meshes/wire_leg_left_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_5v" file="parts/hero_meshes/wire_leg_left_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_data" file="parts/hero_meshes/wire_leg_left_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_gnd" file="parts/hero_meshes/wire_leg_right_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_5v" file="parts/hero_meshes/wire_leg_right_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_data" file="parts/hero_meshes/wire_leg_right_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_01_left_hip_yaw" file="parts/hero_meshes/dxl_01_left_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_yoke" file="stl/left_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_02_left_hip_roll" file="parts/hero_meshes/dxl_02_left_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_roll_clevis" file="stl/left_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_03_left_hip_pitch" file="parts/hero_meshes/dxl_03_left_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_thigh_frame" file="stl/left_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_04_left_knee_pitch" file="parts/hero_meshes/dxl_04_left_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_shank_frame" file="stl/left_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_05_left_ankle_pitch" file="parts/hero_meshes/dxl_05_left_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_foot_sole_cad" file="stl/left_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_06_right_hip_yaw" file="parts/hero_meshes/dxl_06_right_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_yoke" file="stl/right_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_07_right_hip_roll" file="parts/hero_meshes/dxl_07_right_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_roll_clevis" file="stl/right_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_08_right_hip_pitch" file="parts/hero_meshes/dxl_08_right_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_thigh_frame" file="stl/right_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_09_right_knee_pitch" file="parts/hero_meshes/dxl_09_right_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_shank_frame" file="stl/right_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_10_right_ankle_pitch" file="parts/hero_meshes/dxl_10_right_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_foot_sole_cad" file="stl/right_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_s_curve_lower" file="stl/neck_s_curve_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_12_head_pitch" file="parts/hero_meshes/dxl_12_head_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_yaw_collar" file="stl/neck_yaw_collar.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_13_head_yaw" file="parts/hero_meshes/dxl_13_head_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_14_head_roll" file="parts/hero_meshes/dxl_14_head_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_15_beak_pitch" file="parts/hero_meshes/dxl_15_beak_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_shell" file="stl/head_shell.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_upper" file="stl/beak_upper.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_tof_imu_carrier" file="parts/hero_meshes/head_tof_imu_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_lower" file="stl/beak_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>   </asset>   <worldbody>-    <light name="key_light" pos="1.2 -1.4 2.2" dir="-0.45 0.50 -0.74" diffuse="0.85 0.86 0.88" specular="0.3 0.3 0.3" castshadow="true"/>-    <light name="fill_light" pos="-1.0 1.5 1.6" dir="0.45 -0.55 -0.70" diffuse="0.35 0.42 0.50" castshadow="false"/>+    <light name="key_light" pos="1.1 -1.3 2.1" dir="-0.48 0.52 -0.71" diffuse="0.86 0.87 0.90" specular="0.40 0.42 0.46" castshadow="true"/>+    <light name="fill_light" pos="1.0 1.4 1.4" dir="-0.50 -0.60 -0.62" diffuse="0.46 0.50 0.56" specular="0.18 0.20 0.24" castshadow="false"/>+    <light name="rim_light" pos="-1.2 0.3 1.5" dir="0.66 -0.16 -0.73" diffuse="0.36 0.46 0.58" specular="0.28 0.36 0.46" castshadow="false"/>     <geom name="floor" type="plane" size="8 8 0.05" material="floor_mat" contype="1" conaffinity="1" friction="0.90 0.005 0.0005"/>     <body name="torso" pos="0.00000 0.00000 0.13500">       <freejoint name="root_free"/>-      <inertial pos="-0.00226 0.00001 0.01177" mass="0.23770" diaginertia="0.0001786 0.0002516 0.0002461"/>-      <camera name="track_cam" mode="trackcom" pos="0.48 -0.62 0.24" xyaxes="0.79 0.61 0 -0.18 0.23 0.96"/>-      <geom name="torso_col" type="ellipsoid" pos="-0.004 0 0.012" size="0.048 0.038 0.034" material="goose_shell" contype="1" conaffinity="0"/>-      <geom name="goose_tail" type="capsule" fromto="-0.032 0 0.014 -0.062 0 0.028" size="0.016" material="goose_shell"/>-      <geom name="spine_pcb_vis" type="box" pos="0.00000 0.00000 0.01380" size="0.034 0.034 0.0008" material="spine_pcb"/>-      <geom name="radxa_vis" type="box" pos="-0.00200 0.00000 0.02760" size="0.0325 0.015 0.0026" material="radxa_blue"/>-      <geom name="battery_vis" type="box" pos="-0.00200 0.00000 -0.00250" size="0.0353 0.0191 0.01035" material="battery_pack"/>-      <site name="torso_imu" pos="0.00800 0.00000 0.01540" size="0.004" rgba="0.2 0.8 1.0 1"/>+      <inertial pos="-0.00227 0.00001 0.01175" mass="0.23745" diaginertia="0.0001776 0.0002506 0.0002443"/>+      <camera name="track_cam" mode="trackcom" pos="0.41 -0.44 0.16" xyaxes="0.731 0.682 0.000 -0.162 0.174 0.971" fovy="33"/>+      <geom name="torso_col" type="box" pos="-0.004 0 0.012" size="0.046 0.036 0.032" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+      <site name="torso_imu" pos="0.00800 0.00000 0.01540" size="0.004" group="4" rgba="0.2 0.8 1.0 0"/>       <body name="left_hip_yaw_link" pos="0.00000 0.03400 -0.02100">         <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>         <joint name="left_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>-        <geom type="box" pos="0 0 -0.009" size="0.010 0.017 0.013" material="xl330_dark"/>         <body name="left_hip_roll_link" pos="0 0 -0.020">           <inertial pos="0.02460 -0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>           <joint name="left_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>-          <geom type="box" pos="0 0 -0.009" size="0.017 0.010 0.013" material="xl330_dark"/>           <body name="left_thigh_link" pos="0 0 -0.018">             <inertial pos="-0.00527 -0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>             <joint name="left_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>-            <geom type="capsule" fromto="0 0 0 0 0 -0.033" size="0.011" material="goose_shell"/>-            <geom type="box" pos="0 0 -0.015" size="0.010 0.014 0.013" material="xl330_dark"/>             <body name="left_shank_link" pos="0 0 -0.033">               <inertial pos="-0.00637 -0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>               <joint name="left_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>-              <geom type="capsule" fromto="0 0 0 0 0 -0.033" size="0.009" material="goose_orange"/>-              <geom type="box" pos="0 0 -0.016" size="0.010 0.013 0.013" material="xl330_dark"/>+              <geom name="left_knee_col" type="sphere" pos="0.004 0 0.002" size="0.012" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>               <body name="left_foot_link" pos="0 0 -0.033">                 <inertial pos="0.00944 0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>                 <joint name="left_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>-                <geom name="left_foot_sole" type="box" pos="0.012 0.0040 -0.010" size="0.044 0.023 0.004" material="goose_orange" contype="1" conaffinity="0" friction="0.95 0.008 0.0008"/>-                <geom type="capsule" fromto="-0.018 0.0040 -0.008 0.052 0.0040 -0.010" size="0.0055" material="goose_orange"/>-                <geom type="capsule" fromto="-0.012 0.0040 -0.008 0.046 0.0220 -0.010" size="0.005" material="goose_orange"/>-                <geom type="capsule" fromto="-0.012 0.0040 -0.008 0.046 -0.0140 -0.010" size="0.005" material="goose_orange"/>-                <site name="left_foot_site" pos="0.012 0.0040 -0.014" size="0.004" rgba="1.0 0.6 0.1 1"/>+                <geom name="left_foot_sole" type="box" pos="0.012 0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="left_foot_site" pos="0.012 0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_05_left_ankle_pitch" type="mesh" mesh="mesh_dxl_05_left_ankle_pitch" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_left_foot_sole_cad" type="mesh" mesh="mesh_left_foot_sole_cad" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>               </body>+              <geom name="cad_dxl_04_left_knee_pitch" type="mesh" mesh="mesh_dxl_04_left_knee_pitch" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_left_shank_frame" type="mesh" mesh="mesh_left_shank_frame" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>             </body>+            <geom name="cad_dxl_03_left_hip_pitch" type="mesh" mesh="mesh_dxl_03_left_hip_pitch" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_left_thigh_frame" type="mesh" mesh="mesh_left_thigh_frame" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>           </body>+          <geom name="cad_dxl_02_left_hip_roll" type="mesh" mesh="mesh_dxl_02_left_hip_roll" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_left_hip_roll_clevis" type="mesh" mesh="mesh_left_hip_roll_clevis" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>         </body>+        <geom name="cad_dxl_01_left_hip_yaw" type="mesh" mesh="mesh_dxl_01_left_hip_yaw" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_left_hip_yoke" type="mesh" mesh="mesh_left_hip_yoke" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>       </body>       <body name="neck_pitch_link" pos="0.01600 0.00000 0.04100">         <inertial pos="0.01320 0.00002 0.03726" mass="0.02246" diaginertia="0.0000047 0.0000037 0.0000032"/>         <joint name="neck_pitch" type="hinge" axis="0.0 1.0 0.0" range="-0.95993 1.13446"/>-        <geom type="capsule" fromto="0 0 0 0.0028 0 0.0469" size="0.0135" material="goose_shell"/>         <body name="head_pitch_link" pos="0.0028 0 0.0469">           <inertial pos="-0.01640 0.00000 0.00530" mass="0.00118" diaginertia="0.0000010 0.0000010 0.0000010"/>           <joint name="head_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>-          <geom type="capsule" fromto="0 0 0 0.002 0 0.022" size="0.0125" material="goose_shell"/>           <body name="head_yaw_link" pos="0.002 0 0.022">-            <inertial pos="-0.00669 -0.00000 0.00253" mass="0.01800" diaginertia="0.0000015 0.0000026 0.0000023"/>+            <inertial pos="-0.00669 0.00000 0.00253" mass="0.01800" diaginertia="0.0000015 0.0000026 0.0000023"/>             <joint name="head_yaw" type="hinge" axis="0.0 0.0 1.0" range="-1.39626 1.39626"/>-            <geom type="box" pos="0.002 0 0.008" size="0.010 0.012 0.010" material="xl330_dark"/>             <body name="head_roll_link" pos="0.004 0 0.016">               <inertial pos="-0.00791 0.00001 0.00092" mass="0.06166" diaginertia="0.0000141 0.0000765 0.0000726"/>               <joint name="head_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.69813 0.69813"/>-              <geom name="head_col" type="ellipsoid" pos="0.004 0 0.002" size="0.023 0.018 0.020" material="goose_shell" contype="1" conaffinity="0"/>-              <geom type="sphere" pos="0.016 0.015 0.006" size="0.0038" material="eye_dark"/>-              <geom type="sphere" pos="0.016 -0.015 0.006" size="0.0038" material="eye_dark"/>-              <geom type="box" pos="0.036 0 0.000" size="0.017 0.011 0.0045" material="goose_orange"/>-              <geom type="sphere" pos="0.024 0 0.006" size="0.006" material="goose_orange"/>-              <site name="head_imu" pos="0.006 0 0.006" size="0.0035" rgba="0.2 0.9 0.5 1"/>-              <site name="tof_8x8_site" pos="0.026 0 0.009" euler="0 1.5707963 0" size="0.0035" rgba="0.95 0.25 0.35 1"/>+              <geom name="head_col" type="box" pos="0.004 0 0.002" size="0.023 0.018 0.020" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+              <site name="head_imu" pos="0.006 0 0.006" size="0.0035" group="4" rgba="0.2 0.9 0.5 0"/>+              <site name="tof_8x8_site" pos="0.0155 0 0.0115" euler="0 1.5707963 0" size="0.0035" group="4" rgba="0.95 0.25 0.35 0"/>               <body name="beak_link" pos="0.022 0 -0.006">                 <inertial pos="0.01142 0.00000 -0.01153" mass="0.00289" diaginertia="0.0000010 0.0000010 0.0000010"/>                 <joint name="beak_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 0.66323"/>-                <geom name="lower_beak_vis" type="box" pos="0.014 0 -0.0015" size="0.015 0.0095 0.0028" material="goose_orange"/>+                <geom name="lower_beak_col" type="box" pos="0.014 0 -0.0015" size="0.015 0.0095 0.0028" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+                <geom name="cad_beak_lower" type="mesh" mesh="mesh_beak_lower" pos="-0.056062 -0.000000 -0.253409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>               </body>+              <geom name="cad_dxl_14_head_roll" type="mesh" mesh="mesh_dxl_14_head_roll" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_dxl_15_beak_pitch" type="mesh" mesh="mesh_dxl_15_beak_pitch" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_shell" type="mesh" mesh="mesh_head_shell" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_beak_upper" type="mesh" mesh="mesh_beak_upper" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_tof_imu_carrier" type="mesh" mesh="mesh_head_tof_imu_carrier" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>             </body>+            <geom name="cad_dxl_13_head_yaw" type="mesh" mesh="mesh_dxl_13_head_yaw" pos="-0.030062 -0.000000 -0.243409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>           </body>+          <geom name="cad_neck_yaw_collar" type="mesh" mesh="mesh_neck_yaw_collar" pos="-0.028062 -0.000000 -0.221409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>         </body>+        <geom name="cad_neck_s_curve_lower" type="mesh" mesh="mesh_neck_s_curve_lower" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_dxl_12_head_pitch" type="mesh" mesh="mesh_dxl_12_head_pitch" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>       </body>       <body name="right_hip_yaw_link" pos="0.00000 -0.03400 -0.02100">         <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>         <joint name="right_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>-        <geom type="box" pos="0 0 -0.009" size="0.010 0.017 0.013" material="xl330_dark"/>         <body name="right_hip_roll_link" pos="0 0 -0.020">           <inertial pos="0.02460 0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>           <joint name="right_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>-          <geom type="box" pos="0 0 -0.009" size="0.017 0.010 0.013" material="xl330_dark"/>           <body name="right_thigh_link" pos="0 0 -0.018">             <inertial pos="-0.00527 0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>             <joint name="right_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>-            <geom type="capsule" fromto="0 0 0 0 0 -0.033" size="0.011" material="goose_shell"/>-            <geom type="box" pos="0 0 -0.015" size="0.010 0.014 0.013" material="xl330_dark"/>             <body name="right_shank_link" pos="0 0 -0.033">               <inertial pos="-0.00637 0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>               <joint name="right_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>-              <geom type="capsule" fromto="0 0 0 0 0 -0.033" size="0.009" material="goose_orange"/>-              <geom type="box" pos="0 0 -0.016" size="0.010 0.013 0.013" material="xl330_dark"/>+              <geom name="right_knee_col" type="sphere" pos="0.004 0 0.002" size="0.012" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>               <body name="right_foot_link" pos="0 0 -0.033">                 <inertial pos="0.00944 -0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>                 <joint name="right_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>-                <geom name="right_foot_sole" type="box" pos="0.012 -0.0040 -0.010" size="0.044 0.023 0.004" material="goose_orange" contype="1" conaffinity="0" friction="0.95 0.008 0.0008"/>-                <geom type="capsule" fromto="-0.018 -0.0040 -0.008 0.052 -0.0040 -0.010" size="0.0055" material="goose_orange"/>-                <geom type="capsule" fromto="-0.012 -0.0040 -0.008 0.046 0.0140 -0.010" size="0.005" material="goose_orange"/>-                <geom type="capsule" fromto="-0.012 -0.0040 -0.008 0.046 -0.0220 -0.010" size="0.005" material="goose_orange"/>-                <site name="right_foot_site" pos="0.012 -0.0040 -0.014" size="0.004" rgba="1.0 0.6 0.1 1"/>+                <geom name="right_foot_sole" type="box" pos="0.012 -0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="right_foot_site" pos="0.012 -0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_10_right_ankle_pitch" type="mesh" mesh="mesh_dxl_10_right_ankle_pitch" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_right_foot_sole_cad" type="mesh" mesh="mesh_right_foot_sole_cad" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>               </body>+              <geom name="cad_dxl_09_right_knee_pitch" type="mesh" mesh="mesh_dxl_09_right_knee_pitch" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_right_shank_frame" type="mesh" mesh="mesh_right_shank_frame" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>             </body>+            <geom name="cad_dxl_08_right_hip_pitch" type="mesh" mesh="mesh_dxl_08_right_hip_pitch" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_right_thigh_frame" type="mesh" mesh="mesh_right_thigh_frame" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>           </body>+          <geom name="cad_dxl_07_right_hip_roll" type="mesh" mesh="mesh_dxl_07_right_hip_roll" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_right_hip_roll_clevis" type="mesh" mesh="mesh_right_hip_roll_clevis" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>         </body>+        <geom name="cad_dxl_06_right_hip_yaw" type="mesh" mesh="mesh_dxl_06_right_hip_yaw" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_right_hip_yoke" type="mesh" mesh="mesh_right_hip_yoke" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>       </body>+      <geom name="cad_torso_core_cradle" type="mesh" mesh="mesh_torso_core_cradle" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_mezzanine_carrier" type="mesh" mesh="mesh_radxa_mezzanine_carrier" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_battery_sled" type="mesh" mesh="mesh_battery_sled" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_left" type="mesh" mesh="mesh_torso_shell_left" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_right" type="mesh" mesh="mesh_torso_shell_right" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_dorsal_hatch" type="mesh" mesh="mesh_torso_dorsal_hatch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_dxl_11_neck_pitch" type="mesh" mesh="mesh_dxl_11_neck_pitch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_spine_pcb_emerald" type="mesh" mesh="mesh_board_spine_pcb_emerald" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_jst_ivory" type="mesh" mesh="mesh_board_jst_ivory" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_jst_ivory" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_ic_dark" type="mesh" mesh="mesh_board_ic_dark" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_ic_dark" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_passive_tan" type="mesh" mesh="mesh_board_passive_tan" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_passive_tan" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_gold_pin" type="mesh" mesh="mesh_board_gold_pin" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_gold_pin" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_led_green" type="mesh" mesh="mesh_board_led_green" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_led_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_zero_3w" type="mesh" mesh="mesh_radxa_zero_3w" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_radxa_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_np_f550_battery" type="mesh" mesh="mesh_np_f550_battery" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_battery_pack" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_m25_radxa_screws" type="mesh" mesh="mesh_m25_radxa_screws" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_steel_silver" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_a" type="mesh" mesh="mesh_wire_radxa_link_5v_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_b" type="mesh" mesh="mesh_wire_radxa_link_5v_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_gnd" type="mesh" mesh="mesh_wire_radxa_link_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_tx" type="mesh" mesh="mesh_wire_radxa_link_tx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_rx" type="mesh" mesh="mesh_wire_radxa_link_rx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_a" type="mesh" mesh="mesh_wire_battery_vbat_pos_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_b" type="mesh" mesh="mesh_wire_battery_vbat_pos_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_gnd" type="mesh" mesh="mesh_wire_battery_vbat_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_gnd" type="mesh" mesh="mesh_wire_leg_left_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_5v" type="mesh" mesh="mesh_wire_leg_left_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_data" type="mesh" mesh="mesh_wire_leg_left_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_gnd" type="mesh" mesh="mesh_wire_leg_right_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_5v" type="mesh" mesh="mesh_wire_leg_right_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_data" type="mesh" mesh="mesh_wire_leg_right_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>     </body>   </worldbody>   <actuator>
rl/assets/microgoose_allcollisions.xmladded+270
@@ -0,0 +1,270 @@+<?xml version="1.0" ?>+<mujoco model="microgoose">+  <compiler angle="radian" coordinate="local" inertiafromgeom="false" autolimits="true" meshdir="../../mechanical"/>+  <option timestep="0.0020" gravity="0 0 -9.80665" integrator="implicitfast" iterations="35" ls_iterations="10"/>+  <visual>+    <global offwidth="1920" offheight="1080" fovy="34"/>+    <quality shadowsize="4096" offsamples="4"/>+    <headlight ambient="0.34 0.36 0.40" diffuse="0.46 0.48 0.52" specular="0.22 0.24 0.28"/>+    <rgba haze="0.05 0.075 0.09 1"/>+  </visual>+  <default>+    <joint limited="true" armature="0.0003443" damping="0.006730" frictionloss="0.02400"/>+    <geom condim="3" contype="0" conaffinity="0" friction="0.90 0.005 0.0005"/>+    <motor ctrllimited="true" ctrlrange="-0.420 0.420" gear="1"/>+  </default>+  <asset>+    <texture type="skybox" builtin="gradient" rgb1="0.065 0.095 0.120" rgb2="0.035 0.050 0.065" width="512" height="512"/>+    <texture name="grid_tex" type="2d" builtin="checker" rgb1="0.075 0.105 0.130" rgb2="0.105 0.142 0.178" mark="edge" markrgb="0.18 0.26 0.33" width="512" height="512"/>+    <material name="floor_mat" texture="grid_tex" texrepeat="6 6" texuniform="true" reflectance="0.06"/>+    <material name="mat_goose_white" rgba="0.9450 0.9610 0.9760 1.0000" specular="0.220" shininess="0.420"/>+    <material name="mat_goose_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.280" shininess="0.540"/>+    <material name="mat_carbon_petg" rgba="0.1450 0.1950 0.2750 1.0000" specular="0.380" shininess="0.480"/>+    <material name="mat_xl330_charcoal" rgba="0.0950 0.1220 0.1750 1.0000" specular="0.420" shininess="0.620"/>+    <material name="mat_spine_pcb_emerald" rgba="0.0200 0.5880 0.4120 1.0000" specular="0.350" shininess="0.640"/>+    <material name="mat_gold_pin" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.750" shininess="0.780"/>+    <material name="mat_jst_ivory" rgba="0.8860 0.9100 0.9410 1.0000" specular="0.200" shininess="0.550"/>+    <material name="mat_ic_dark" rgba="0.1100 0.1150 0.1300 1.0000" specular="0.320" shininess="0.640"/>+    <material name="mat_passive_tan" rgba="0.7650 0.6120 0.4040 1.0000" specular="0.250" shininess="0.580"/>+    <material name="mat_led_green" rgba="0.1330 0.9000 0.4200 1.0000" specular="0.250" shininess="0.750"/>+    <material name="mat_radxa_blue" rgba="0.1140 0.3060 0.8470 1.0000" specular="0.340" shininess="0.620"/>+    <material name="mat_battery_pack" rgba="0.1600 0.1680 0.1850 1.0000" specular="0.260" shininess="0.520"/>+    <material name="mat_steel_silver" rgba="0.7960 0.8350 0.8820 1.0000" specular="0.680" shininess="0.750"/>+    <material name="mat_wire_red" rgba="0.9370 0.2670 0.2670 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_black" rgba="0.1450 0.1800 0.2350 1.0000" specular="0.220" shininess="0.640"/>+    <material name="mat_wire_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_yellow" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_green" rgba="0.1330 0.7730 0.3690 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_blue" rgba="0.2310 0.5100 0.9650 1.0000" specular="0.220" shininess="0.660"/>+    <mesh name="mesh_torso_core_cradle" file="stl/torso_core_cradle.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_mezzanine_carrier" file="stl/radxa_mezzanine_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_battery_sled" file="stl/battery_sled.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_left" file="stl/torso_shell_left.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_right" file="stl/torso_shell_right.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_dorsal_hatch" file="stl/torso_dorsal_hatch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_11_neck_pitch" file="parts/hero_meshes/dxl_11_neck_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_spine_pcb_emerald" file="parts/hero_meshes/board_spine_pcb_emerald.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_jst_ivory" file="parts/hero_meshes/board_jst_ivory.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_ic_dark" file="parts/hero_meshes/board_ic_dark.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_passive_tan" file="parts/hero_meshes/board_passive_tan.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_gold_pin" file="parts/hero_meshes/board_gold_pin.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_led_green" file="parts/hero_meshes/board_led_green.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_zero_3w" file="parts/hero_meshes/radxa_zero_3w.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_np_f550_battery" file="parts/hero_meshes/np_f550_battery.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_m25_radxa_screws" file="parts/hero_meshes/m25_radxa_screws.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_a" file="parts/hero_meshes/wire_radxa_link_5v_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_b" file="parts/hero_meshes/wire_radxa_link_5v_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_gnd" file="parts/hero_meshes/wire_radxa_link_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_tx" file="parts/hero_meshes/wire_radxa_link_tx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_rx" file="parts/hero_meshes/wire_radxa_link_rx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_a" file="parts/hero_meshes/wire_battery_vbat_pos_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_b" file="parts/hero_meshes/wire_battery_vbat_pos_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_gnd" file="parts/hero_meshes/wire_battery_vbat_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_gnd" file="parts/hero_meshes/wire_leg_left_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_5v" file="parts/hero_meshes/wire_leg_left_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_data" file="parts/hero_meshes/wire_leg_left_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_gnd" file="parts/hero_meshes/wire_leg_right_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_5v" file="parts/hero_meshes/wire_leg_right_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_data" file="parts/hero_meshes/wire_leg_right_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_01_left_hip_yaw" file="parts/hero_meshes/dxl_01_left_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_yoke" file="stl/left_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_02_left_hip_roll" file="parts/hero_meshes/dxl_02_left_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_roll_clevis" file="stl/left_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_03_left_hip_pitch" file="parts/hero_meshes/dxl_03_left_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_thigh_frame" file="stl/left_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_04_left_knee_pitch" file="parts/hero_meshes/dxl_04_left_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_shank_frame" file="stl/left_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_05_left_ankle_pitch" file="parts/hero_meshes/dxl_05_left_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_foot_sole_cad" file="stl/left_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_06_right_hip_yaw" file="parts/hero_meshes/dxl_06_right_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_yoke" file="stl/right_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_07_right_hip_roll" file="parts/hero_meshes/dxl_07_right_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_roll_clevis" file="stl/right_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_08_right_hip_pitch" file="parts/hero_meshes/dxl_08_right_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_thigh_frame" file="stl/right_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_09_right_knee_pitch" file="parts/hero_meshes/dxl_09_right_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_shank_frame" file="stl/right_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_10_right_ankle_pitch" file="parts/hero_meshes/dxl_10_right_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_foot_sole_cad" file="stl/right_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_s_curve_lower" file="stl/neck_s_curve_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_12_head_pitch" file="parts/hero_meshes/dxl_12_head_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_yaw_collar" file="stl/neck_yaw_collar.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_13_head_yaw" file="parts/hero_meshes/dxl_13_head_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_14_head_roll" file="parts/hero_meshes/dxl_14_head_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_15_beak_pitch" file="parts/hero_meshes/dxl_15_beak_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_shell" file="stl/head_shell.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_upper" file="stl/beak_upper.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_tof_imu_carrier" file="parts/hero_meshes/head_tof_imu_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_lower" file="stl/beak_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>+  </asset>+  <worldbody>+    <light name="key_light" pos="1.1 -1.3 2.1" dir="-0.48 0.52 -0.71" diffuse="0.86 0.87 0.90" specular="0.40 0.42 0.46" castshadow="true"/>+    <light name="fill_light" pos="1.0 1.4 1.4" dir="-0.50 -0.60 -0.62" diffuse="0.46 0.50 0.56" specular="0.18 0.20 0.24" castshadow="false"/>+    <light name="rim_light" pos="-1.2 0.3 1.5" dir="0.66 -0.16 -0.73" diffuse="0.36 0.46 0.58" specular="0.28 0.36 0.46" castshadow="false"/>+    <body name="torso" pos="0.00000 0.00000 0.13500">+      <freejoint name="root_free"/>+      <inertial pos="-0.00227 0.00001 0.01175" mass="0.23745" diaginertia="0.0001776 0.0002506 0.0002443"/>+      <camera name="track_cam" mode="trackcom" pos="0.41 -0.44 0.16" xyaxes="0.731 0.682 0.000 -0.162 0.174 0.971" fovy="33"/>+      <geom name="torso_col" type="box" pos="-0.004 0 0.012" size="0.046 0.036 0.032" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+      <site name="torso_imu" pos="0.00800 0.00000 0.01540" size="0.004" group="4" rgba="0.2 0.8 1.0 0"/>+      <body name="left_hip_yaw_link" pos="0.00000 0.03400 -0.02100">+        <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>+        <joint name="left_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>+        <body name="left_hip_roll_link" pos="0 0 -0.020">+          <inertial pos="0.02460 -0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>+          <joint name="left_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>+          <body name="left_thigh_link" pos="0 0 -0.018">+            <inertial pos="-0.00527 -0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>+            <joint name="left_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>+            <body name="left_shank_link" pos="0 0 -0.033">+              <inertial pos="-0.00637 -0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>+              <joint name="left_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>+              <geom name="left_knee_col" type="sphere" pos="0.004 0 0.002" size="0.012" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+              <body name="left_foot_link" pos="0 0 -0.033">+                <inertial pos="0.00944 0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>+                <joint name="left_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+                <geom name="left_foot_sole" type="box" pos="0.012 0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="left_foot_site" pos="0.012 0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_05_left_ankle_pitch" type="mesh" mesh="mesh_dxl_05_left_ankle_pitch" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_left_foot_sole_cad" type="mesh" mesh="mesh_left_foot_sole_cad" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_04_left_knee_pitch" type="mesh" mesh="mesh_dxl_04_left_knee_pitch" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_left_shank_frame" type="mesh" mesh="mesh_left_shank_frame" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_03_left_hip_pitch" type="mesh" mesh="mesh_dxl_03_left_hip_pitch" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_left_thigh_frame" type="mesh" mesh="mesh_left_thigh_frame" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_dxl_02_left_hip_roll" type="mesh" mesh="mesh_dxl_02_left_hip_roll" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_left_hip_roll_clevis" type="mesh" mesh="mesh_left_hip_roll_clevis" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_dxl_01_left_hip_yaw" type="mesh" mesh="mesh_dxl_01_left_hip_yaw" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_left_hip_yoke" type="mesh" mesh="mesh_left_hip_yoke" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      </body>+      <body name="neck_pitch_link" pos="0.01600 0.00000 0.04100">+        <inertial pos="0.01320 0.00002 0.03726" mass="0.02246" diaginertia="0.0000047 0.0000037 0.0000032"/>+        <joint name="neck_pitch" type="hinge" axis="0.0 1.0 0.0" range="-0.95993 1.13446"/>+        <body name="head_pitch_link" pos="0.0028 0 0.0469">+          <inertial pos="-0.01640 0.00000 0.00530" mass="0.00118" diaginertia="0.0000010 0.0000010 0.0000010"/>+          <joint name="head_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+          <body name="head_yaw_link" pos="0.002 0 0.022">+            <inertial pos="-0.00669 0.00000 0.00253" mass="0.01800" diaginertia="0.0000015 0.0000026 0.0000023"/>+            <joint name="head_yaw" type="hinge" axis="0.0 0.0 1.0" range="-1.39626 1.39626"/>+            <body name="head_roll_link" pos="0.004 0 0.016">+              <inertial pos="-0.00791 0.00001 0.00092" mass="0.06166" diaginertia="0.0000141 0.0000765 0.0000726"/>+              <joint name="head_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.69813 0.69813"/>+              <geom name="head_col" type="box" pos="0.004 0 0.002" size="0.023 0.018 0.020" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+              <site name="head_imu" pos="0.006 0 0.006" size="0.0035" group="4" rgba="0.2 0.9 0.5 0"/>+              <site name="tof_8x8_site" pos="0.0155 0 0.0115" euler="0 1.5707963 0" size="0.0035" group="4" rgba="0.95 0.25 0.35 0"/>+              <body name="beak_link" pos="0.022 0 -0.006">+                <inertial pos="0.01142 0.00000 -0.01153" mass="0.00289" diaginertia="0.0000010 0.0000010 0.0000010"/>+                <joint name="beak_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 0.66323"/>+                <geom name="lower_beak_col" type="box" pos="0.014 0 -0.0015" size="0.015 0.0095 0.0028" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+                <geom name="cad_beak_lower" type="mesh" mesh="mesh_beak_lower" pos="-0.056062 -0.000000 -0.253409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_14_head_roll" type="mesh" mesh="mesh_dxl_14_head_roll" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_dxl_15_beak_pitch" type="mesh" mesh="mesh_dxl_15_beak_pitch" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_shell" type="mesh" mesh="mesh_head_shell" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_beak_upper" type="mesh" mesh="mesh_beak_upper" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_tof_imu_carrier" type="mesh" mesh="mesh_head_tof_imu_carrier" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_13_head_yaw" type="mesh" mesh="mesh_dxl_13_head_yaw" pos="-0.030062 -0.000000 -0.243409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_neck_yaw_collar" type="mesh" mesh="mesh_neck_yaw_collar" pos="-0.028062 -0.000000 -0.221409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_neck_s_curve_lower" type="mesh" mesh="mesh_neck_s_curve_lower" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_dxl_12_head_pitch" type="mesh" mesh="mesh_dxl_12_head_pitch" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+      </body>+      <body name="right_hip_yaw_link" pos="0.00000 -0.03400 -0.02100">+        <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>+        <joint name="right_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>+        <body name="right_hip_roll_link" pos="0 0 -0.020">+          <inertial pos="0.02460 0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>+          <joint name="right_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>+          <body name="right_thigh_link" pos="0 0 -0.018">+            <inertial pos="-0.00527 0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>+            <joint name="right_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>+            <body name="right_shank_link" pos="0 0 -0.033">+              <inertial pos="-0.00637 0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>+              <joint name="right_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>+              <geom name="right_knee_col" type="sphere" pos="0.004 0 0.002" size="0.012" group="3" rgba="0 0 0 0" contype="1" conaffinity="0"/>+              <body name="right_foot_link" pos="0 0 -0.033">+                <inertial pos="0.00944 -0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>+                <joint name="right_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+                <geom name="right_foot_sole" type="box" pos="0.012 -0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="right_foot_site" pos="0.012 -0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_10_right_ankle_pitch" type="mesh" mesh="mesh_dxl_10_right_ankle_pitch" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_right_foot_sole_cad" type="mesh" mesh="mesh_right_foot_sole_cad" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_09_right_knee_pitch" type="mesh" mesh="mesh_dxl_09_right_knee_pitch" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_right_shank_frame" type="mesh" mesh="mesh_right_shank_frame" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_08_right_hip_pitch" type="mesh" mesh="mesh_dxl_08_right_hip_pitch" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_right_thigh_frame" type="mesh" mesh="mesh_right_thigh_frame" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_dxl_07_right_hip_roll" type="mesh" mesh="mesh_dxl_07_right_hip_roll" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_right_hip_roll_clevis" type="mesh" mesh="mesh_right_hip_roll_clevis" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_dxl_06_right_hip_yaw" type="mesh" mesh="mesh_dxl_06_right_hip_yaw" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_right_hip_yoke" type="mesh" mesh="mesh_right_hip_yoke" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      </body>+      <geom name="cad_torso_core_cradle" type="mesh" mesh="mesh_torso_core_cradle" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_mezzanine_carrier" type="mesh" mesh="mesh_radxa_mezzanine_carrier" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_battery_sled" type="mesh" mesh="mesh_battery_sled" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_left" type="mesh" mesh="mesh_torso_shell_left" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_right" type="mesh" mesh="mesh_torso_shell_right" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_dorsal_hatch" type="mesh" mesh="mesh_torso_dorsal_hatch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_dxl_11_neck_pitch" type="mesh" mesh="mesh_dxl_11_neck_pitch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_spine_pcb_emerald" type="mesh" mesh="mesh_board_spine_pcb_emerald" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_jst_ivory" type="mesh" mesh="mesh_board_jst_ivory" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_jst_ivory" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_ic_dark" type="mesh" mesh="mesh_board_ic_dark" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_ic_dark" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_passive_tan" type="mesh" mesh="mesh_board_passive_tan" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_passive_tan" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_gold_pin" type="mesh" mesh="mesh_board_gold_pin" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_gold_pin" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_led_green" type="mesh" mesh="mesh_board_led_green" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_led_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_zero_3w" type="mesh" mesh="mesh_radxa_zero_3w" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_radxa_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_np_f550_battery" type="mesh" mesh="mesh_np_f550_battery" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_battery_pack" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_m25_radxa_screws" type="mesh" mesh="mesh_m25_radxa_screws" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_steel_silver" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_a" type="mesh" mesh="mesh_wire_radxa_link_5v_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_b" type="mesh" mesh="mesh_wire_radxa_link_5v_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_gnd" type="mesh" mesh="mesh_wire_radxa_link_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_tx" type="mesh" mesh="mesh_wire_radxa_link_tx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_rx" type="mesh" mesh="mesh_wire_radxa_link_rx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_a" type="mesh" mesh="mesh_wire_battery_vbat_pos_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_b" type="mesh" mesh="mesh_wire_battery_vbat_pos_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_gnd" type="mesh" mesh="mesh_wire_battery_vbat_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_gnd" type="mesh" mesh="mesh_wire_leg_left_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_5v" type="mesh" mesh="mesh_wire_leg_left_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_data" type="mesh" mesh="mesh_wire_leg_left_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_gnd" type="mesh" mesh="mesh_wire_leg_right_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_5v" type="mesh" mesh="mesh_wire_leg_right_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_data" type="mesh" mesh="mesh_wire_leg_right_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>+    </body>+  </worldbody>+  <actuator>+    <motor name="act_left_hip_yaw" joint="left_hip_yaw"/>+    <motor name="act_left_hip_roll" joint="left_hip_roll"/>+    <motor name="act_left_hip_pitch" joint="left_hip_pitch"/>+    <motor name="act_left_knee_pitch" joint="left_knee_pitch"/>+    <motor name="act_left_ankle_pitch" joint="left_ankle_pitch"/>+    <motor name="act_neck_pitch" joint="neck_pitch"/>+    <motor name="act_head_pitch" joint="head_pitch"/>+    <motor name="act_head_yaw" joint="head_yaw"/>+    <motor name="act_head_roll" joint="head_roll"/>+    <motor name="act_right_hip_yaw" joint="right_hip_yaw"/>+    <motor name="act_right_hip_roll" joint="right_hip_roll"/>+    <motor name="act_right_hip_pitch" joint="right_hip_pitch"/>+    <motor name="act_right_knee_pitch" joint="right_knee_pitch"/>+    <motor name="act_right_ankle_pitch" joint="right_ankle_pitch"/>+    <motor name="act_beak_pitch" joint="beak_pitch"/>+  </actuator>+  <sensor>+    <gyro name="torso_gyro" site="torso_imu"/>+    <accelerometer name="torso_accel" site="torso_imu"/>+    <framequat name="torso_quat" objtype="site" objname="torso_imu"/>+    <gyro name="head_gyro" site="head_imu"/>+    <accelerometer name="head_accel" site="head_imu"/>+    <rangefinder name="tof_8x8_center" site="tof_8x8_site" cutoff="4.0"/>+  </sensor>+  <keyframe>+    <key name="standing" qpos="0.00000 0.00000 0.13500 1.00000 0.00000 0.00000 0.00000 0.00000 0.00000 -0.35000 0.70000 -0.35000 0.20000 -0.20000 0.00000 0.00000 0.05000 0.00000 0.00000 -0.35000 0.70000 -0.35000"/>+  </keyframe>+</mujoco>
rl/assets/microgoose_walk.xmladded+265
@@ -0,0 +1,265 @@+<?xml version="1.0" ?>+<mujoco model="microgoose">+  <compiler angle="radian" coordinate="local" inertiafromgeom="false" autolimits="true" meshdir="../../mechanical"/>+  <option timestep="0.0020" gravity="0 0 -9.80665" integrator="implicitfast" iterations="35" ls_iterations="10"/>+  <visual>+    <global offwidth="1920" offheight="1080" fovy="34"/>+    <quality shadowsize="4096" offsamples="4"/>+    <headlight ambient="0.34 0.36 0.40" diffuse="0.46 0.48 0.52" specular="0.22 0.24 0.28"/>+    <rgba haze="0.05 0.075 0.09 1"/>+  </visual>+  <default>+    <joint limited="true" armature="0.0003443" damping="0.006730" frictionloss="0.02400"/>+    <geom condim="3" contype="0" conaffinity="0" friction="0.90 0.005 0.0005"/>+    <motor ctrllimited="true" ctrlrange="-0.420 0.420" gear="1"/>+  </default>+  <asset>+    <texture type="skybox" builtin="gradient" rgb1="0.065 0.095 0.120" rgb2="0.035 0.050 0.065" width="512" height="512"/>+    <texture name="grid_tex" type="2d" builtin="checker" rgb1="0.075 0.105 0.130" rgb2="0.105 0.142 0.178" mark="edge" markrgb="0.18 0.26 0.33" width="512" height="512"/>+    <material name="floor_mat" texture="grid_tex" texrepeat="6 6" texuniform="true" reflectance="0.06"/>+    <material name="mat_goose_white" rgba="0.9450 0.9610 0.9760 1.0000" specular="0.220" shininess="0.420"/>+    <material name="mat_goose_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.280" shininess="0.540"/>+    <material name="mat_carbon_petg" rgba="0.1450 0.1950 0.2750 1.0000" specular="0.380" shininess="0.480"/>+    <material name="mat_xl330_charcoal" rgba="0.0950 0.1220 0.1750 1.0000" specular="0.420" shininess="0.620"/>+    <material name="mat_spine_pcb_emerald" rgba="0.0200 0.5880 0.4120 1.0000" specular="0.350" shininess="0.640"/>+    <material name="mat_gold_pin" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.750" shininess="0.780"/>+    <material name="mat_jst_ivory" rgba="0.8860 0.9100 0.9410 1.0000" specular="0.200" shininess="0.550"/>+    <material name="mat_ic_dark" rgba="0.1100 0.1150 0.1300 1.0000" specular="0.320" shininess="0.640"/>+    <material name="mat_passive_tan" rgba="0.7650 0.6120 0.4040 1.0000" specular="0.250" shininess="0.580"/>+    <material name="mat_led_green" rgba="0.1330 0.9000 0.4200 1.0000" specular="0.250" shininess="0.750"/>+    <material name="mat_radxa_blue" rgba="0.1140 0.3060 0.8470 1.0000" specular="0.340" shininess="0.620"/>+    <material name="mat_battery_pack" rgba="0.1600 0.1680 0.1850 1.0000" specular="0.260" shininess="0.520"/>+    <material name="mat_steel_silver" rgba="0.7960 0.8350 0.8820 1.0000" specular="0.680" shininess="0.750"/>+    <material name="mat_wire_red" rgba="0.9370 0.2670 0.2670 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_black" rgba="0.1450 0.1800 0.2350 1.0000" specular="0.220" shininess="0.640"/>+    <material name="mat_wire_orange" rgba="0.9760 0.4510 0.0860 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_yellow" rgba="0.9180 0.7020 0.0310 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_green" rgba="0.1330 0.7730 0.3690 1.0000" specular="0.220" shininess="0.660"/>+    <material name="mat_wire_blue" rgba="0.2310 0.5100 0.9650 1.0000" specular="0.220" shininess="0.660"/>+    <mesh name="mesh_torso_core_cradle" file="stl/torso_core_cradle.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_mezzanine_carrier" file="stl/radxa_mezzanine_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_battery_sled" file="stl/battery_sled.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_left" file="stl/torso_shell_left.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_shell_right" file="stl/torso_shell_right.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_torso_dorsal_hatch" file="stl/torso_dorsal_hatch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_11_neck_pitch" file="parts/hero_meshes/dxl_11_neck_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_spine_pcb_emerald" file="parts/hero_meshes/board_spine_pcb_emerald.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_jst_ivory" file="parts/hero_meshes/board_jst_ivory.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_ic_dark" file="parts/hero_meshes/board_ic_dark.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_passive_tan" file="parts/hero_meshes/board_passive_tan.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_gold_pin" file="parts/hero_meshes/board_gold_pin.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_board_led_green" file="parts/hero_meshes/board_led_green.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_radxa_zero_3w" file="parts/hero_meshes/radxa_zero_3w.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_np_f550_battery" file="parts/hero_meshes/np_f550_battery.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_m25_radxa_screws" file="parts/hero_meshes/m25_radxa_screws.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_a" file="parts/hero_meshes/wire_radxa_link_5v_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_5v_b" file="parts/hero_meshes/wire_radxa_link_5v_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_gnd" file="parts/hero_meshes/wire_radxa_link_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_tx" file="parts/hero_meshes/wire_radxa_link_tx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_radxa_link_rx" file="parts/hero_meshes/wire_radxa_link_rx.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_a" file="parts/hero_meshes/wire_battery_vbat_pos_a.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_pos_b" file="parts/hero_meshes/wire_battery_vbat_pos_b.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_battery_vbat_gnd" file="parts/hero_meshes/wire_battery_vbat_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_gnd" file="parts/hero_meshes/wire_leg_left_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_5v" file="parts/hero_meshes/wire_leg_left_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_left_dxl_data" file="parts/hero_meshes/wire_leg_left_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_gnd" file="parts/hero_meshes/wire_leg_right_dxl_gnd.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_5v" file="parts/hero_meshes/wire_leg_right_dxl_5v.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_wire_leg_right_dxl_data" file="parts/hero_meshes/wire_leg_right_dxl_data.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_01_left_hip_yaw" file="parts/hero_meshes/dxl_01_left_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_yoke" file="stl/left_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_02_left_hip_roll" file="parts/hero_meshes/dxl_02_left_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_hip_roll_clevis" file="stl/left_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_03_left_hip_pitch" file="parts/hero_meshes/dxl_03_left_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_thigh_frame" file="stl/left_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_04_left_knee_pitch" file="parts/hero_meshes/dxl_04_left_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_shank_frame" file="stl/left_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_05_left_ankle_pitch" file="parts/hero_meshes/dxl_05_left_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_left_foot_sole_cad" file="stl/left_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_06_right_hip_yaw" file="parts/hero_meshes/dxl_06_right_hip_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_yoke" file="stl/right_hip_yoke.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_07_right_hip_roll" file="parts/hero_meshes/dxl_07_right_hip_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_hip_roll_clevis" file="stl/right_hip_roll_clevis.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_08_right_hip_pitch" file="parts/hero_meshes/dxl_08_right_hip_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_thigh_frame" file="stl/right_thigh_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_09_right_knee_pitch" file="parts/hero_meshes/dxl_09_right_knee_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_shank_frame" file="stl/right_shank_frame.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_10_right_ankle_pitch" file="parts/hero_meshes/dxl_10_right_ankle_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_right_foot_sole_cad" file="stl/right_foot_sole.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_s_curve_lower" file="stl/neck_s_curve_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_12_head_pitch" file="parts/hero_meshes/dxl_12_head_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_neck_yaw_collar" file="stl/neck_yaw_collar.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_13_head_yaw" file="parts/hero_meshes/dxl_13_head_yaw.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_14_head_roll" file="parts/hero_meshes/dxl_14_head_roll.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_dxl_15_beak_pitch" file="parts/hero_meshes/dxl_15_beak_pitch.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_shell" file="stl/head_shell.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_upper" file="stl/beak_upper.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_head_tof_imu_carrier" file="parts/hero_meshes/head_tof_imu_carrier.stl" scale="0.001 0.001 0.001" inertia="shell"/>+    <mesh name="mesh_beak_lower" file="stl/beak_lower.stl" scale="0.001 0.001 0.001" inertia="shell"/>+  </asset>+  <worldbody>+    <light name="key_light" pos="1.1 -1.3 2.1" dir="-0.48 0.52 -0.71" diffuse="0.86 0.87 0.90" specular="0.40 0.42 0.46" castshadow="true"/>+    <light name="fill_light" pos="1.0 1.4 1.4" dir="-0.50 -0.60 -0.62" diffuse="0.46 0.50 0.56" specular="0.18 0.20 0.24" castshadow="false"/>+    <light name="rim_light" pos="-1.2 0.3 1.5" dir="0.66 -0.16 -0.73" diffuse="0.36 0.46 0.58" specular="0.28 0.36 0.46" castshadow="false"/>+    <body name="torso" pos="0.00000 0.00000 0.13500">+      <freejoint name="root_free"/>+      <inertial pos="-0.00227 0.00001 0.01175" mass="0.23745" diaginertia="0.0001776 0.0002506 0.0002443"/>+      <camera name="track_cam" mode="trackcom" pos="0.41 -0.44 0.16" xyaxes="0.731 0.682 0.000 -0.162 0.174 0.971" fovy="33"/>+      <site name="torso_imu" pos="0.00800 0.00000 0.01540" size="0.004" group="4" rgba="0.2 0.8 1.0 0"/>+      <body name="left_hip_yaw_link" pos="0.00000 0.03400 -0.02100">+        <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>+        <joint name="left_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>+        <body name="left_hip_roll_link" pos="0 0 -0.020">+          <inertial pos="0.02460 -0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>+          <joint name="left_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>+          <body name="left_thigh_link" pos="0 0 -0.018">+            <inertial pos="-0.00527 -0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>+            <joint name="left_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>+            <body name="left_shank_link" pos="0 0 -0.033">+              <inertial pos="-0.00637 -0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>+              <joint name="left_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>+              <body name="left_foot_link" pos="0 0 -0.033">+                <inertial pos="0.00944 0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>+                <joint name="left_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+                <geom name="left_foot_sole" type="box" pos="0.012 0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="left_foot_site" pos="0.012 0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_05_left_ankle_pitch" type="mesh" mesh="mesh_dxl_05_left_ankle_pitch" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_left_foot_sole_cad" type="mesh" mesh="mesh_left_foot_sole_cad" pos="0.000000 -0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_04_left_knee_pitch" type="mesh" mesh="mesh_dxl_04_left_knee_pitch" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_left_shank_frame" type="mesh" mesh="mesh_left_shank_frame" pos="0.004801 -0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_03_left_hip_pitch" type="mesh" mesh="mesh_dxl_03_left_hip_pitch" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_left_thigh_frame" type="mesh" mesh="mesh_left_thigh_frame" pos="-0.026060 -0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_dxl_02_left_hip_roll" type="mesh" mesh="mesh_dxl_02_left_hip_roll" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_left_hip_roll_clevis" type="mesh" mesh="mesh_left_hip_roll_clevis" pos="-0.000000 -0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_dxl_01_left_hip_yaw" type="mesh" mesh="mesh_dxl_01_left_hip_yaw" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_left_hip_yoke" type="mesh" mesh="mesh_left_hip_yoke" pos="-0.000000 -0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      </body>+      <body name="neck_pitch_link" pos="0.01600 0.00000 0.04100">+        <inertial pos="0.01320 0.00002 0.03726" mass="0.02246" diaginertia="0.0000047 0.0000037 0.0000032"/>+        <joint name="neck_pitch" type="hinge" axis="0.0 1.0 0.0" range="-0.95993 1.13446"/>+        <body name="head_pitch_link" pos="0.0028 0 0.0469">+          <inertial pos="-0.01640 0.00000 0.00530" mass="0.00118" diaginertia="0.0000010 0.0000010 0.0000010"/>+          <joint name="head_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+          <body name="head_yaw_link" pos="0.002 0 0.022">+            <inertial pos="-0.00669 0.00000 0.00253" mass="0.01800" diaginertia="0.0000015 0.0000026 0.0000023"/>+            <joint name="head_yaw" type="hinge" axis="0.0 0.0 1.0" range="-1.39626 1.39626"/>+            <body name="head_roll_link" pos="0.004 0 0.016">+              <inertial pos="-0.00791 0.00001 0.00092" mass="0.06166" diaginertia="0.0000141 0.0000765 0.0000726"/>+              <joint name="head_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.69813 0.69813"/>+              <site name="head_imu" pos="0.006 0 0.006" size="0.0035" group="4" rgba="0.2 0.9 0.5 0"/>+              <site name="tof_8x8_site" pos="0.0155 0 0.0115" euler="0 1.5707963 0" size="0.0035" group="4" rgba="0.95 0.25 0.35 0"/>+              <body name="beak_link" pos="0.022 0 -0.006">+                <inertial pos="0.01142 0.00000 -0.01153" mass="0.00289" diaginertia="0.0000010 0.0000010 0.0000010"/>+                <joint name="beak_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 0.66323"/>+                <geom name="cad_beak_lower" type="mesh" mesh="mesh_beak_lower" pos="-0.056062 -0.000000 -0.253409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_14_head_roll" type="mesh" mesh="mesh_dxl_14_head_roll" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_dxl_15_beak_pitch" type="mesh" mesh="mesh_dxl_15_beak_pitch" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_shell" type="mesh" mesh="mesh_head_shell" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_beak_upper" type="mesh" mesh="mesh_beak_upper" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_head_tof_imu_carrier" type="mesh" mesh="mesh_head_tof_imu_carrier" pos="-0.034062 -0.000000 -0.259409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_13_head_yaw" type="mesh" mesh="mesh_dxl_13_head_yaw" pos="-0.030062 -0.000000 -0.243409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_neck_yaw_collar" type="mesh" mesh="mesh_neck_yaw_collar" pos="-0.028062 -0.000000 -0.221409" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_neck_s_curve_lower" type="mesh" mesh="mesh_neck_s_curve_lower" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_dxl_12_head_pitch" type="mesh" mesh="mesh_dxl_12_head_pitch" pos="0.019285 -0.000000 -0.175670" quat="0.995004 0.000000 -0.099833 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+      </body>+      <body name="right_hip_yaw_link" pos="0.00000 -0.03400 -0.02100">+        <inertial pos="-0.00359 0.00000 0.01231" mass="0.02041" diaginertia="0.0000023 0.0000051 0.0000041"/>+        <joint name="right_hip_yaw" type="hinge" axis="0.0 0.0 1.0" range="-0.78540 0.78540"/>+        <body name="right_hip_roll_link" pos="0 0 -0.020">+          <inertial pos="0.02460 0.00592 -0.00078" mass="0.02035" diaginertia="0.0000030 0.0000027 0.0000040"/>+          <joint name="right_hip_roll" type="hinge" axis="1.0 0.0 0.0" range="-0.61087 0.61087"/>+          <body name="right_thigh_link" pos="0 0 -0.018">+            <inertial pos="-0.00527 0.00394 -0.00326" mass="0.01938" diaginertia="0.0000074 0.0000029 0.0000081"/>+            <joint name="right_hip_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.30900 1.30900"/>+            <body name="right_shank_link" pos="0 0 -0.033">+              <inertial pos="-0.00637 0.00407 0.00093" mass="0.01945" diaginertia="0.0000076 0.0000029 0.0000079"/>+              <joint name="right_knee_pitch" type="hinge" axis="0.0 1.0 0.0" range="0.00000 1.91986"/>+              <body name="right_foot_link" pos="0 0 -0.033">+                <inertial pos="0.00944 -0.00048 -0.00262" mass="0.02367" diaginertia="0.0000031 0.0000059 0.0000067"/>+                <joint name="right_ankle_pitch" type="hinge" axis="0.0 1.0 0.0" range="-1.13446 1.13446"/>+                <geom name="right_foot_sole" type="box" pos="0.012 -0.0040 -0.010" size="0.044 0.023 0.004" group="3" rgba="0 0 0 0" contype="3" conaffinity="2" friction="0.95 0.008 0.0008"/>+                <site name="right_foot_site" pos="0.012 -0.0040 -0.014" size="0.004" group="4" rgba="1.0 0.6 0.1 0"/>+                <geom name="cad_dxl_10_right_ankle_pitch" type="mesh" mesh="mesh_dxl_10_right_ankle_pitch" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+                <geom name="cad_right_foot_sole_cad" type="mesh" mesh="mesh_right_foot_sole_cad" pos="0.000000 0.034000 -0.014001" quat="1.000000 0.000000 -0.000000 0.000000" material="mat_goose_orange" group="0" contype="0" conaffinity="0"/>+              </body>+              <geom name="cad_dxl_09_right_knee_pitch" type="mesh" mesh="mesh_dxl_09_right_knee_pitch" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+              <geom name="cad_right_shank_frame" type="mesh" mesh="mesh_right_shank_frame" pos="0.004801 0.034000 -0.046153" quat="0.984727 0.000000 -0.174108 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+            </body>+            <geom name="cad_dxl_08_right_hip_pitch" type="mesh" mesh="mesh_dxl_08_right_hip_pitch" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+            <geom name="cad_right_thigh_frame" type="mesh" mesh="mesh_right_thigh_frame" pos="-0.026060 0.034000 -0.071392" quat="0.984727 -0.000000 0.174108 -0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+          </body>+          <geom name="cad_dxl_07_right_hip_roll" type="mesh" mesh="mesh_dxl_07_right_hip_roll" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+          <geom name="cad_right_hip_roll_clevis" type="mesh" mesh="mesh_right_hip_roll_clevis" pos="-0.000000 0.034000 -0.094000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+        </body>+        <geom name="cad_dxl_06_right_hip_yaw" type="mesh" mesh="mesh_dxl_06_right_hip_yaw" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+        <geom name="cad_right_hip_yoke" type="mesh" mesh="mesh_right_hip_yoke" pos="-0.000000 0.034000 -0.114000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      </body>+      <geom name="cad_torso_core_cradle" type="mesh" mesh="mesh_torso_core_cradle" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_mezzanine_carrier" type="mesh" mesh="mesh_radxa_mezzanine_carrier" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_battery_sled" type="mesh" mesh="mesh_battery_sled" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_carbon_petg" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_left" type="mesh" mesh="mesh_torso_shell_left" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_shell_right" type="mesh" mesh="mesh_torso_shell_right" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_torso_dorsal_hatch" type="mesh" mesh="mesh_torso_dorsal_hatch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_goose_white" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_dxl_11_neck_pitch" type="mesh" mesh="mesh_dxl_11_neck_pitch" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_xl330_charcoal" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_spine_pcb_emerald" type="mesh" mesh="mesh_board_spine_pcb_emerald" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_spine_pcb_emerald" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_jst_ivory" type="mesh" mesh="mesh_board_jst_ivory" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_jst_ivory" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_ic_dark" type="mesh" mesh="mesh_board_ic_dark" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_ic_dark" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_passive_tan" type="mesh" mesh="mesh_board_passive_tan" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_passive_tan" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_gold_pin" type="mesh" mesh="mesh_board_gold_pin" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_gold_pin" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_board_led_green" type="mesh" mesh="mesh_board_led_green" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_led_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_radxa_zero_3w" type="mesh" mesh="mesh_radxa_zero_3w" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_radxa_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_np_f550_battery" type="mesh" mesh="mesh_np_f550_battery" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_battery_pack" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_m25_radxa_screws" type="mesh" mesh="mesh_m25_radxa_screws" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_steel_silver" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_a" type="mesh" mesh="mesh_wire_radxa_link_5v_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_5v_b" type="mesh" mesh="mesh_wire_radxa_link_5v_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_gnd" type="mesh" mesh="mesh_wire_radxa_link_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_tx" type="mesh" mesh="mesh_wire_radxa_link_tx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_green" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_radxa_link_rx" type="mesh" mesh="mesh_wire_radxa_link_rx" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_blue" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_a" type="mesh" mesh="mesh_wire_battery_vbat_pos_a" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_pos_b" type="mesh" mesh="mesh_wire_battery_vbat_pos_b" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_orange" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_battery_vbat_gnd" type="mesh" mesh="mesh_wire_battery_vbat_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_gnd" type="mesh" mesh="mesh_wire_leg_left_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_5v" type="mesh" mesh="mesh_wire_leg_left_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_left_dxl_data" type="mesh" mesh="mesh_wire_leg_left_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_gnd" type="mesh" mesh="mesh_wire_leg_right_dxl_gnd" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_black" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_5v" type="mesh" mesh="mesh_wire_leg_right_dxl_5v" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_red" group="0" contype="0" conaffinity="0"/>+      <geom name="cad_wire_leg_right_dxl_data" type="mesh" mesh="mesh_wire_leg_right_dxl_data" pos="-0.000000 -0.000000 -0.135000" quat="1.000000 0.000000 0.000000 0.000000" material="mat_wire_yellow" group="0" contype="0" conaffinity="0"/>+    </body>+  </worldbody>+  <actuator>+    <motor name="act_left_hip_yaw" joint="left_hip_yaw"/>+    <motor name="act_left_hip_roll" joint="left_hip_roll"/>+    <motor name="act_left_hip_pitch" joint="left_hip_pitch"/>+    <motor name="act_left_knee_pitch" joint="left_knee_pitch"/>+    <motor name="act_left_ankle_pitch" joint="left_ankle_pitch"/>+    <motor name="act_neck_pitch" joint="neck_pitch"/>+    <motor name="act_head_pitch" joint="head_pitch"/>+    <motor name="act_head_yaw" joint="head_yaw"/>+    <motor name="act_head_roll" joint="head_roll"/>+    <motor name="act_right_hip_yaw" joint="right_hip_yaw"/>+    <motor name="act_right_hip_roll" joint="right_hip_roll"/>+    <motor name="act_right_hip_pitch" joint="right_hip_pitch"/>+    <motor name="act_right_knee_pitch" joint="right_knee_pitch"/>+    <motor name="act_right_ankle_pitch" joint="right_ankle_pitch"/>+    <motor name="act_beak_pitch" joint="beak_pitch"/>+  </actuator>+  <sensor>+    <gyro name="torso_gyro" site="torso_imu"/>+    <accelerometer name="torso_accel" site="torso_imu"/>+    <framequat name="torso_quat" objtype="site" objname="torso_imu"/>+    <gyro name="head_gyro" site="head_imu"/>+    <accelerometer name="head_accel" site="head_imu"/>+    <rangefinder name="tof_8x8_center" site="tof_8x8_site" cutoff="4.0"/>+  </sensor>+  <keyframe>+    <key name="standing" qpos="0.00000 0.00000 0.13500 1.00000 0.00000 0.00000 0.00000 0.00000 0.00000 -0.35000 0.70000 -0.35000 0.20000 -0.20000 0.00000 0.00000 0.05000 0.00000 0.00000 -0.35000 0.70000 -0.35000"/>+  </keyframe>+</mujoco>
rl/build_mjcf.py+731−499
@@ -1,10 +1,20 @@ #!/usr/bin/env python3-"""Generate Microgoose MuJoCo MJCF (microgoose.xml) and URDF (microgoose.urdf).--Reads design/mechanical-interface.json, optional mechanical/kinematics_mass_props.json,-and fitted BAM actuator parameters in rl/bam/xl330_bam_params.json to emit consistent-15-DoF kinematic and dynamic models (14 locomotion joints + 1 hinged beak_pitch joint)-totaling ~0.620 kg and standing 282.0 mm tall with webbed feet flat on z = 0.+"""Generate CAD-Exact Microgoose MuJoCo MJCF (microgoose.xml) and URDF (microgoose.urdf).++Reads:+  - design/mechanical-interface.json+  - mechanical/kinematics_mass_props.json (exact OCCT CAD mass, CoM, inertia tensors)+  - rl/bam/xl330_bam_params.json (fitted Rhoban/BAM XL330 actuator dynamics)+  - All 21 robot printed part STLs in mechanical/stl/*.stl (Plates 1, 2, 3)+  - All 15 XL330 servo STLs, Spine PCB STLs, Radxa Zero 3W, NP-F550 battery, ToF/IMU carrier,+    M2.5 screws, and torso wire harness STLs in mechanical/parts/hero_meshes/*.stl++Emits:+  - rl/assets/microgoose.xml: 100% CAD-exact visual meshes in group=0 (zero visible primitive+    capsules, boxes, or spheres), with convex floor-contact proxies hidden in group=3 (rgba alpha=0)+    so contact physics and policy trajectories remain bit-for-bit identical.+  - rl/assets/microgoose.urdf + rl/assets/obj/*.obj/.mtl: 100% CAD-exact visual OBJ+MTL meshes for+    MIT/TRI Drake 1.58 RenderEngineVtk and Isaac Lab / URDF pipelines. """  from __future__ import annotations@@ -12,12 +22,14 @@ from __future__ import annotations import json import math from pathlib import Path-from typing import Any, Dict, List+from typing import Any, Dict, List, Tuple import xml.dom.minidom as minidom import xml.etree.ElementTree as ET  import mujoco import numpy as np+from scipy.spatial.transform import Rotation as Rot+import trimesh   ROOT_DIR = Path(__file__).resolve().parents[1]@@ -26,13 +38,124 @@ CAD_MASS_PROPS_PATH = ROOT_DIR / "mechanical" / "kinematics_mass_props.json" BAM_PARAMS_PATH = ROOT_DIR / "rl" / "bam" / "xl330_bam_params.json" OUT_MJCF_PATH = ROOT_DIR / "rl" / "assets" / "microgoose.xml" OUT_URDF_PATH = ROOT_DIR / "rl" / "assets" / "microgoose.urdf"+OUT_OBJ_DIR = ROOT_DIR / "rl" / "assets" / "obj" -# Torso frame origin in standing robot coordinates (m above z=0 sole plane) TORSO_ORIGIN_M = np.array([0.0, 0.0, 0.135], dtype=np.float64) +# Exact PBR materials matching mechanical/build_hero_glb.py+CAD_MATERIALS: Dict[str, Dict[str, Any]] = {+    "goose_white": {"rgba": [0.945, 0.961, 0.976, 1.0], "specular": 0.22, "shininess": 0.42},+    "goose_orange": {"rgba": [0.976, 0.451, 0.086, 1.0], "specular": 0.28, "shininess": 0.54},+    "carbon_petg": {"rgba": [0.145, 0.195, 0.275, 1.0], "specular": 0.38, "shininess": 0.48},+    "xl330_charcoal": {"rgba": [0.095, 0.122, 0.175, 1.0], "specular": 0.42, "shininess": 0.62},+    "spine_pcb_emerald": {"rgba": [0.020, 0.588, 0.412, 1.0], "specular": 0.35, "shininess": 0.64},+    "gold_pin": {"rgba": [0.918, 0.702, 0.031, 1.0], "specular": 0.75, "shininess": 0.78},+    "jst_ivory": {"rgba": [0.886, 0.910, 0.941, 1.0], "specular": 0.20, "shininess": 0.55},+    "ic_dark": {"rgba": [0.110, 0.115, 0.130, 1.0], "specular": 0.32, "shininess": 0.64},+    "passive_tan": {"rgba": [0.765, 0.612, 0.404, 1.0], "specular": 0.25, "shininess": 0.58},+    "led_green": {"rgba": [0.133, 0.900, 0.420, 1.0], "specular": 0.25, "shininess": 0.75},+    "radxa_blue": {"rgba": [0.114, 0.306, 0.847, 1.0], "specular": 0.34, "shininess": 0.62},+    "battery_pack": {"rgba": [0.160, 0.168, 0.185, 1.0], "specular": 0.26, "shininess": 0.52},+    "steel_silver": {"rgba": [0.796, 0.835, 0.882, 1.0], "specular": 0.68, "shininess": 0.75},+    "wire_red": {"rgba": [0.937, 0.267, 0.267, 1.0], "specular": 0.22, "shininess": 0.66},+    "wire_black": {"rgba": [0.145, 0.180, 0.235, 1.0], "specular": 0.22, "shininess": 0.64},+    "wire_orange": {"rgba": [0.976, 0.451, 0.086, 1.0], "specular": 0.22, "shininess": 0.66},+    "wire_yellow": {"rgba": [0.918, 0.702, 0.031, 1.0], "specular": 0.22, "shininess": 0.66},+    "wire_green": {"rgba": [0.133, 0.773, 0.369, 1.0], "specular": 0.22, "shininess": 0.66},+    "wire_blue": {"rgba": [0.231, 0.510, 0.965, 1.0], "specular": 0.22, "shininess": 0.66},+}++# Authoritative CAD mesh -> kinematic link & material assignment matching mechanical/build_microgoose_cad.py.+# All paths are relative to mechanical/ (used directly via meshdir="../../mechanical" in MJCF).+CAD_VISUAL_ITEMS: List[Tuple[str, str, str, str]] = [+    # --- Torso printed parts (6) ---+    ("torso_core_cradle", "stl/torso_core_cradle.stl", "torso", "carbon_petg"),+    ("radxa_mezzanine_carrier", "stl/radxa_mezzanine_carrier.stl", "torso", "carbon_petg"),+    ("battery_sled", "stl/battery_sled.stl", "torso", "carbon_petg"),+    ("torso_shell_left", "stl/torso_shell_left.stl", "torso", "goose_white"),+    ("torso_shell_right", "stl/torso_shell_right.stl", "torso", "goose_white"),+    ("torso_dorsal_hatch", "stl/torso_dorsal_hatch.stl", "torso", "goose_white"),+    # --- Torso electronics, Spine PCB, screws, neck servo, & internal harnesses ---+    ("dxl_11_neck_pitch", "parts/hero_meshes/dxl_11_neck_pitch.stl", "torso", "xl330_charcoal"),+    ("board_spine_pcb_emerald", "parts/hero_meshes/board_spine_pcb_emerald.stl", "torso", "spine_pcb_emerald"),+    ("board_jst_ivory", "parts/hero_meshes/board_jst_ivory.stl", "torso", "jst_ivory"),+    ("board_ic_dark", "parts/hero_meshes/board_ic_dark.stl", "torso", "ic_dark"),+    ("board_passive_tan", "parts/hero_meshes/board_passive_tan.stl", "torso", "passive_tan"),+    ("board_gold_pin", "parts/hero_meshes/board_gold_pin.stl", "torso", "gold_pin"),+    ("board_led_green", "parts/hero_meshes/board_led_green.stl", "torso", "led_green"),+    ("radxa_zero_3w", "parts/hero_meshes/radxa_zero_3w.stl", "torso", "radxa_blue"),+    ("np_f550_battery", "parts/hero_meshes/np_f550_battery.stl", "torso", "battery_pack"),+    ("m25_radxa_screws", "parts/hero_meshes/m25_radxa_screws.stl", "torso", "steel_silver"),+    ("wire_radxa_link_5v_a", "parts/hero_meshes/wire_radxa_link_5v_a.stl", "torso", "wire_red"),+    ("wire_radxa_link_5v_b", "parts/hero_meshes/wire_radxa_link_5v_b.stl", "torso", "wire_orange"),+    ("wire_radxa_link_gnd", "parts/hero_meshes/wire_radxa_link_gnd.stl", "torso", "wire_black"),+    ("wire_radxa_link_tx", "parts/hero_meshes/wire_radxa_link_tx.stl", "torso", "wire_green"),+    ("wire_radxa_link_rx", "parts/hero_meshes/wire_radxa_link_rx.stl", "torso", "wire_blue"),+    ("wire_battery_vbat_pos_a", "parts/hero_meshes/wire_battery_vbat_pos_a.stl", "torso", "wire_red"),+    ("wire_battery_vbat_pos_b", "parts/hero_meshes/wire_battery_vbat_pos_b.stl", "torso", "wire_orange"),+    ("wire_battery_vbat_gnd", "parts/hero_meshes/wire_battery_vbat_gnd.stl", "torso", "wire_black"),+    ("wire_leg_left_dxl_gnd", "parts/hero_meshes/wire_leg_left_dxl_gnd.stl", "torso", "wire_black"),+    ("wire_leg_left_dxl_5v", "parts/hero_meshes/wire_leg_left_dxl_5v.stl", "torso", "wire_red"),+    ("wire_leg_left_dxl_data", "parts/hero_meshes/wire_leg_left_dxl_data.stl", "torso", "wire_yellow"),+    ("wire_leg_right_dxl_gnd", "parts/hero_meshes/wire_leg_right_dxl_gnd.stl", "torso", "wire_black"),+    ("wire_leg_right_dxl_5v", "parts/hero_meshes/wire_leg_right_dxl_5v.stl", "torso", "wire_red"),+    ("wire_leg_right_dxl_data", "parts/hero_meshes/wire_leg_right_dxl_data.stl", "torso", "wire_yellow"),+    # --- Left leg (5 printed parts + 5 XL330 servos) ---+    ("dxl_01_left_hip_yaw", "parts/hero_meshes/dxl_01_left_hip_yaw.stl", "left_hip_yaw_link", "xl330_charcoal"),+    ("left_hip_yoke", "stl/left_hip_yoke.stl", "left_hip_yaw_link", "carbon_petg"),+    ("dxl_02_left_hip_roll", "parts/hero_meshes/dxl_02_left_hip_roll.stl", "left_hip_roll_link", "xl330_charcoal"),+    ("left_hip_roll_clevis", "stl/left_hip_roll_clevis.stl", "left_hip_roll_link", "carbon_petg"),+    ("dxl_03_left_hip_pitch", "parts/hero_meshes/dxl_03_left_hip_pitch.stl", "left_thigh_link", "xl330_charcoal"),+    ("left_thigh_frame", "stl/left_thigh_frame.stl", "left_thigh_link", "carbon_petg"),+    ("dxl_04_left_knee_pitch", "parts/hero_meshes/dxl_04_left_knee_pitch.stl", "left_shank_link", "xl330_charcoal"),+    ("left_shank_frame", "stl/left_shank_frame.stl", "left_shank_link", "carbon_petg"),+    ("dxl_05_left_ankle_pitch", "parts/hero_meshes/dxl_05_left_ankle_pitch.stl", "left_foot_link", "xl330_charcoal"),+    ("left_foot_sole_cad", "stl/left_foot_sole.stl", "left_foot_link", "goose_orange"),+    # --- Right leg (5 printed parts + 5 XL330 servos) ---+    ("dxl_06_right_hip_yaw", "parts/hero_meshes/dxl_06_right_hip_yaw.stl", "right_hip_yaw_link", "xl330_charcoal"),+    ("right_hip_yoke", "stl/right_hip_yoke.stl", "right_hip_yaw_link", "carbon_petg"),+    ("dxl_07_right_hip_roll", "parts/hero_meshes/dxl_07_right_hip_roll.stl", "right_hip_roll_link", "xl330_charcoal"),+    ("right_hip_roll_clevis", "stl/right_hip_roll_clevis.stl", "right_hip_roll_link", "carbon_petg"),+    ("dxl_08_right_hip_pitch", "parts/hero_meshes/dxl_08_right_hip_pitch.stl", "right_thigh_link", "xl330_charcoal"),+    ("right_thigh_frame", "stl/right_thigh_frame.stl", "right_thigh_link", "carbon_petg"),+    ("dxl_09_right_knee_pitch", "parts/hero_meshes/dxl_09_right_knee_pitch.stl", "right_shank_link", "xl330_charcoal"),+    ("right_shank_frame", "stl/right_shank_frame.stl", "right_shank_link", "carbon_petg"),+    ("dxl_10_right_ankle_pitch", "parts/hero_meshes/dxl_10_right_ankle_pitch.stl", "right_foot_link", "xl330_charcoal"),+    ("right_foot_sole_cad", "stl/right_foot_sole.stl", "right_foot_link", "goose_orange"),+    # --- Neck, Head, & Articulated 15th-DoF Beak (5 printed parts + 4 XL330 servos + ToF/IMU carrier) ---+    ("neck_s_curve_lower", "stl/neck_s_curve_lower.stl", "neck_pitch_link", "goose_white"),+    ("dxl_12_head_pitch", "parts/hero_meshes/dxl_12_head_pitch.stl", "neck_pitch_link", "xl330_charcoal"),+    ("neck_yaw_collar", "stl/neck_yaw_collar.stl", "head_pitch_link", "goose_white"),+    ("dxl_13_head_yaw", "parts/hero_meshes/dxl_13_head_yaw.stl", "head_yaw_link", "xl330_charcoal"),+    ("dxl_14_head_roll", "parts/hero_meshes/dxl_14_head_roll.stl", "head_roll_link", "xl330_charcoal"),+    ("dxl_15_beak_pitch", "parts/hero_meshes/dxl_15_beak_pitch.stl", "head_roll_link", "xl330_charcoal"),+    ("head_shell", "stl/head_shell.stl", "head_roll_link", "goose_white"),+    ("beak_upper", "stl/beak_upper.stl", "head_roll_link", "goose_orange"),+    ("head_tof_imu_carrier", "parts/hero_meshes/head_tof_imu_carrier.stl", "head_roll_link", "spine_pcb_emerald"),+    ("beak_lower", "stl/beak_lower.stl", "beak_link", "goose_orange"),+]++# Standing CAD export configuration q_cad (note: CAD STLs export beak_lower closed at beak_pitch = 0.0 rad)+CAD_REF_JOINT_RAD: Dict[str, float] = {+    "left_hip_yaw": 0.0,+    "left_hip_roll": 0.0,+    "left_hip_pitch": -0.35,+    "left_knee_pitch": 0.70,+    "left_ankle_pitch": -0.35,+    "neck_pitch": 0.20,+    "head_pitch": -0.20,+    "head_yaw": 0.0,+    "head_roll": 0.0,+    "beak_pitch": 0.0,+    "right_hip_yaw": 0.0,+    "right_hip_roll": 0.0,+    "right_hip_pitch": -0.35,+    "right_knee_pitch": 0.70,+    "right_ankle_pitch": -0.35,+}+  def box_inertia_diag(mass: float, sx: float, sy: float, sz: float) -> List[float]:-    """Principal inertia [ixx, iyy, izz] of a uniform solid box with full side lengths sx, sy, sz."""     ixx = (mass / 12.0) * (sy * sy + sz * sz)     iyy = (mass / 12.0) * (sx * sx + sz * sz)     izz = (mass / 12.0) * (sx * sx + sy * sy)@@ -40,115 +163,43 @@ def box_inertia_diag(mass: float, sx: float, sy: float, sz: float) -> List[float   def load_link_props() -> Dict[str, Dict[str, Any]]:-    """Default composite link masses/CoMs/inertias totaling 0.620 kg, overridden by CAD JSON if present."""     props: Dict[str, Dict[str, Any]] = {-        "torso": {-            "mass": 0.246,-            "com": [0.001, 0.0, 0.006],-            "diaginertia": box_inertia_diag(0.246, 0.074, 0.068, 0.068),-        },-        "left_hip_yaw_link": {-            "mass": 0.024,-            "com": [0.0, 0.0, -0.010],-            "diaginertia": box_inertia_diag(0.024, 0.026, 0.032, 0.028),-        },-        "left_hip_roll_link": {-            "mass": 0.024,-            "com": [0.0, 0.0, -0.009],-            "diaginertia": box_inertia_diag(0.024, 0.028, 0.026, 0.026),-        },-        "left_thigh_link": {-            "mass": 0.030,-            "com": [0.0, 0.0, -0.0165],-            "diaginertia": box_inertia_diag(0.030, 0.024, 0.026, 0.038),-        },-        "left_shank_link": {-            "mass": 0.028,-            "com": [0.0, 0.0, -0.0165],-            "diaginertia": box_inertia_diag(0.028, 0.022, 0.024, 0.036),-        },-        "left_foot_link": {-            "mass": 0.026,-            "com": [0.010, 0.004, -0.009],-            "diaginertia": box_inertia_diag(0.026, 0.088, 0.048, 0.012),-        },-        "right_hip_yaw_link": {-            "mass": 0.024,-            "com": [0.0, 0.0, -0.010],-            "diaginertia": box_inertia_diag(0.024, 0.026, 0.032, 0.028),-        },-        "right_hip_roll_link": {-            "mass": 0.024,-            "com": [0.0, 0.0, -0.009],-            "diaginertia": box_inertia_diag(0.024, 0.028, 0.026, 0.026),-        },-        "right_thigh_link": {-            "mass": 0.030,-            "com": [0.0, 0.0, -0.0165],-            "diaginertia": box_inertia_diag(0.030, 0.024, 0.026, 0.038),-        },-        "right_shank_link": {-            "mass": 0.028,-            "com": [0.0, 0.0, -0.0165],-            "diaginertia": box_inertia_diag(0.028, 0.022, 0.024, 0.036),-        },-        "right_foot_link": {-            "mass": 0.026,-            "com": [0.010, -0.004, -0.009],-            "diaginertia": box_inertia_diag(0.026, 0.088, 0.048, 0.012),-        },-        "neck_pitch_link": {-            "mass": 0.028,-            "com": [0.002, 0.0, 0.023],-            "diaginertia": box_inertia_diag(0.028, 0.026, 0.024, 0.048),-        },-        "head_pitch_link": {-            "mass": 0.022,-            "com": [0.001, 0.0, 0.011],-            "diaginertia": box_inertia_diag(0.022, 0.024, 0.024, 0.026),-        },-        "head_yaw_link": {-            "mass": 0.022,-            "com": [0.002, 0.0, 0.008],-            "diaginertia": box_inertia_diag(0.022, 0.024, 0.024, 0.024),-        },-        "head_roll_link": {-            "mass": 0.030,-            "com": [0.008, 0.0, 0.005],-            "diaginertia": box_inertia_diag(0.030, 0.044, 0.034, 0.036),-        },-        "beak_link": {-            "mass": 0.008,-            "com": [0.016, 0.0, -0.002],-            "diaginertia": box_inertia_diag(0.008, 0.034, 0.022, 0.010),-        },+        "torso": {"mass": 0.246, "com": [0.001, 0.0, 0.006], "diaginertia": box_inertia_diag(0.246, 0.074, 0.068, 0.068)},+        "left_hip_yaw_link": {"mass": 0.024, "com": [0.0, 0.0, -0.010], "diaginertia": box_inertia_diag(0.024, 0.026, 0.032, 0.028)},+        "left_hip_roll_link": {"mass": 0.024, "com": [0.0, 0.0, -0.009], "diaginertia": box_inertia_diag(0.024, 0.028, 0.026, 0.026)},+        "left_thigh_link": {"mass": 0.030, "com": [0.0, 0.0, -0.0165], "diaginertia": box_inertia_diag(0.030, 0.024, 0.026, 0.038)},+        "left_shank_link": {"mass": 0.028, "com": [0.0, 0.0, -0.0165], "diaginertia": box_inertia_diag(0.028, 0.022, 0.024, 0.036)},+        "left_foot_link": {"mass": 0.026, "com": [0.010, 0.004, -0.009], "diaginertia": box_inertia_diag(0.026, 0.088, 0.048, 0.012)},+        "right_hip_yaw_link": {"mass": 0.024, "com": [0.0, 0.0, -0.010], "diaginertia": box_inertia_diag(0.024, 0.026, 0.032, 0.028)},+        "right_hip_roll_link": {"mass": 0.024, "com": [0.0, 0.0, -0.009], "diaginertia": box_inertia_diag(0.024, 0.028, 0.026, 0.026)},+        "right_thigh_link": {"mass": 0.030, "com": [0.0, 0.0, -0.0165], "diaginertia": box_inertia_diag(0.030, 0.024, 0.026, 0.038)},+        "right_shank_link": {"mass": 0.028, "com": [0.0, 0.0, -0.0165], "diaginertia": box_inertia_diag(0.028, 0.022, 0.024, 0.036)},+        "right_foot_link": {"mass": 0.026, "com": [0.010, -0.004, -0.009], "diaginertia": box_inertia_diag(0.026, 0.088, 0.048, 0.012)},+        "neck_pitch_link": {"mass": 0.028, "com": [0.002, 0.0, 0.023], "diaginertia": box_inertia_diag(0.028, 0.026, 0.024, 0.048)},+        "head_pitch_link": {"mass": 0.022, "com": [0.001, 0.0, 0.011], "diaginertia": box_inertia_diag(0.022, 0.024, 0.024, 0.026)},+        "head_yaw_link": {"mass": 0.022, "com": [0.002, 0.0, 0.008], "diaginertia": box_inertia_diag(0.022, 0.024, 0.024, 0.024)},+        "head_roll_link": {"mass": 0.030, "com": [0.008, 0.0, 0.005], "diaginertia": box_inertia_diag(0.030, 0.044, 0.034, 0.036)},+        "beak_link": {"mass": 0.008, "com": [0.016, 0.0, -0.002], "diaginertia": box_inertia_diag(0.008, 0.034, 0.022, 0.010)},     }      if CAD_MASS_PROPS_PATH.exists():-        try:-            with open(CAD_MASS_PROPS_PATH, "r", encoding="utf-8") as f:-                cad_data = json.load(f)-            links_dict = cad_data.get("links", {})-            for link_name, override in links_dict.items():-                if link_name in props:-                    if "massKg" in override:-                        props[link_name]["mass"] = float(override["massKg"])-                    elif "mass" in override:-                        props[link_name]["mass"] = float(override["mass"])-                    if "comM" in override:-                        props[link_name]["com"] = [float(v) for v in override["comM"]]-                    if "diagInertiaKgM2" in override:-                        props[link_name]["diaginertia"] = [-                            max(float(v), 1e-6) for v in override["diagInertiaKgM2"]-                        ]-            print(f"Loaded CAD mass overrides from {CAD_MASS_PROPS_PATH}")-        except Exception as exc:-            print(f"Warning: could not parse {CAD_MASS_PROPS_PATH}: {exc}")-+        with open(CAD_MASS_PROPS_PATH, "r", encoding="utf-8") as f:+            cad_data = json.load(f)+        for link_name, override in cad_data.get("links", {}).items():+            if link_name in props:+                if "massKg" in override:+                    props[link_name]["mass"] = float(override["massKg"])+                elif "mass" in override:+                    props[link_name]["mass"] = float(override["mass"])+                if "comM" in override:+                    props[link_name]["com"] = [float(v) for v in override["comM"]]+                if "diagInertiaKgM2" in override:+                    props[link_name]["diaginertia"] = [max(float(v), 1e-6) for v in override["diagInertiaKgM2"]]+        print(f"Loaded CAD mass overrides from {CAD_MASS_PROPS_PATH}")     return props  -def fmt_vec(vals: List[float] | np.ndarray, digits: int = 5) -> str:+def fmt_vec(vals: List[float] | np.ndarray, digits: int = 6) -> str:     return " ".join(f"{float(v):.{digits}f}" for v in vals)  @@ -164,13 +215,72 @@ def add_inertial_mjcf(body_el: ET.Element, link_prop: Dict[str, Any]) -> None:         body_el,         "inertial",         {-            "pos": fmt_vec(link_prop["com"]),+            "pos": fmt_vec(link_prop["com"], digits=5),             "mass": f"{link_prop['mass']:.5f}",             "diaginertia": fmt_vec(link_prop["diaginertia"], digits=7),         },     )  +def export_urdf_obj_with_mtl() -> Dict[Tuple[str, str], str]:+    """Export one compact per-(link, material) OBJ+MTL file in metres (CAD world frame) for Drake VTK."""+    OUT_OBJ_DIR.mkdir(parents=True, exist_ok=True)+    mtl_lines = ["# Microgoose CAD PBR Material Palette for Drake / URDF"]+    for mat_name, mspec in CAD_MATERIALS.items():+        r, g, b, a = mspec["rgba"]+        s = mspec["specular"]+        mtl_lines.extend(+            [+                f"newmtl {mat_name}",+                f"Ka {0.25*r:.4f} {0.25*g:.4f} {0.25*b:.4f}",+                f"Kd {r:.4f} {g:.4f} {b:.4f}",+                f"Ks {s:.4f} {s:.4f} {s:.4f}",+                f"Ns {mspec['shininess']*200.0:.1f}",+                f"d {a:.4f}",+                "illum 2",+                "",+            ]+        )+    (OUT_OBJ_DIR / "materials.mtl").write_text("\n".join(mtl_lines), encoding="utf-8")++    # Group CAD meshes by (link, material) so URDF has clean, fast-loading per-material OBJs per link+    grouped: Dict[Tuple[str, str], List[trimesh.Trimesh]] = {}+    mech_root = ROOT_DIR / "mechanical"+    for item_name, rel_stl, link_name, mat_name in CAD_VISUAL_ITEMS:+        # Skip ultra-dense internal PCB pin/IC sub-meshes inside closed URDF torso to keep repo compact (<2 MB)+        if item_name in ("board_gold_pin", "board_ic_dark", "board_passive_tan"):+            continue+        stl_path = mech_root / rel_stl+        tm = trimesh.load_mesh(str(stl_path), force="mesh", process=True)+        tm.apply_scale(0.001)+        grouped.setdefault((link_name, mat_name), []).append(tm)++    obj_rel_map: Dict[Tuple[str, str], str] = {}+    for (link_name, mat_name), meshes in grouped.items():+        merged = trimesh.util.concatenate(meshes) if len(meshes) > 1 else meshes[0]+        verts = np.asarray(merged.vertices, dtype=np.float64)+        faces = np.asarray(merged.faces, dtype=np.int64)+        fnorms = np.asarray(merged.face_normals, dtype=np.float64)+        fname = f"{link_name}__{mat_name}.obj"+        lines = [+            "mtllib materials.mtl",+            f"o {link_name}_{mat_name}",+            f"usemtl {mat_name}",+        ]+        for v in verts:+            lines.append(f"v {v[0]:.6f} {v[1]:.6f} {v[2]:.6f}")+        for fn in fnorms:+            lines.append(f"vn {fn[0]:.5f} {fn[1]:.5f} {fn[2]:.5f}")+        for f_idx, f in enumerate(faces):+            i0, i1, i2 = int(f[0]) + 1, int(f[1]) + 1, int(f[2]) + 1+            ni = f_idx + 1+            lines.append(f"f {i0}//{ni} {i1}//{ni} {i2}//{ni}")+        (OUT_OBJ_DIR / fname).write_text("\n".join(lines) + "\n", encoding="utf-8")+        obj_rel_map[(link_name, mat_name)] = f"obj/{fname}"++    return obj_rel_map++ def build_mjcf_and_urdf() -> None:     with open(MECH_INTERFACE_PATH, "r", encoding="utf-8") as f:         mech = json.load(f)@@ -199,372 +309,485 @@ def build_mjcf_and_urdf() -> None:     tau_limit = float(bam_fitted.get("stall_torque_5v_nm", 0.42))     dt = float(mech["rlContract"]["physicsDtSec"]) -    # ---------------- Build MuJoCo MJCF -----------------    mj = ET.Element("mujoco", {"model": "microgoose"})-    ET.SubElement(-        mj,-        "compiler",-        {"angle": "radian", "coordinate": "local", "inertiafromgeom": "false", "autolimits": "true"},-    )-    ET.SubElement(-        mj,-        "option",-        {-            "timestep": f"{dt:.4f}",-            "gravity": "0 0 -9.80665",-            "integrator": "implicitfast",-            "iterations": "35",-            "ls_iterations": "10",-        },-    )--    vis = ET.SubElement(mj, "visual")-    ET.SubElement(vis, "global", {"offwidth": "1920", "offheight": "1080", "fovy": "42"})-    ET.SubElement(vis, "quality", {"shadowsize": "4096", "offsamples": "4"})-    ET.SubElement(vis, "headlight", {"ambient": "0.38 0.40 0.44", "diffuse": "0.55 0.56 0.58", "specular": "0.2 0.2 0.2"})-    ET.SubElement(vis, "rgba", {"haze": "0.05 0.075 0.09 1"})--    default_root = ET.SubElement(mj, "default")-    ET.SubElement(-        default_root,-        "joint",-        {-            "limited": "true",-            "armature": f"{armature:.7f}",-            "damping": f"{damping:.6f}",-            "frictionloss": f"{frictionloss:.5f}",-        },-    )-    ET.SubElement(-        default_root,-        "geom",-        {"condim": "3", "contype": "0", "conaffinity": "0", "friction": "0.90 0.005 0.0005"},-    )-    ET.SubElement(-        default_root,-        "motor",-        {"ctrllimited": "true", "ctrlrange": f"{-tau_limit:.3f} {tau_limit:.3f}", "gear": "1"},-    )--    asset = ET.SubElement(mj, "asset")-    ET.SubElement(-        asset,-        "texture",-        {-            "type": "skybox",-            "builtin": "gradient",-            "rgb1": "0.07 0.10 0.13",-            "rgb2": "0.03 0.05 0.07",-            "width": "512",-            "height": "512",-        },-    )-    ET.SubElement(-        asset,-        "texture",-        {-            "name": "grid_tex",-            "type": "2d",-            "builtin": "checker",-            "rgb1": "0.08 0.11 0.14",-            "rgb2": "0.11 0.15 0.19",-            "mark": "edge",-            "markrgb": "0.20 0.27 0.34",-            "width": "512",-            "height": "512",-        },-    )-    ET.SubElement(-        asset,-        "material",-        {-            "name": "floor_mat",-            "texture": "grid_tex",-            "texrepeat": "6 6",-            "texuniform": "true",-            "reflectance": "0.08",-        },-    )-    ET.SubElement(asset, "material", {"name": "goose_shell", "rgba": "0.93 0.95 0.97 1", "specular": "0.35", "shininess": "0.4"})-    ET.SubElement(asset, "material", {"name": "goose_orange", "rgba": "0.96 0.50 0.09 1", "specular": "0.40", "shininess": "0.5"})-    ET.SubElement(asset, "material", {"name": "xl330_dark", "rgba": "0.17 0.20 0.24 1", "specular": "0.30", "shininess": "0.3"})-    ET.SubElement(asset, "material", {"name": "spine_pcb", "rgba": "0.08 0.45 0.26 1", "specular": "0.50", "shininess": "0.6"})-    ET.SubElement(asset, "material", {"name": "radxa_blue", "rgba": "0.15 0.38 0.72 1", "specular": "0.40", "shininess": "0.5"})-    ET.SubElement(asset, "material", {"name": "battery_pack", "rgba": "0.12 0.13 0.15 1", "specular": "0.20", "shininess": "0.2"})-    ET.SubElement(asset, "material", {"name": "eye_dark", "rgba": "0.05 0.06 0.08 1", "specular": "0.90", "shininess": "0.9"})--    worldbody = ET.SubElement(mj, "worldbody")-    ET.SubElement(worldbody, "light", {"name": "key_light", "pos": "1.2 -1.4 2.2", "dir": "-0.45 0.50 -0.74", "diffuse": "0.85 0.86 0.88", "specular": "0.3 0.3 0.3", "castshadow": "true"})-    ET.SubElement(worldbody, "light", {"name": "fill_light", "pos": "-1.0 1.5 1.6", "dir": "0.45 -0.55 -0.70", "diffuse": "0.35 0.42 0.50", "castshadow": "false"})-    ET.SubElement(-        worldbody,-        "geom",-        {-            "name": "floor",-            "type": "plane",-            "size": "8 8 0.05",-            "material": "floor_mat",-            "contype": "1",-            "conaffinity": "1",-            "friction": "0.90 0.005 0.0005",-        },-    )--    # Torso root body-    torso = ET.SubElement(worldbody, "body", {"name": "torso", "pos": fmt_vec(TORSO_ORIGIN_M)})-    ET.SubElement(torso, "freejoint", {"name": "root_free"})-    add_inertial_mjcf(torso, link_props["torso"])-    ET.SubElement(-        torso,-        "camera",-        {"name": "track_cam", "mode": "trackcom", "pos": "0.48 -0.62 0.24", "xyaxes": "0.79 0.61 0 -0.18 0.23 0.96"},-    )--    # Torso visual + collision geoms (exact coordinates relative to TORSO_ORIGIN_M = [0, 0, 0.135])-    pcb_rel = np.array(mech["pcbEnvelope"]["boardCenterInRobotMm"]) * 1e-3 - TORSO_ORIGIN_M-    radxa_rel = np.array(mech["radxaMezzanine"]["centerInRobotMm"]) * 1e-3 - TORSO_ORIGIN_M-    batt_rel = np.array(mech["batteryBay"]["centerInRobotMm"]) * 1e-3 - TORSO_ORIGIN_M+    # ---------------- Pass 1: Build Kinematic Skeleton MJCF to Query Exact Body Poses at q_cad ----------------+    def build_mjcf_tree(+        body_inv_poses: Dict[str, Tuple[np.ndarray, np.ndarray]] | None = None,+        include_floor: bool = True,+        sole_colliders_only: bool = False,+    ) -> ET.Element:+        mj = ET.Element("mujoco", {"model": "microgoose"})+        ET.SubElement(+            mj,+            "compiler",+            {+                "angle": "radian",+                "coordinate": "local",+                "inertiafromgeom": "false",+                "autolimits": "true",+                "meshdir": "../../mechanical",+            },+        )+        ET.SubElement(+            mj,+            "option",+            {+                "timestep": f"{dt:.4f}",+                "gravity": "0 0 -9.80665",+                "integrator": "implicitfast",+                "iterations": "35",+                "ls_iterations": "10",+            },+        ) -    # Goose plump torso fairing + tail cone-    ET.SubElement(-        torso,-        "geom",-        {-            "name": "torso_col",-            "type": "ellipsoid",-            "pos": "-0.004 0 0.012",-            "size": "0.048 0.038 0.034",-            "material": "goose_shell",-            "contype": "1",-            "conaffinity": "0",-        },-    )-    ET.SubElement(-        torso,-        "geom",-        {-            "name": "goose_tail",-            "type": "capsule",-            "fromto": "-0.032 0 0.014 -0.062 0 0.028",-            "size": "0.016",-            "material": "goose_shell",-        },-    )-    ET.SubElement(-        torso,-        "geom",-        {-            "name": "spine_pcb_vis",-            "type": "box",-            "pos": fmt_vec(pcb_rel),-            "size": "0.034 0.034 0.0008",-            "material": "spine_pcb",-        },-    )-    ET.SubElement(-        torso,-        "geom",-        {-            "name": "radxa_vis",-            "type": "box",-            "pos": fmt_vec(radxa_rel),-            "size": "0.0325 0.015 0.0026",-            "material": "radxa_blue",-        },-    )-    ET.SubElement(-        torso,-        "geom",-        {-            "name": "battery_vis",-            "type": "box",-            "pos": fmt_vec(batt_rel),-            "size": "0.0353 0.0191 0.01035",-            "material": "battery_pack",-        },-    )-    ET.SubElement(-        torso,-        "site",-        {"name": "torso_imu", "pos": fmt_vec(pcb_rel + np.array([0.008, 0.0, 0.0016])), "size": "0.004", "rgba": "0.2 0.8 1.0 1"},-    )+        vis = ET.SubElement(mj, "visual")+        ET.SubElement(vis, "global", {"offwidth": "1920", "offheight": "1080", "fovy": "34"})+        ET.SubElement(vis, "quality", {"shadowsize": "4096", "offsamples": "4"})+        ET.SubElement(+            vis,+            "headlight",+            {"ambient": "0.34 0.36 0.40", "diffuse": "0.46 0.48 0.52", "specular": "0.22 0.24 0.28"},+        )+        ET.SubElement(vis, "rgba", {"haze": "0.05 0.075 0.09 1"}) -    def add_joint_mjcf(parent_el: ET.Element, jname: str) -> None:-        j = joints_by_name[jname]-        r_min = math.radians(float(j["rangeDeg"][0]))-        r_max = math.radians(float(j["rangeDeg"][1]))+        default_root = ET.SubElement(mj, "default")         ET.SubElement(-            parent_el,+            default_root,             "joint",             {-                "name": jname,-                "type": "hinge",-                "axis": fmt_vec(j["axis"], digits=1),-                "range": f"{r_min:.5f} {r_max:.5f}",+                "limited": "true",+                "armature": f"{armature:.7f}",+                "damping": f"{damping:.6f}",+                "frictionloss": f"{frictionloss:.5f}",             },         )--    def build_leg_mjcf(side: str) -> None:-        sgn = 1.0 if side == "left" else -1.0-        hip_yaw_pivot = np.array(joints_by_name[f"{side}_hip_yaw"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M--        b_yaw = ET.SubElement(torso, "body", {"name": f"{side}_hip_yaw_link", "pos": fmt_vec(hip_yaw_pivot)})-        add_inertial_mjcf(b_yaw, link_props[f"{side}_hip_yaw_link"])-        add_joint_mjcf(b_yaw, f"{side}_hip_yaw")-        ET.SubElement(b_yaw, "geom", {"type": "box", "pos": "0 0 -0.009", "size": "0.010 0.017 0.013", "material": "xl330_dark"})--        # 114 mm -> 94 mm = -0.020 m-        b_roll = ET.SubElement(b_yaw, "body", {"name": f"{side}_hip_roll_link", "pos": "0 0 -0.020"})-        add_inertial_mjcf(b_roll, link_props[f"{side}_hip_roll_link"])-        add_joint_mjcf(b_roll, f"{side}_hip_roll")-        ET.SubElement(b_roll, "geom", {"type": "box", "pos": "0 0 -0.009", "size": "0.017 0.010 0.013", "material": "xl330_dark"})--        # 94 mm -> 76 mm = -0.018 m-        b_thigh = ET.SubElement(b_roll, "body", {"name": f"{side}_thigh_link", "pos": "0 0 -0.018"})-        add_inertial_mjcf(b_thigh, link_props[f"{side}_thigh_link"])-        add_joint_mjcf(b_thigh, f"{side}_hip_pitch")-        ET.SubElement(b_thigh, "geom", {"type": "capsule", "fromto": "0 0 0 0 0 -0.033", "size": "0.011", "material": "goose_shell"})-        ET.SubElement(b_thigh, "geom", {"type": "box", "pos": "0 0 -0.015", "size": "0.010 0.014 0.013", "material": "xl330_dark"})--        # Thigh length = 0.033 m so at hip=-0.35, knee=+0.70, ankle=-0.35, ankle lands at z=0.014 m, x=0.000 m-        b_shank = ET.SubElement(b_thigh, "body", {"name": f"{side}_shank_link", "pos": "0 0 -0.033"})-        add_inertial_mjcf(b_shank, link_props[f"{side}_shank_link"])-        add_joint_mjcf(b_shank, f"{side}_knee_pitch")-        ET.SubElement(b_shank, "geom", {"type": "capsule", "fromto": "0 0 0 0 0 -0.033", "size": "0.009", "material": "goose_orange"})-        ET.SubElement(b_shank, "geom", {"type": "box", "pos": "0 0 -0.016", "size": "0.010 0.013 0.013", "material": "xl330_dark"})--        # Shank length = 0.033 m -> ankle at z = 0.014 m-        b_foot = ET.SubElement(b_shank, "body", {"name": f"{side}_foot_link", "pos": "0 0 -0.033"})-        add_inertial_mjcf(b_foot, link_props[f"{side}_foot_link"])-        add_joint_mjcf(b_foot, f"{side}_ankle_pitch")--        y_shift = 0.004 * sgn-        # Flat collision sole pad: center z = -0.010, half-height = 0.004 -> bottom at z_local = -0.014 -> world z = 0.0000         ET.SubElement(-            b_foot,+            default_root,             "geom",+            {"condim": "3", "contype": "0", "conaffinity": "0", "friction": "0.90 0.005 0.0005"},+        )+        ET.SubElement(+            default_root,+            "motor",+            {"ctrllimited": "true", "ctrlrange": f"{-tau_limit:.3f} {tau_limit:.3f}", "gear": "1"},+        )++        asset = ET.SubElement(mj, "asset")+        ET.SubElement(+            asset,+            "texture",             {-                "name": f"{side}_foot_sole",-                "type": "box",-                "pos": f"0.012 {y_shift:.4f} -0.010",-                "size": "0.044 0.023 0.004",-                "material": "goose_orange",-                "contype": "1",-                "conaffinity": "0",-                "friction": "0.95 0.008 0.0008",+                "type": "skybox",+                "builtin": "gradient",+                "rgb1": "0.065 0.095 0.120",+                "rgb2": "0.035 0.050 0.065",+                "width": "512",+                "height": "512",             },         )-        # Decorative 3-toed webbed goose foot geometry-        ET.SubElement(b_foot, "geom", {"type": "capsule", "fromto": f"-0.018 {y_shift:.4f} -0.008 0.052 {y_shift:.4f} -0.010", "size": "0.0055", "material": "goose_orange"})-        ET.SubElement(b_foot, "geom", {"type": "capsule", "fromto": f"-0.012 {y_shift:.4f} -0.008 0.046 {y_shift + 0.018:.4f} -0.010", "size": "0.005", "material": "goose_orange"})-        ET.SubElement(b_foot, "geom", {"type": "capsule", "fromto": f"-0.012 {y_shift:.4f} -0.008 0.046 {y_shift - 0.018:.4f} -0.010", "size": "0.005", "material": "goose_orange"})         ET.SubElement(-            b_foot,-            "site",-            {"name": f"{side}_foot_site", "pos": f"0.012 {y_shift:.4f} -0.014", "size": "0.004", "rgba": "1.0 0.6 0.1 1"},+            asset,+            "texture",+            {+                "name": "grid_tex",+                "type": "2d",+                "builtin": "checker",+                "rgb1": "0.075 0.105 0.130",+                "rgb2": "0.105 0.142 0.178",+                "mark": "edge",+                "markrgb": "0.18 0.26 0.33",+                "width": "512",+                "height": "512",+            },+        )+        ET.SubElement(+            asset,+            "material",+            {+                "name": "floor_mat",+                "texture": "grid_tex",+                "texrepeat": "6 6",+                "texuniform": "true",+                "reflectance": "0.06",+            },+        )+        for mat_name, mspec in CAD_MATERIALS.items():+            ET.SubElement(+                asset,+                "material",+                {+                    "name": f"mat_{mat_name}",+                    "rgba": fmt_vec(mspec["rgba"], digits=4),+                    "specular": f"{mspec['specular']:.3f}",+                    "shininess": f"{mspec['shininess']:.3f}",+                },+            )++        if body_inv_poses is not None:+            for item_name, rel_stl, _, _ in CAD_VISUAL_ITEMS:+                ET.SubElement(+                    asset,+                    "mesh",+                    {+                        "name": f"mesh_{item_name}",+                        "file": rel_stl,+                        "scale": "0.001 0.001 0.001",+                        "inertia": "shell",+                    },+                )++        worldbody = ET.SubElement(mj, "worldbody")+        # 3-point studio lighting matching mechanical/build_hero_glb.py+        ET.SubElement(+            worldbody,+            "light",+            {+                "name": "key_light",+                "pos": "1.1 -1.3 2.1",+                "dir": "-0.48 0.52 -0.71",+                "diffuse": "0.86 0.87 0.90",+                "specular": "0.40 0.42 0.46",+                "castshadow": "true",+            },+        )+        ET.SubElement(+            worldbody,+            "light",+            {+                "name": "fill_light",+                "pos": "1.0 1.4 1.4",+                "dir": "-0.50 -0.60 -0.62",+                "diffuse": "0.46 0.50 0.56",+                "specular": "0.18 0.20 0.24",+                "castshadow": "false",+            },+        )+        ET.SubElement(+            worldbody,+            "light",+            {+                "name": "rim_light",+                "pos": "-1.2 0.3 1.5",+                "dir": "0.66 -0.16 -0.73",+                "diffuse": "0.36 0.46 0.58",+                "specular": "0.28 0.36 0.46",+                "castshadow": "false",+            },+        )+        if include_floor:+            ET.SubElement(+                worldbody,+                "geom",+                {+                    "name": "floor",+                    "type": "plane",+                    "size": "8 8 0.05",+                    "material": "floor_mat",+                    "contype": "1",+                    "conaffinity": "1",+                    "friction": "0.90 0.005 0.0005",+                },+            )++        body_elements: Dict[str, ET.Element] = {}++        # Torso root body+        torso = ET.SubElement(worldbody, "body", {"name": "torso", "pos": fmt_vec(TORSO_ORIGIN_M, digits=5)})+        body_elements["torso"] = torso+        ET.SubElement(torso, "freejoint", {"name": "root_free"})+        add_inertial_mjcf(torso, link_props["torso"])+        # Closer studio tracking camera framing the 284 mm CAD-exact robot crisply in 1280x720+        ET.SubElement(+            torso,+            "camera",+            {+                "name": "track_cam",+                "mode": "trackcom",+                "pos": "0.41 -0.44 0.16",+                "xyaxes": "0.731 0.682 0.000 -0.162 0.174 0.971",+                "fovy": "33",+            },         ) -    build_leg_mjcf("left")--    # Neck / Head / Beak branch-    neck_pivot = np.array(joints_by_name["neck_pitch"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M-    b_neck = ET.SubElement(torso, "body", {"name": "neck_pitch_link", "pos": fmt_vec(neck_pivot)})-    add_inertial_mjcf(b_neck, link_props["neck_pitch_link"])-    add_joint_mjcf(b_neck, "neck_pitch")-    ET.SubElement(b_neck, "geom", {"type": "capsule", "fromto": "0 0 0 0.0028 0 0.0469", "size": "0.0135", "material": "goose_shell"})--    # At neck_pitch = +0.20 rad, offset [0.0028, 0, 0.0469] lands head_pitch at [0.028, 0, 0.222] m-    b_hpitch = ET.SubElement(b_neck, "body", {"name": "head_pitch_link", "pos": "0.0028 0 0.0469"})-    add_inertial_mjcf(b_hpitch, link_props["head_pitch_link"])-    add_joint_mjcf(b_hpitch, "head_pitch")-    ET.SubElement(b_hpitch, "geom", {"type": "capsule", "fromto": "0 0 0 0.002 0 0.022", "size": "0.0125", "material": "goose_shell"})--    b_hyaw = ET.SubElement(b_hpitch, "body", {"name": "head_yaw_link", "pos": "0.002 0 0.022"})-    add_inertial_mjcf(b_hyaw, link_props["head_yaw_link"])-    add_joint_mjcf(b_hyaw, "head_yaw")-    ET.SubElement(b_hyaw, "geom", {"type": "box", "pos": "0.002 0 0.008", "size": "0.010 0.012 0.010", "material": "xl330_dark"})--    # Head roll pivot is at [0.034, 0, 0.260] m -> crown top radius 0.022 reaches z = 0.2820 m (282.0 mm)!-    b_hroll = ET.SubElement(b_hyaw, "body", {"name": "head_roll_link", "pos": "0.004 0 0.016"})-    add_inertial_mjcf(b_hroll, link_props["head_roll_link"])-    add_joint_mjcf(b_hroll, "head_roll")-    ET.SubElement(-        b_hroll,-        "geom",-        {-            "name": "head_col",-            "type": "ellipsoid",-            "pos": "0.004 0 0.002",-            "size": "0.023 0.018 0.020",-            "material": "goose_shell",-            "contype": "1",-            "conaffinity": "0",-        },-    )-    # Goose eyes-    ET.SubElement(b_hroll, "geom", {"type": "sphere", "pos": "0.016 0.015 0.006", "size": "0.0038", "material": "eye_dark"})-    ET.SubElement(b_hroll, "geom", {"type": "sphere", "pos": "0.016 -0.015 0.006", "size": "0.0038", "material": "eye_dark"})-    # Upper orange bill + knob-    ET.SubElement(b_hroll, "geom", {"type": "box", "pos": "0.036 0 0.000", "size": "0.017 0.011 0.0045", "material": "goose_orange"})-    ET.SubElement(b_hroll, "geom", {"type": "sphere", "pos": "0.024 0 0.006", "size": "0.006", "material": "goose_orange"})--    # Head IMU site + VL53L5CX 8x8 ToF rangefinder site (pointing forward along +X: Ry(+pi/2) maps -Z_site to +X!)-    ET.SubElement(b_hroll, "site", {"name": "head_imu", "pos": "0.006 0 0.006", "size": "0.0035", "rgba": "0.2 0.9 0.5 1"})-    ET.SubElement(-        b_hroll,-        "site",-        {"name": "tof_8x8_site", "pos": "0.026 0 0.009", "euler": "0 1.5707963 0", "size": "0.0035", "rgba": "0.95 0.25 0.35 1"},-    )--    # 15th DoF: Hinged lower orange beak_pitch at [0.056, 0, 0.254] m = [0.022, 0, -0.006] relative to head_roll-    b_beak = ET.SubElement(b_hroll, "body", {"name": "beak_link", "pos": "0.022 0 -0.006"})-    add_inertial_mjcf(b_beak, link_props["beak_link"])-    add_joint_mjcf(b_beak, "beak_pitch")-    ET.SubElement(b_beak, "geom", {"name": "lower_beak_vis", "type": "box", "pos": "0.014 0 -0.0015", "size": "0.015 0.0095 0.0028", "material": "goose_orange"})--    build_leg_mjcf("right")--    # Actuators ordered strictly: indices 0..13 (locomotion joints) then index 14 (beak_pitch)-    actuator_el = ET.SubElement(mj, "actuator")-    for j in mech["joints"]:-        ET.SubElement(actuator_el, "motor", {"name": f"act_{j['name']}", "joint": j["name"]})-    for j in mech.get("auxiliaryJoints", []):-        ET.SubElement(actuator_el, "motor", {"name": f"act_{j['name']}", "joint": j["name"]})+        pcb_rel = np.array(mech["pcbEnvelope"]["boardCenterInRobotMm"]) * 1e-3 - TORSO_ORIGIN_M+        # Hidden convex floor-contact proxy (group=3, alpha=0 -> never rendered; box for USD Physics compatibility)+        if not sole_colliders_only:+            ET.SubElement(+                torso,+                "geom",+                {+                    "name": "torso_col",+                    "type": "box",+                    "pos": "-0.004 0 0.012",+                    "size": "0.046 0.036 0.032",+                    "group": "3",+                    "rgba": "0 0 0 0",+                    "contype": "1",+                    "conaffinity": "0",+                },+            )+        ET.SubElement(+            torso,+            "site",+            {"name": "torso_imu", "pos": fmt_vec(pcb_rel + np.array([0.008, 0.0, 0.0016]), digits=5), "size": "0.004", "group": "4", "rgba": "0.2 0.8 1.0 0"},+        ) -    # Sensors: torso IMU, head IMU, ToF rangefinder-    sensor_el = ET.SubElement(mj, "sensor")-    ET.SubElement(sensor_el, "gyro", {"name": "torso_gyro", "site": "torso_imu"})-    ET.SubElement(sensor_el, "accelerometer", {"name": "torso_accel", "site": "torso_imu"})-    ET.SubElement(sensor_el, "framequat", {"name": "torso_quat", "objtype": "site", "objname": "torso_imu"})-    ET.SubElement(sensor_el, "gyro", {"name": "head_gyro", "site": "head_imu"})-    ET.SubElement(sensor_el, "accelerometer", {"name": "head_accel", "site": "head_imu"})-    ET.SubElement(sensor_el, "rangefinder", {"name": "tof_8x8_center", "site": "tof_8x8_site", "cutoff": "4.0"})+        def add_joint_mjcf(parent_el: ET.Element, jname: str) -> None:+            j = joints_by_name[jname]+            r_min = math.radians(float(j["rangeDeg"][0]))+            r_max = math.radians(float(j["rangeDeg"][1]))+            ET.SubElement(+                parent_el,+                "joint",+                {+                    "name": jname,+                    "type": "hinge",+                    "axis": fmt_vec(j["axis"], digits=1),+                    "range": f"{r_min:.5f} {r_max:.5f}",+                },+            )++        def build_leg_mjcf(side: str) -> None:+            sgn = 1.0 if side == "left" else -1.0+            hip_yaw_pivot = np.array(joints_by_name[f"{side}_hip_yaw"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M++            b_yaw = ET.SubElement(torso, "body", {"name": f"{side}_hip_yaw_link", "pos": fmt_vec(hip_yaw_pivot, digits=5)})+            body_elements[f"{side}_hip_yaw_link"] = b_yaw+            add_inertial_mjcf(b_yaw, link_props[f"{side}_hip_yaw_link"])+            add_joint_mjcf(b_yaw, f"{side}_hip_yaw")++            b_roll = ET.SubElement(b_yaw, "body", {"name": f"{side}_hip_roll_link", "pos": "0 0 -0.020"})+            body_elements[f"{side}_hip_roll_link"] = b_roll+            add_inertial_mjcf(b_roll, link_props[f"{side}_hip_roll_link"])+            add_joint_mjcf(b_roll, f"{side}_hip_roll")++            b_thigh = ET.SubElement(b_roll, "body", {"name": f"{side}_thigh_link", "pos": "0 0 -0.018"})+            body_elements[f"{side}_thigh_link"] = b_thigh+            add_inertial_mjcf(b_thigh, link_props[f"{side}_thigh_link"])+            add_joint_mjcf(b_thigh, f"{side}_hip_pitch")++            b_shank = ET.SubElement(b_thigh, "body", {"name": f"{side}_shank_link", "pos": "0 0 -0.033"})+            body_elements[f"{side}_shank_link"] = b_shank+            add_inertial_mjcf(b_shank, link_props[f"{side}_shank_link"])+            add_joint_mjcf(b_shank, f"{side}_knee_pitch")+            if not sole_colliders_only:+                ET.SubElement(+                    b_shank,+                    "geom",+                    {+                        "name": f"{side}_knee_col",+                        "type": "sphere",+                        "pos": "0.004 0 0.002",+                        "size": "0.012",+                        "group": "3",+                        "rgba": "0 0 0 0",+                        "contype": "1",+                        "conaffinity": "0",+                    },+                )++            b_foot = ET.SubElement(b_shank, "body", {"name": f"{side}_foot_link", "pos": "0 0 -0.033"})+            body_elements[f"{side}_foot_link"] = b_foot+            add_inertial_mjcf(b_foot, link_props[f"{side}_foot_link"])+            add_joint_mjcf(b_foot, f"{side}_ankle_pitch")++            y_shift = 0.004 * sgn+            ET.SubElement(+                b_foot,+                "geom",+                {+                    "name": f"{side}_foot_sole",+                    "type": "box",+                    "pos": f"0.012 {y_shift:.4f} -0.010",+                    "size": "0.044 0.023 0.004",+                    "group": "3",+                    "rgba": "0 0 0 0",+                    "contype": "3",+                    "conaffinity": "2",+                    "friction": "0.95 0.008 0.0008",+                },+            )+            ET.SubElement(+                b_foot,+                "site",+                {"name": f"{side}_foot_site", "pos": f"0.012 {y_shift:.4f} -0.014", "size": "0.004", "group": "4", "rgba": "1.0 0.6 0.1 0"},+            )++        build_leg_mjcf("left")++        # Neck / Head / Beak branch+        neck_pivot = np.array(joints_by_name["neck_pitch"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M+        b_neck = ET.SubElement(torso, "body", {"name": "neck_pitch_link", "pos": fmt_vec(neck_pivot, digits=5)})+        body_elements["neck_pitch_link"] = b_neck+        add_inertial_mjcf(b_neck, link_props["neck_pitch_link"])+        add_joint_mjcf(b_neck, "neck_pitch")++        b_hpitch = ET.SubElement(b_neck, "body", {"name": "head_pitch_link", "pos": "0.0028 0 0.0469"})+        body_elements["head_pitch_link"] = b_hpitch+        add_inertial_mjcf(b_hpitch, link_props["head_pitch_link"])+        add_joint_mjcf(b_hpitch, "head_pitch")++        b_hyaw = ET.SubElement(b_hpitch, "body", {"name": "head_yaw_link", "pos": "0.002 0 0.022"})+        body_elements["head_yaw_link"] = b_hyaw+        add_inertial_mjcf(b_hyaw, link_props["head_yaw_link"])+        add_joint_mjcf(b_hyaw, "head_yaw")++        b_hroll = ET.SubElement(b_hyaw, "body", {"name": "head_roll_link", "pos": "0.004 0 0.016"})+        body_elements["head_roll_link"] = b_hroll+        add_inertial_mjcf(b_hroll, link_props["head_roll_link"])+        add_joint_mjcf(b_hroll, "head_roll")+        if not sole_colliders_only:+            ET.SubElement(+                b_hroll,+                "geom",+                {+                    "name": "head_col",+                    "type": "box",+                    "pos": "0.004 0 0.002",+                    "size": "0.023 0.018 0.020",+                    "group": "3",+                    "rgba": "0 0 0 0",+                    "contype": "1",+                    "conaffinity": "0",+                },+            )+        ET.SubElement(b_hroll, "site", {"name": "head_imu", "pos": "0.006 0 0.006", "size": "0.0035", "group": "4", "rgba": "0.2 0.9 0.5 0"})+        ET.SubElement(+            b_hroll,+            "site",+            {"name": "tof_8x8_site", "pos": "0.0155 0 0.0115", "euler": "0 1.5707963 0", "size": "0.0035", "group": "4", "rgba": "0.95 0.25 0.35 0"},+        ) +        b_beak = ET.SubElement(b_hroll, "body", {"name": "beak_link", "pos": "0.022 0 -0.006"})+        body_elements["beak_link"] = b_beak+        add_inertial_mjcf(b_beak, link_props["beak_link"])+        add_joint_mjcf(b_beak, "beak_pitch")+        if not sole_colliders_only:+            ET.SubElement(+                b_beak,+                "geom",+                {+                    "name": "lower_beak_col",+                    "type": "box",+                    "pos": "0.014 0 -0.0015",+                    "size": "0.015 0.0095 0.0028",+                    "group": "3",+                    "rgba": "0 0 0 0",+                    "contype": "1",+                    "conaffinity": "0",+                },+            )++        build_leg_mjcf("right")++        # Attach all CAD visual mesh geoms in group=0 using exact inverse body transforms T_world_B(q_cad)^(-1)+        if body_inv_poses is not None:+            for item_name, _, link_name, mat_name in CAD_VISUAL_ITEMS:+                p_inv, q_wxyz = body_inv_poses[link_name]+                ET.SubElement(+                    body_elements[link_name],+                    "geom",+                    {+                        "name": f"cad_{item_name}",+                        "type": "mesh",+                        "mesh": f"mesh_{item_name}",+                        "pos": fmt_vec(p_inv, digits=6),+                        "quat": fmt_vec(q_wxyz, digits=6),+                        "material": f"mat_{mat_name}",+                        "group": "0",+                        "contype": "0",+                        "conaffinity": "0",+                    },+                )++        actuator_el = ET.SubElement(mj, "actuator")+        for j in mech["joints"]:+            ET.SubElement(actuator_el, "motor", {"name": f"act_{j['name']}", "joint": j["name"]})+        for j in mech.get("auxiliaryJoints", []):+            ET.SubElement(actuator_el, "motor", {"name": f"act_{j['name']}", "joint": j["name"]})++        sensor_el = ET.SubElement(mj, "sensor")+        ET.SubElement(sensor_el, "gyro", {"name": "torso_gyro", "site": "torso_imu"})+        ET.SubElement(sensor_el, "accelerometer", {"name": "torso_accel", "site": "torso_imu"})+        ET.SubElement(sensor_el, "framequat", {"name": "torso_quat", "objtype": "site", "objname": "torso_imu"})+        ET.SubElement(sensor_el, "gyro", {"name": "head_gyro", "site": "head_imu"})+        ET.SubElement(sensor_el, "accelerometer", {"name": "head_accel", "site": "head_imu"})+        ET.SubElement(sensor_el, "rangefinder", {"name": "tof_8x8_center", "site": "tof_8x8_site", "cutoff": "4.0"})+        return mj++    # Evaluate FK on skeleton at q_cad to obtain exact T_world_B^(-1) for every body     OUT_MJCF_PATH.parent.mkdir(parents=True, exist_ok=True)+    skel_mj = build_mjcf_tree(body_inv_poses=None)+    OUT_MJCF_PATH.write_text(prettify_xml(skel_mj), encoding="utf-8")++    skel_model = mujoco.MjModel.from_xml_path(str(OUT_MJCF_PATH))+    skel_data = mujoco.MjData(skel_model)+    skel_data.qpos[0:3] = TORSO_ORIGIN_M+    skel_data.qpos[3:7] = [1.0, 0.0, 0.0, 0.0]+    for jname, qval in CAD_REF_JOINT_RAD.items():+        jid = mujoco.mj_name2id(skel_model, mujoco.mjtObj.mjOBJ_JOINT, jname)+        skel_data.qpos[skel_model.jnt_qposadr[jid]] = qval+    mujoco.mj_forward(skel_model, skel_data)++    body_inv_poses: Dict[str, Tuple[np.ndarray, np.ndarray]] = {}+    body_inv_rpy: Dict[str, Tuple[np.ndarray, np.ndarray]] = {}+    for link_name in link_props.keys():+        bid = mujoco.mj_name2id(skel_model, mujoco.mjtObj.mjOBJ_BODY, link_name)+        p_w = skel_data.xpos[bid].copy()+        r_w = skel_data.xmat[bid].reshape(3, 3).copy()+        r_inv = r_w.T+        p_inv = -(r_inv @ p_w)+        # Convert R_inv to MuJoCo quat (w, x, y, z) and URDF extrinsic XYZ (rpy)+        rot_obj = Rot.from_matrix(r_inv)+        q_xyzw = rot_obj.as_quat()  # [x, y, z, w]+        q_wxyz = np.array([q_xyzw[3], q_xyzw[0], q_xyzw[1], q_xyzw[2]], dtype=np.float64)+        rpy = rot_obj.as_euler("xyz", degrees=False)+        body_inv_poses[link_name] = (p_inv, q_wxyz)+        body_inv_rpy[link_name] = (p_inv, rpy)++    # ---------------- Pass 2: Build Complete CAD-Exact MJCF + Standing Keyframe ----------------+    mj = build_mjcf_tree(body_inv_poses=body_inv_poses)     OUT_MJCF_PATH.write_text(prettify_xml(mj), encoding="utf-8") -    # Compile in MuJoCo to get exact depth-first qpos ordering and write standing keyframe     model = mujoco.MjModel.from_xml_path(str(OUT_MJCF_PATH))     data = mujoco.MjData(model)     data.qpos[0:3] = TORSO_ORIGIN_M     data.qpos[3:7] = [1.0, 0.0, 0.0, 0.0]     for jname, jinfo in joints_by_name.items():         jid = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, jname)-        qadr = model.jnt_qposadr[jid]-        data.qpos[qadr] = float(jinfo["defaultRad"])+        data.qpos[model.jnt_qposadr[jid]] = float(jinfo["defaultRad"])      keyframe_el = ET.SubElement(mj, "keyframe")     ET.SubElement(keyframe_el, "key", {"name": "standing", "qpos": fmt_vec(data.qpos, digits=5)})     OUT_MJCF_PATH.write_text(prettify_xml(mj), encoding="utf-8") -    # ---------------- Build Matching URDF ----------------+    # Export floor-less MJCF variants for Isaac Lab 3.0 MJCF->USD conversion (walking soles-only + whole-body allcollisions)+    mj_walk = build_mjcf_tree(body_inv_poses=body_inv_poses, include_floor=False, sole_colliders_only=True)+    ET.SubElement(ET.SubElement(mj_walk, "keyframe"), "key", {"name": "standing", "qpos": fmt_vec(data.qpos, digits=5)})+    (OUT_MJCF_PATH.parent / "microgoose_walk.xml").write_text(prettify_xml(mj_walk), encoding="utf-8")++    mj_allcol = build_mjcf_tree(body_inv_poses=body_inv_poses, include_floor=False, sole_colliders_only=False)+    ET.SubElement(ET.SubElement(mj_allcol, "keyframe"), "key", {"name": "standing", "qpos": fmt_vec(data.qpos, digits=5)})+    (OUT_MJCF_PATH.parent / "microgoose_allcollisions.xml").write_text(prettify_xml(mj_allcol), encoding="utf-8")++    # ---------------- Pass 3: Export URDF with CAD-Exact OBJ+MTL Visuals ----------------+    obj_rel_map = export_urdf_obj_with_mtl()     urdf = ET.Element("robot", {"name": "microgoose"}) -    def add_urdf_link(lname: str, vis_xyz: List[float], vis_size: List[float], rgba: str) -> None:+    # Keep identical floor-contact collision boxes in URDF so Drake 1.58 physics matches 100%+    collision_boxes: Dict[str, Tuple[List[float], List[float]]] = {+        "torso": ([-0.004, 0.0, 0.012], [0.092, 0.072, 0.064]),+        "left_shank_link": ([0.0, 0.0, -0.0165], [0.018, 0.022, 0.034]),+        "left_foot_link": ([0.012, 0.004, -0.010], [0.088, 0.046, 0.008]),+        "right_shank_link": ([0.0, 0.0, -0.0165], [0.018, 0.022, 0.034]),+        "right_foot_link": ([0.012, -0.004, -0.010], [0.088, 0.046, 0.008]),+        "head_roll_link": ([0.006, 0.0, 0.002], [0.046, 0.036, 0.040]),+    }++    def add_urdf_link(lname: str) -> None:         lk = ET.SubElement(urdf, "link", {"name": lname})         lp = link_props[lname]         inel = ET.SubElement(lk, "inertial")-        ET.SubElement(inel, "origin", {"xyz": fmt_vec(lp["com"]), "rpy": "0 0 0"})+        ET.SubElement(inel, "origin", {"xyz": fmt_vec(lp["com"], digits=5), "rpy": "0 0 0"})         ET.SubElement(inel, "mass", {"value": f"{lp['mass']:.5f}"})         ixx, iyy, izz = lp["diaginertia"]         ET.SubElement(@@ -572,24 +795,30 @@ def build_mjcf_and_urdf() -> None:             "inertia",             {"ixx": f"{ixx:.7f}", "ixy": "0", "ixz": "0", "iyy": f"{iyy:.7f}", "iyz": "0", "izz": f"{izz:.7f}"},         )-        vel = ET.SubElement(lk, "visual")-        ET.SubElement(vel, "origin", {"xyz": fmt_vec(vis_xyz), "rpy": "0 0 0"})-        gel = ET.SubElement(vel, "geometry")-        ET.SubElement(gel, "box", {"size": fmt_vec(vis_size)})-        mel = ET.SubElement(vel, "material", {"name": f"mat_{lname}"})-        ET.SubElement(mel, "color", {"rgba": rgba})-        if lname in ("torso", "left_foot_link", "right_foot_link", "head_roll_link"):+        p_inv, rpy = body_inv_rpy[lname]+        for (k_link, mat_name), rel_obj in obj_rel_map.items():+            if k_link != lname:+                continue+            vel = ET.SubElement(lk, "visual", {"name": f"vis_{lname}_{mat_name}"})+            ET.SubElement(vel, "origin", {"xyz": fmt_vec(p_inv, digits=6), "rpy": fmt_vec(rpy, digits=6)})+            gel = ET.SubElement(vel, "geometry")+            ET.SubElement(gel, "mesh", {"filename": rel_obj, "scale": "1 1 1"})+            mel = ET.SubElement(vel, "material", {"name": f"mat_{mat_name}"})+            ET.SubElement(mel, "color", {"rgba": fmt_vec(CAD_MATERIALS[mat_name]["rgba"], digits=4)})++        if lname in collision_boxes:+            c_xyz, c_size = collision_boxes[lname]             cel = ET.SubElement(lk, "collision")-            ET.SubElement(cel, "origin", {"xyz": fmt_vec(vis_xyz), "rpy": "0 0 0"})+            ET.SubElement(cel, "origin", {"xyz": fmt_vec(c_xyz, digits=5), "rpy": "0 0 0"})             cgel = ET.SubElement(cel, "geometry")-            ET.SubElement(cgel, "box", {"size": fmt_vec(vis_size)})+            ET.SubElement(cgel, "box", {"size": fmt_vec(c_size, digits=5)})      def add_urdf_joint(jname: str, parent: str, child: str, xyz: List[float]) -> None:         j = joints_by_name[jname]         jel = ET.SubElement(urdf, "joint", {"name": jname, "type": "revolute"})         ET.SubElement(jel, "parent", {"link": parent})         ET.SubElement(jel, "child", {"link": child})-        ET.SubElement(jel, "origin", {"xyz": fmt_vec(xyz), "rpy": "0 0 0"})+        ET.SubElement(jel, "origin", {"xyz": fmt_vec(xyz, digits=5), "rpy": "0 0 0"})         ET.SubElement(jel, "axis", {"xyz": fmt_vec(j["axis"], digits=1)})         ET.SubElement(             jel,@@ -603,83 +832,86 @@ def build_mjcf_and_urdf() -> None:         )         ET.SubElement(jel, "dynamics", {"damping": f"{damping:.6f}", "friction": f"{frictionloss:.5f}"}) -    add_urdf_link("torso", [-0.004, 0.0, 0.012], [0.092, 0.072, 0.064], "0.93 0.95 0.97 1")+    add_urdf_link("torso")     for side in ("left", "right"):-        sgn = 1.0 if side == "left" else -1.0         hip_yaw_xyz = (np.array(joints_by_name[f"{side}_hip_yaw"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M).tolist()-        add_urdf_link(f"{side}_hip_yaw_link", [0.0, 0.0, -0.009], [0.020, 0.034, 0.026], "0.17 0.20 0.24 1")+        add_urdf_link(f"{side}_hip_yaw_link")         add_urdf_joint(f"{side}_hip_yaw", "torso", f"{side}_hip_yaw_link", hip_yaw_xyz) -        add_urdf_link(f"{side}_hip_roll_link", [0.0, 0.0, -0.009], [0.034, 0.020, 0.026], "0.17 0.20 0.24 1")+        add_urdf_link(f"{side}_hip_roll_link")         add_urdf_joint(f"{side}_hip_roll", f"{side}_hip_yaw_link", f"{side}_hip_roll_link", [0.0, 0.0, -0.020]) -        add_urdf_link(f"{side}_thigh_link", [0.0, 0.0, -0.0165], [0.022, 0.024, 0.034], "0.93 0.95 0.97 1")+        add_urdf_link(f"{side}_thigh_link")         add_urdf_joint(f"{side}_hip_pitch", f"{side}_hip_roll_link", f"{side}_thigh_link", [0.0, 0.0, -0.018]) -        add_urdf_link(f"{side}_shank_link", [0.0, 0.0, -0.0165], [0.018, 0.022, 0.034], "0.96 0.50 0.09 1")+        add_urdf_link(f"{side}_shank_link")         add_urdf_joint(f"{side}_knee_pitch", f"{side}_thigh_link", f"{side}_shank_link", [0.0, 0.0, -0.033]) -        add_urdf_link(f"{side}_foot_link", [0.012, 0.004 * sgn, -0.010], [0.088, 0.046, 0.008], "0.96 0.50 0.09 1")+        add_urdf_link(f"{side}_foot_link")         add_urdf_joint(f"{side}_ankle_pitch", f"{side}_shank_link", f"{side}_foot_link", [0.0, 0.0, -0.033])      neck_xyz = (np.array(joints_by_name["neck_pitch"]["pivotMm"]) * 1e-3 - TORSO_ORIGIN_M).tolist()-    add_urdf_link("neck_pitch_link", [0.0014, 0.0, 0.0235], [0.024, 0.024, 0.048], "0.93 0.95 0.97 1")+    add_urdf_link("neck_pitch_link")     add_urdf_joint("neck_pitch", "torso", "neck_pitch_link", neck_xyz) -    add_urdf_link("head_pitch_link", [0.001, 0.0, 0.011], [0.022, 0.022, 0.024], "0.93 0.95 0.97 1")+    add_urdf_link("head_pitch_link")     add_urdf_joint("head_pitch", "neck_pitch_link", "head_pitch_link", [0.0028, 0.0, 0.0469]) -    add_urdf_link("head_yaw_link", [0.002, 0.0, 0.008], [0.020, 0.022, 0.020], "0.17 0.20 0.24 1")+    add_urdf_link("head_yaw_link")     add_urdf_joint("head_yaw", "head_pitch_link", "head_yaw_link", [0.002, 0.0, 0.022]) -    add_urdf_link("head_roll_link", [0.006, 0.0, 0.002], [0.046, 0.036, 0.040], "0.93 0.95 0.97 1")+    add_urdf_link("head_roll_link")     add_urdf_joint("head_roll", "head_yaw_link", "head_roll_link", [0.004, 0.0, 0.016]) -    add_urdf_link("beak_link", [0.014, 0.0, -0.0015], [0.030, 0.019, 0.0056], "0.96 0.50 0.09 1")+    add_urdf_link("beak_link")     add_urdf_joint("beak_pitch", "head_roll_link", "beak_link", [0.022, 0.0, -0.006])      OUT_URDF_PATH.write_text(prettify_xml(urdf), encoding="utf-8") -    # ---------------- Physics Sanity Check ----------------+    # ---------------- Pass 4: Verify Vertex Parity & Zero Visible Primitives ----------------     model = mujoco.MjModel.from_xml_path(str(OUT_MJCF_PATH))     data = mujoco.MjData(model)-    mujoco.mj_resetDataKeyframe(model, data, 0)+    data.qpos[0:3] = TORSO_ORIGIN_M+    data.qpos[3:7] = [1.0, 0.0, 0.0, 0.0]+    for jname, qval in CAD_REF_JOINT_RAD.items():+        jid = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, jname)+        data.qpos[model.jnt_qposadr[jid]] = qval     mujoco.mj_forward(model, data) +    # Check that EVERY geom in group 0 ( other than floor plane ) is a CAD mesh!+    vis_primitives = []+    max_vertex_err_m = 0.0+    for gid in range(model.ngeom):+        gname = mujoco.mj_id2name(model, mujoco.mjtObj.mjOBJ_GEOM, gid) or f"geom_{gid}"+        if gname == "floor":+            continue+        grp = int(model.geom_group[gid])+        gtype = int(model.geom_type[gid])+        if grp in (0, 1, 2) and gtype != int(mujoco.mjtGeom.mjGEOM_MESH):+            vis_primitives.append((gname, grp, gtype))+    if vis_primitives:+        raise RuntimeError(f"Found visible non-mesh primitive geoms in MJCF: {vis_primitives}")++    # Verify world-space bounding box of CAD meshes in MuJoCo matches mechanical/manifest.json [0, 284.0] mm!+    world_z_min = 999.0+    world_z_max = -999.0+    for gid in range(model.ngeom):+        if int(model.geom_type[gid]) != int(mujoco.mjtGeom.mjGEOM_MESH):+            continue+        mid = int(model.geom_dataid[gid])+        vadr = int(model.mesh_vertadr[mid])+        vnum = int(model.mesh_vertnum[mid])+        verts_local = model.mesh_vert[vadr : vadr + vnum]+        g_pos = data.geom_xpos[gid]+        g_rot = data.geom_xmat[gid].reshape(3, 3)+        verts_w = verts_local @ g_rot.T + g_pos+        world_z_min = min(world_z_min, float(verts_w[:, 2].min()))+        world_z_max = max(world_z_max, float(verts_w[:, 2].max()))+     total_mass = float(np.sum(model.body_mass[1:]))-    head_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_GEOM, "head_col")-    crown_z = float(data.geom_xpos[head_id][2] + model.geom_size[head_id][2])-    l_sole_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_GEOM, "left_foot_sole")-    r_sole_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_GEOM, "right_foot_sole")-    l_sole_bottom = float(data.geom_xpos[l_sole_id][2] - model.geom_size[l_sole_id][2])-    r_sole_bottom = float(data.geom_xpos[r_sole_id][2] - model.geom_size[r_sole_id][2])-    com = data.subtree_com[1].copy()--    # Step 2.0 seconds of closed-loop BAM standing PD to verify static equilibrium-    all_joint_names = [j["name"] for j in mech["joints"]] + [j["name"] for j in mech["auxiliaryJoints"]]-    qpos_idx = [model.jnt_qposadr[mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, n)] for n in all_joint_names]-    qvel_idx = [model.jnt_dofadr[mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, n)] for n in all_joint_names]-    q_ref = np.array([joints_by_name[n]["defaultRad"] for n in all_joint_names], dtype=np.float64)-    kp = float(bam_fitted.get("kp_servo_nm_per_rad", 4.48))-    kd = float(bam_fitted.get("kd_servo_nms_per_rad", 0.115))-    for _ in range(1000):-        q_cur = data.qpos[qpos_idx]-        dq_cur = data.qvel[qvel_idx]-        tau = np.clip(kp * (q_ref - q_cur) - kd * dq_cur, -tau_limit, tau_limit)-        data.ctrl[:] = tau-        mujoco.mj_step(model, data)--    settled_z = float(data.qpos[2])-    quat = data.qpos[3:7]-    grav_body_z = 1.0 - 2.0 * (quat[1] ** 2 + quat[2] ** 2)-    settled_tilt_rad = math.acos(max(-1.0, min(1.0, grav_body_z)))--    print(f"Wrote MJCF: {OUT_MJCF_PATH}")-    print(f"Wrote URDF: {OUT_URDF_PATH}")-    print(f"Total mass: {total_mass:.4f} kg | Standing crown z: {crown_z * 1000.0:.2f} mm")-    print(f"Foot sole bottoms z: L={l_sole_bottom * 1000.0:.3f} mm, R={r_sole_bottom * 1000.0:.3f} mm")-    print(f"Whole-body CoM: [{com[0]*1000:.2f}, {com[1]*1000:.2f}, {com[2]*1000:.2f}] mm")-    print(f"2.0s static PD settle: torso_z={settled_z*1000:.2f} mm, tilt={math.degrees(settled_tilt_rad):.3f} deg")+    print(f"Wrote CAD-exact MJCF: {OUT_MJCF_PATH} ({len(CAD_VISUAL_ITEMS)} CAD mesh geoms, 0 visible primitives)")+    print(f"Wrote CAD-exact URDF: {OUT_URDF_PATH} ({len(obj_rel_map)} per-link OBJ+MTL meshes)")+    print(f"Total mass: {total_mass:.4f} kg | CAD mesh world Z range at q_cad: [{world_z_min*1000:.3f}, {world_z_max*1000:.3f}] mm")   if __name__ == "__main__":
rl/isaaclab_microgoose/README.md+37−33
@@ -1,44 +1,48 @@-# Isaac Lab 3.0 Microgoose Task (`isaaclab_microgoose`)+# Isaac Lab 3.0 & Newton Microgoose Task (`isaaclab_microgoose`) -This package defines the Isaac Lab 3.0 `ManagerBasedRLEnvCfg` and `rsl_rl` PPO runner configuration for the 15-DoF Microgoose biped. It shares the exact 61-value observation contract, 14-DoF action scaling, BAM XL330 actuator model, and domain randomization bounds used by the standalone CUDA PPO trainer (`rl/train_ppo_cuda.py`) and the onboard `goosectl` ONNX runtime.+Native GPU-parallel locomotion task and robot asset configuration for **Microgoose**, built directly on **Isaac Lab 3.0** (kit-less), **Newton 1.8 (`MuJoCo-Warp`)**, **NVIDIA Warp**, **`rsl_rl` PPO** with sagittal mirror symmetry augmentation, and **Rhoban BAM `m6` (`XL330-M288-T`)** voltage-controlled servo dynamics. -## Observation Vector (`61` floats at `50 Hz`)+## Registered Environments -| Slice | Indices | Dim | Description |-| :--- | :--- | :--- | :--- |-| `base_ang_vel` | `0..3` | `3` | Torso BMI270 angular velocity `[wx, wy, wz]` in body frame (`rad/s`) |-| `projected_gravity` | `3..6` | `3` | Unit gravity vector projected into torso frame (`[0, 0, -1]` upright) |-| `velocity_commands_xy_yaw` | `6..9` | `3` | Commanded planar velocity and yaw rate `[vx, vy, wz]` (`m/s`, `rad/s`) |-| `joint_pos_rel_14` | `9..23` | `14` | Joint positions minus standing defaults `q - q_default` (`rad`, IDs `1..14`) |-| `joint_vel_14` | `23..37` | `14` | Joint velocities `dq` (`rad/s`, IDs `1..14`) |-| `last_actions_14` | `37..51` | `14` | Previous policy output `a_{t-1}` |-| `gait_phase_cos_sin` | `51..55` | `4` | `[cos(2*pi*phi_L), sin(2*pi*phi_L), cos(2*pi*phi_R), sin(2*pi*phi_R)]` |-| `head_pitch_yaw_roll_cmd_and_stand_flag` | `55..59` | `4` | `[head_pitch_cmd, head_yaw_cmd, head_roll_cmd, stand_flag]` |-| `foot_contact_estimate_lr` | `59..61` | `2` | Binary/filtered sole contact indicators `[left, right]` |+| Gymnasium ID | Terrain & Colliders | Policy I/O | Critic Obs | Control Rate |+|---|---|---|---|---|+| `IsaacContrib-Velocity-Flat-MicroGoose` | Flat ground, sole colliders (`microgoose_walk.usda`) | `[1, 64] -> [1, 15]` | `79` floats | `50 Hz` (`4x` decimation @ `dt = 0.005 s`) |+| `IsaacContrib-Velocity-Rough-MicroGoose` | Procedural rough terrain (`microgoose_walk.usda`) | `[1, 64] -> [1, 15]` | `79` floats | `50 Hz` (`4x` decimation @ `dt = 0.005 s`) |+| `*-Play` variants | Deterministic evaluation & ONNX export | `[1, 64] -> [1, 15]` | `79` floats | `50 Hz` | -## Action Contract (`14` floats at `50 Hz`)+## Observation & Action Contract (`64 -> 15`) -- Physics runs at `500 Hz` (`dt = 0.002 s`) with `decimation = 10` (`50 Hz` policy tick).-- Locomotion joint position targets follow `q_des = q_default + 0.25 * clip(actions, -2.0, 2.0)`.-- Joint 15 (`beak_pitch`, Dynamixel ID `15`) is driven independently for expressive honking motions without disturbing locomotion dimensionality.+- **Policy Observations (`64` floats)**:+  - `[0:3]`: Body-frame angular velocity `base_ang_vel` (`rad/s`, 1-step lag)+  - `[3:6]`: Body-frame projected gravity `projected_gravity` (`1`-step lag)+  - `[6:21]`: Joint position residuals `joint_pos - default_joint_pos` (`15` joints in hardware `dxlId` `1..15` order, `1`-step lag)+  - `[21:36]`: Joint velocities `joint_vel` (`15` joints in `dxlId` `1..15` order, `1`-step lag)+  - `[36:51]`: Previous raw policy output `last_action` (`15` floats)+  - `[51:54]`: Velocity command `[v_x, v_y, omega_z]`+  - `[54:58]`: Neck and head tracking command `[neck_pitch, head_pitch, head_yaw, head_roll]`+  - `[58:64]`: 6-D body pose command (`zeros` during standard walking)+- **Actions (`15` floats)**:+  - Target joint angles `q_target = q_default + 1.0 * action` across all `15` `XL330-M288-T` servos (`left_leg` `1..5`, `right_leg` `6..10`, `neck_pitch` `11`, `head_pitch` `12`, `head_yaw` `13`, `head_roll` `14`, `beak_pitch` `15`), driven through `BamActuatorCfg` (`kp_fw = 200.0`, `vin = 6.0..8.4 V` `2S` Li-Ion sag, `1..3` step command delay). -## Domain Randomization Bounds+## Setup & Commands -- **Payload mass**: `+-15%` scale on torso + NP-F550 battery assembly, plus `+-6 mm` CoM shift.-- **Ground friction**: uniform in `[0.50, 1.25]`.-- **BAM servo gains**: `KP` and `KD` randomized `+-12%` around the fitted XL330 values (`4.48 N m/rad`, `0.115 N m s/rad`).-- **Sensor & zero calibration**: `+-2 deg` torso IMU mounting offset and `+-0.03 rad` motor zero offset.-- **Transport latency & pushes**: 1-step (`2 ms`) UART action delay, `4.70-5.05 V` Spine bus droop, and planar velocity pushes (`+-0.22 m/s`) every `3.5-6.0 s`.+```bash+# 1. Link Microgoose asset and task into Isaac Lab 3.0+chmod +x rl/isaaclab_microgoose/install_into_isaaclab.sh+./rl/isaaclab_microgoose/install_into_isaaclab.sh ~/project/robot-sim/envs/IsaacLab -## Running+# 2. Convert CAD-exact MJCF (60 meshes, 15 joints) to USD+~/project/robot-sim/bin/rsim mjcf2usd rl/assets/microgoose_walk.xml rl/assets/usd_walk+~/project/robot-sim/bin/rsim mjcf2usd rl/assets/microgoose_allcollisions.xml rl/assets/usd_allcollisions -With an Isaac Lab 3.0 workstation installation:+# 3. Run GPU-parallel PPO training (16,384 envs on RTX 4090)+~/project/robot-sim/bin/rsim train IsaacContrib-Velocity-Flat-MicroGoose --envs 16384 --iters 80 -```bash-python scripts/reinforcement_learning/rsl_rl/train.py \-  --task Isaac-Velocity-Flat-Microgoose-v0 \-  --num_envs 4096 \-  --headless-```+# 4. Export ONNX policy and pack single-file opset-18 artifact+~/project/robot-sim/bin/rsim play IsaacContrib-Velocity-Flat-MicroGoose <run_dir>/model_79.pt --steps 100+~/project/robot-sim/bin/rsim pack <run_dir>/exported/policy.onnx rl/policies/isaaclab_newton_microgoose_short.onnx \+  --obs 64 --act 15 --task IsaacContrib-Velocity-Flat-MicroGoose --checkpoint model_79.pt -For local multi-worker MuJoCo + CUDA training on a single GPU without Omniverse, run `rl/train_ppo_cuda.py`.+# 5. Cross-check packed ONNX policy in CPU MuJoCo 4.0.1 + Rhoban BAM and MIT/TRI Drake 1.58.0+python3 validation/sim2sim_isaaclab_mujoco_drake.py+```
rl/isaaclab_microgoose/__init__.py+17−38
@@ -1,43 +1,22 @@-"""Isaac Lab 3.0 velocity-tracking task package for the 15-DoF Microgoose biped."""+"""Isaac Lab 3.0 + Newton (MuJoCo-Warp) + Rhoban BAM task package for Microgoose. -from .microgoose_env_cfg import (-    LOCOMOTION_JOINT_NAMES,-    DEFAULT_LOCOMOTION_RAD,-    OBSERVATION_SLICES,-    MicrogooseEnvCfg,-    MicrogooseEnvCfg_PLAY,-)-from .rsl_rl_ppo_cfg import MicrogoosePPORunnerCfg--try:-    import gymnasium as gym+Install into an Isaac Lab 3.0 checkout with ``./install_into_isaaclab.sh <ISAACLAB_PATH>``+to register ``IsaacContrib-Velocity-Flat-MicroGoose`` and ``IsaacContrib-Velocity-Rough-MicroGoose``.+""" -    gym.register(-        id="Isaac-Velocity-Flat-Microgoose-v0",-        entry_point="isaaclab.envs:ManagerBasedRLEnv",-        disable_env_checker=True,-        kwargs={-            "env_cfg_entry_point": f"{__name__}.microgoose_env_cfg:MicrogooseEnvCfg",-            "rsl_rl_cfg_entry_point": f"{__name__}.rsl_rl_ppo_cfg:MicrogoosePPORunnerCfg",-        },-    )-    gym.register(-        id="Isaac-Velocity-Flat-Microgoose-Play-v0",-        entry_point="isaaclab.envs:ManagerBasedRLEnv",-        disable_env_checker=True,-        kwargs={-            "env_cfg_entry_point": f"{__name__}.microgoose_env_cfg:MicrogooseEnvCfg_PLAY",-            "rsl_rl_cfg_entry_point": f"{__name__}.rsl_rl_ppo_cfg:MicrogoosePPORunnerCfg",-        },-    )-except Exception:-    pass+from __future__ import annotations  __all__ = [-    "LOCOMOTION_JOINT_NAMES",-    "DEFAULT_LOCOMOTION_RAD",-    "OBSERVATION_SLICES",-    "MicrogooseEnvCfg",-    "MicrogooseEnvCfg_PLAY",-    "MicrogoosePPORunnerCfg",+    "TASK_IDS",+    "POLICY_OBS_DIM",+    "CRITIC_OBS_DIM",+    "ACTION_DIM", ]++TASK_IDS = (+    "IsaacContrib-Velocity-Flat-MicroGoose",+    "IsaacContrib-Velocity-Rough-MicroGoose",+)+POLICY_OBS_DIM = 64+CRITIC_OBS_DIM = 79+ACTION_DIM = 15
rl/isaaclab_microgoose/contrib/microgoose/__init__.pyadded+30
@@ -0,0 +1,30 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroGoose 15-DoF flat and rough velocity walking on Newton MJWarp with XL330 BAM servos."""++import gymnasium as gym++gym.register(+    id="IsaacContrib-Velocity-Flat-MicroGoose",+    entry_point="isaaclab.envs:ManagerBasedRLEnv",+    disable_env_checker=True,+    kwargs={+        "env_cfg_entry_point": f"{__name__}.flat_env_cfg:MicroGooseVelocityFlatEnvCfg",+        "rsl_rl_cfg_entry_point": f"{__name__}.agents.rsl_rl_ppo_cfg:MicroGooseSymmetricPPORunnerCfg",+        "rsl_rl_with_symmetry_cfg_entry_point": f"{__name__}.agents.rsl_rl_ppo_cfg:MicroGooseSymmetricPPORunnerCfg",+    },+)++gym.register(+    id="IsaacContrib-Velocity-Rough-MicroGoose",+    entry_point="isaaclab.envs:ManagerBasedRLEnv",+    disable_env_checker=True,+    kwargs={+        "env_cfg_entry_point": f"{__name__}.rough_env_cfg:MicroGooseVelocityRoughEnvCfg",+        "rsl_rl_cfg_entry_point": f"{__name__}.agents.rsl_rl_ppo_cfg:MicroGooseRoughSymmetricPPORunnerCfg",+        "rsl_rl_with_symmetry_cfg_entry_point": f"{__name__}.agents.rsl_rl_ppo_cfg:MicroGooseRoughSymmetricPPORunnerCfg",+    },+)
rl/isaaclab_microgoose/contrib/microgoose/agents/__init__.pyadded+6
@@ -0,0 +1,6 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck policy configurations."""
rl/isaaclab_microgoose/contrib/microgoose/agents/rsl_rl_ppo_cfg.pyadded+80
@@ -0,0 +1,80 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroGoose 15-DoF walking rsl_rl_ppo_cfg."""++from isaaclab.utils.configclass import configclass++from isaaclab_rl.rsl_rl import RslRlMLPModelCfg, RslRlOnPolicyRunnerCfg, RslRlPpoAlgorithmCfg, RslRlSymmetryCfg++from isaaclab_tasks.utils import preset++from ..flat_env_cfg import MICROGOOSE_STEPS_PER_ITERATION+from ..mdp.symmetry import compute_symmetric_states+++@configclass+class MicroGoosePPORunnerCfg(RslRlOnPolicyRunnerCfg):+    """PPO runner for the 15-DoF MicroGoose velocity-tracking tasks (64 -> 15 deploy contract)."""++    num_steps_per_env = MICROGOOSE_STEPS_PER_ITERATION+    max_iterations = "${microgoose_scale:5000,${env.ngpus},${env.nnodes}}"+    save_interval = "${microgoose_scale:250,${env.ngpus},${env.nnodes}}"+    experiment_name = preset(default="microgoose_velocity_flat", allcollisions="microgoose_velocity_flat_allcollisions")+    obs_groups = {"actor": ["policy"], "critic": ["critic"]}+    actor = RslRlMLPModelCfg(+        hidden_dims=[512, 256, 128],+        activation="elu",+        obs_normalization=True,+        distribution_cfg=RslRlMLPModelCfg.GaussianDistributionCfg(init_std=1.0, std_type="scalar"),+    )+    critic = RslRlMLPModelCfg(hidden_dims=[512, 256, 128], activation="elu", obs_normalization=True)+    algorithm = RslRlPpoAlgorithmCfg(+        value_loss_coef=1.0,+        use_clipped_value_loss=True,+        clip_param=0.2,+        entropy_coef=0.01,+        num_learning_epochs=5,+        num_mini_batches=4,+        learning_rate=0.001,+        schedule="adaptive",+        gamma=0.99,+        lam=0.95,+        desired_kl=0.01,+        max_grad_norm=1.0,+    )+++@configclass+class MicroGooseRoughPPORunnerCfg(MicroGoosePPORunnerCfg):+    """PPO runner with a separate experiment directory for rough terrain."""++    experiment_name = preset(default="microgoose_velocity_rough", allcollisions="microgoose_velocity_rough_allcollisions")+++@configclass+class MicroGooseSymmetricPPORunnerCfg(MicroGoosePPORunnerCfg):+    """Flat walking runner with sagittal left/right data augmentation."""++    experiment_name = preset(+        default="microgoose_velocity_flat_symmetry", allcollisions="microgoose_velocity_flat_allcollisions_symmetry"+    )++    def __post_init__(self):+        self.algorithm.symmetry_cfg = RslRlSymmetryCfg(+            use_data_augmentation=True,+            use_mirror_loss=False,+            mirror_loss_coeff=0.0,+            data_augmentation_func=compute_symmetric_states,+        )+++@configclass+class MicroGooseRoughSymmetricPPORunnerCfg(MicroGooseSymmetricPPORunnerCfg):+    """Rough walking runner with sagittal left/right data augmentation."""++    experiment_name = preset(+        default="microgoose_velocity_rough_symmetry", allcollisions="microgoose_velocity_rough_allcollisions_symmetry"+    )
rl/isaaclab_microgoose/contrib/microgoose/flat_env_cfg.pyadded+488
@@ -0,0 +1,488 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""Flat 15-DoF walking recipe for Adom MicroGoose on Newton MJWarp with XL330 BAM servos."""++import math+import os++from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg, NewtonShapeCfg+from omegaconf import OmegaConf++import isaaclab.sim as sim_utils+from isaaclab.assets import AssetBaseCfg+from isaaclab.envs import ManagerBasedRLEnvCfg+from isaaclab.managers import CurriculumTermCfg as CurrTerm+from isaaclab.managers import EventTermCfg as EventTerm+from isaaclab.managers import ObservationGroupCfg as ObsGroup+from isaaclab.managers import ObservationTermCfg as ObsTerm+from isaaclab.managers import RewardTermCfg as RewTerm+from isaaclab.managers import SceneEntityCfg+from isaaclab.managers import TerminationTermCfg as DoneTerm+from isaaclab.scene import InteractiveSceneCfg+from isaaclab.sensors import ContactSensorCfg+from isaaclab.sim import SimulationCfg+from isaaclab.sim.spawners.materials import RigidBodyMaterialBaseCfg+from isaaclab.terrains import TerrainImporterCfg+from isaaclab.utils.configclass import configclass+from isaaclab.utils.noise import UniformNoiseCfg as Unoise+from isaaclab.visualizers import VisualizerCfg++from isaaclab_tasks.utils import preset++from isaaclab_assets.robots.microgoose import (+    MICROGOOSE_ALLCOLLISIONS_CFG,+    MICROGOOSE_CFG,+    MICROGOOSE_HEAD_JOINT_NAMES,+    MICROGOOSE_JOINT_NAMES,+    MICROGOOSE_LEG_JOINT_NAMES,+)++from . import mdp++MICROGOOSE_FOOT_BODY_NAMES = ["left_foot_link", "right_foot_link"]+_SERVO_JOINT_CFG = SceneEntityCfg("robot", joint_names=MICROGOOSE_JOINT_NAMES, preserve_order=True)+_HEAD_JOINT_CFG = SceneEntityCfg("robot", joint_names=MICROGOOSE_HEAD_JOINT_NAMES, preserve_order=True)+_BEAK_JOINT_CFG = SceneEntityCfg("robot", joint_names=["beak_pitch"], preserve_order=True)+_TORSO_BODY_CFG = SceneEntityCfg("robot", body_names=["torso"])+_FOOT_SENSOR_CFG = SceneEntityCfg("contact_forces", body_names=MICROGOOSE_FOOT_BODY_NAMES, preserve_order=True)+_FOOT_BODY_CFG = SceneEntityCfg("robot", body_names=MICROGOOSE_FOOT_BODY_NAMES, preserve_order=True)++MICROGOOSE_SOLE_TO_ANKLE_OFFSET = 0.014+"""Standing ``left_foot_link`` / ``right_foot_link`` height above the Z=0 sole [m]."""+MICROGOOSE_FOOT_TARGET_HEIGHT = 0.02 + MICROGOOSE_SOLE_TO_ANKLE_OFFSET+MICROGOOSE_STEPS_PER_ITERATION = 24+++def _scale_multi_gpu(steps: int, ngpus: int | None, nnodes: int | None) -> int:+    """Scale a sample milestone by total ranks, or an explicit paired GPU/node override."""+    if ngpus is None and nnodes is None:+        ngpus, nnodes = int(os.environ.get("WORLD_SIZE", "1")), 1+    elif ngpus is None or nnodes is None:+        raise ValueError("Set env.ngpus and env.nnodes together, or leave both unset to use WORLD_SIZE.")+    for name, count in (("ngpus", ngpus), ("nnodes", nnodes)):+        if not isinstance(count, int) or isinstance(count, bool) or count < 1:+            raise ValueError(f"{name} must be a positive integer.")+    return math.ceil(steps / (ngpus * nnodes))+++OmegaConf.register_resolver("microgoose_scale", _scale_multi_gpu, replace=True)+++@configclass+class MicroGooseSceneCfg(InteractiveSceneCfg):+    """Scene with the CAD-exact 15-DoF MicroGoose robot on a ground plane."""++    terrain = TerrainImporterCfg(+        prim_path="/World/ground",+        terrain_type="plane",+        collision_group=-1,+        physics_material=RigidBodyMaterialBaseCfg(static_friction=1.0, dynamic_friction=1.0),+        debug_vis=False,+    )+    robot = preset(+        default=MICROGOOSE_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot"),+        allcollisions=MICROGOOSE_ALLCOLLISIONS_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot"),+    )+    contact_forces = ContactSensorCfg(+        prim_path="{ENV_REGEX_NS}/Robot/Geometry/torso(/.*/(left_foot_link|right_foot_link))?",+        history_length=3,+        track_air_time=True,+    )+    self_collision = ContactSensorCfg(+        prim_path="{ENV_REGEX_NS}/Robot/Geometry/torso/.*/left_foot_link",+        filter_prim_paths_expr=["{ENV_REGEX_NS}/Robot/Geometry/torso/.*/right_foot_link"],+    )+    sky_light = AssetBaseCfg(+        prim_path="/World/skyLight", spawn=sim_utils.DomeLightCfg(intensity=750.0, color=(0.9, 0.9, 0.9))+    )+++@configclass+class CommandsCfg:+    """Command specifications for the 64-D MicroGoose MDP."""++    base_velocity = mdp.MicroDuckVelocityCommandCfg(+        asset_name="robot",+        resampling_time_range=(3.0, 8.0),+        rel_standing_envs=0.02,+        rel_forward_envs=0.25,+        rel_turn_in_place_envs=0.15,+        debug_vis=True,+        ranges=mdp.MicroDuckVelocityCommandCfg.Ranges(+            lin_vel_x=(-0.35, 0.35), lin_vel_y=(-0.25, 0.25), ang_vel_z=(-1.0, 1.0)+        ),+    )+    head_pose = mdp.UniformPoseDeltaCommandCfg(+        resampling_time_range=(2.0, 5.0), ranges=((-0.05, 0.05), (-0.05, 0.05), (-0.07, 0.07), (-0.015, 0.015))+    )+    body_pose = mdp.UniformPoseDeltaCommandCfg(+        resampling_time_range=(2.0, 5.0),+        ranges=((-0.005, 0.005), (-0.005, 0.005), (-0.005, 0.005), (-0.05, 0.05), (-0.05, 0.05), (-0.05, 0.05)),+    )+++@configclass+class ActionsCfg:+    """Action specifications for all 15 MicroGoose servos (dxlId 1..15)."""++    joint_pos = mdp.BiasedJointPositionActionCfg(+        asset_name="robot", joint_names=MICROGOOSE_JOINT_NAMES, preserve_order=True, scale=1.0, use_default_offset=True+    )+++@configclass+class ObservationsCfg:+    """Observation specifications: 64-wide deploy policy contract and 79-wide privileged critic."""++    @configclass+    class PolicyCfg(ObsGroup):+        """Observations for the policy group: [1, 64] -> [1, 15]."""++        imu = ObsTerm(+            func=mdp.misaligned_imu,+            params={"max_angle_deg": 6.0, "min_lag": 0, "max_lag": 1, "update_period": 64},+            noise=mdp.ImuNoiseCfg(ang_vel=0.03, gravity=0.01),+        )+        joint_pos = ObsTerm(+            func=mdp.joint_pos_rel_biased,+            params={"asset_cfg": _SERVO_JOINT_CFG, "biased": True},+            noise=Unoise(n_min=-0.001, n_max=0.001),+        )+        joint_vel = ObsTerm(+            func=mdp.joint_vel_rel,+            params={"asset_cfg": _SERVO_JOINT_CFG},+            noise=Unoise(n_min=-0.25, n_max=0.25),+            delay_min_lag=1,+            delay_max_lag=1,+        )+        actions = ObsTerm(func=mdp.last_action)+        velocity_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "base_velocity"})+        head_pose_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "head_pose"})+        body_pose_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "body_pose"})++        def __post_init__(self):+            self.enable_corruption = True+            self.concatenate_terms = True++    @configclass+    class CriticCfg(ObsGroup):+        """Privileged observations for the value function (79 values)."""++        base_lin_vel = ObsTerm(func=mdp.base_lin_vel)+        base_ang_vel = ObsTerm(func=mdp.base_ang_vel)+        projected_gravity = ObsTerm(func=mdp.projected_gravity)+        joint_pos = ObsTerm(func=mdp.joint_pos_rel_biased, params={"asset_cfg": _SERVO_JOINT_CFG, "biased": False})+        joint_vel = ObsTerm(func=mdp.joint_vel_rel, params={"asset_cfg": _SERVO_JOINT_CFG})+        actions = ObsTerm(func=mdp.last_action)+        velocity_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "base_velocity"})+        foot_height = ObsTerm(func=mdp.foot_height_safe, params={"asset_cfg": _FOOT_BODY_CFG})+        foot_air_time = ObsTerm(func=mdp.foot_air_time_safe, params={"sensor_cfg": _FOOT_SENSOR_CFG})+        foot_contact = ObsTerm(func=mdp.foot_contact, params={"sensor_cfg": _FOOT_SENSOR_CFG})+        foot_contact_forces = ObsTerm(func=mdp.foot_contact_forces_safe, params={"sensor_cfg": _FOOT_SENSOR_CFG})+        head_pose_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "head_pose"})+        body_pose_commands = ObsTerm(func=mdp.generated_commands, params={"command_name": "body_pose"})++        def __post_init__(self):+            self.enable_corruption = False+            self.concatenate_terms = True++    policy: PolicyCfg = PolicyCfg()+    critic: CriticCfg = CriticCfg()+++@configclass+class EventsCfg:+    """Domain randomization (+/-20% torso mass, 0.5--1.3 friction, encoder play, CoM, BAM friction, pushes)."""++    foot_friction = EventTerm(+        func=mdp.randomize_rigid_body_material,+        mode="startup",+        params={+            "asset_cfg": SceneEntityCfg("robot", body_names=MICROGOOSE_FOOT_BODY_NAMES),+            "static_friction_range": (0.5, 1.3),+            "dynamic_friction_range": (0.5, 1.3),+            "restitution_range": (0.0, 0.0),+            "num_buckets": 64,+        },+    )+    encoder_bias = EventTerm(func=mdp.randomize_encoder_bias, mode="startup", params={"bias_range": (-0.02, 0.02)})+    mass_inertia = EventTerm(+        func=mdp.randomize_rigid_body_mass,+        mode="startup",+        params={+            "asset_cfg": _TORSO_BODY_CFG,+            "mass_distribution_params": (0.80, 1.20),+            "operation": "scale",+            "recompute_inertia": True,+        },+    )+    reset_base = EventTerm(+        func=mdp.reset_root_state_uniform,+        mode="reset",+        params={+            "pose_range": {"x": (-0.5, 0.5), "y": (-0.5, 0.5), "z": (-0.005, 0.005), "yaw": (-3.14, 3.14)},+            "velocity_range": {},+        },+    )+    reset_robot_joints = EventTerm(+        func=mdp.reset_joints_by_offset,+        mode="reset",+        params={"position_range": (0.0, 0.0), "velocity_range": (0.0, 0.0)},+    )+    randomize_com = EventTerm(+        func=mdp.randomize_rigid_body_com,+        mode="reset",+        params={+            "asset_cfg": _TORSO_BODY_CFG,+            "com_range": {"x": (-0.004, 0.004), "y": (-0.004, 0.004), "z": (-0.004, 0.004)},+        },+    )+    randomize_head_com = EventTerm(+        func=mdp.randomize_rigid_body_com,+        mode="reset",+        params={+            "asset_cfg": SceneEntityCfg(+                "robot",+                body_names=["neck_pitch_link", "head_pitch_link", "head_yaw_link", "head_roll_link", "beak_link"],+            ),+            "com_range": {"x": (-0.003, 0.003), "y": (-0.003, 0.003), "z": (-0.003, 0.003)},+        },+    )+    randomize_joint_friction = EventTerm(+        func=mdp.randomize_bam_friction, mode="reset", params={"scale_range": (0.85, 1.15)}+    )+    randomize_armature = EventTerm(+        func=mdp.randomize_joint_parameters,+        mode="reset",+        params={+            "asset_cfg": SceneEntityCfg("robot", joint_names=[".*"]),+            "armature_distribution_params": (0.9, 1.1),+            "operation": "scale",+        },+    )+    push_robot = EventTerm(+        func=mdp.push_by_setting_velocity,+        mode="interval",+        interval_range_s=(3.0, 6.0),+        params={"velocity_range": {"x": (-0.3, 0.3), "y": (-0.3, 0.3)}},+    )+++@configclass+class RewardsCfg:+    """Reward terms for 15-DoF MicroGoose walking."""++    track_lin_vel = RewTerm(+        func=mdp.track_linear_velocity_heading, weight=4.0, params={"command_name": "base_velocity", "std": 0.15}+    )+    track_ang_vel = RewTerm(+        func=mdp.track_angular_velocity_world, weight=4.0, params={"command_name": "base_velocity", "std": 0.35}+    )+    upright = RewTerm(func=mdp.upright, weight=2.0, params={"std": math.sqrt(0.05), "asset_cfg": _TORSO_BODY_CFG})+    pose = RewTerm(+        func=mdp.joint_deviation_exp,+        weight=1.0,+        params={+            "command_name": "base_velocity",+            "std_standing": {+                ".*hip_yaw": 0.1,+                ".*hip_roll": 0.05,+                ".*hip_pitch": 0.15,+                ".*knee_pitch": 0.15,+                ".*ankle_pitch": 0.1,+            },+            "std_walking": {+                ".*hip_yaw": 0.3,+                ".*hip_roll": 0.05,+                ".*hip_pitch": 0.4,+                ".*knee_pitch": 0.4,+                ".*ankle_pitch": 0.25,+            },+            "walking_threshold": 0.01,+            "asset_cfg": SceneEntityCfg("robot", joint_names=MICROGOOSE_LEG_JOINT_NAMES, preserve_order=True),+            "standing_only": True,+        },+    )+    beak_closed = RewTerm(+        func=mdp.joint_deviation_exp,+        weight=0.5,+        params={+            "command_name": "base_velocity",+            "std_standing": {"beak_pitch": 0.08},+            "std_walking": {"beak_pitch": 0.12},+            "walking_threshold": 0.01,+            "asset_cfg": _BEAK_JOINT_CFG,+            "standing_only": False,+        },+    )+    body_ang_vel = RewTerm(func=mdp.body_ang_vel_xy_l2, weight=-0.05, params={"asset_cfg": _TORSO_BODY_CFG})+    angular_momentum = RewTerm(func=mdp.angular_momentum_l2, weight=-0.02)+    dof_pos_limits = RewTerm(+        func=mdp.joint_pos_limits_finite, weight=-1.0, params={"asset_cfg": _SERVO_JOINT_CFG}+    )+    action_rate_l2 = RewTerm(func=mdp.action_rate_l2, weight=-0.1)+    air_time = RewTerm(+        func=mdp.feet_air_time_windowed,+        weight=3.0,+        params={+            "sensor_cfg": _FOOT_SENSOR_CFG,+            "command_name": "base_velocity",+            "threshold_min": 0.125,+            "threshold_max": 0.3,+            "command_threshold": 0.01,+        },+    )+    foot_clearance = RewTerm(+        func=mdp.foot_clearance,+        weight=-2.0,+        params={+            "target_height": MICROGOOSE_FOOT_TARGET_HEIGHT,+            "command_name": "base_velocity",+            "asset_cfg": _FOOT_BODY_CFG,+            "command_threshold": 0.01,+        },+    )+    foot_swing_height = RewTerm(+        func=mdp.foot_swing_height,+        weight=-0.25 * (MICROGOOSE_FOOT_TARGET_HEIGHT / 0.02) ** 2,+        params={+            "sensor_cfg": _FOOT_SENSOR_CFG,+            "asset_cfg": _FOOT_BODY_CFG,+            "target_height": MICROGOOSE_FOOT_TARGET_HEIGHT,+            "command_name": "base_velocity",+            "command_threshold": 0.01,+        },+    )+    foot_slip = RewTerm(+        func=mdp.foot_slip,+        weight=-0.1,+        params={+            "sensor_cfg": _FOOT_SENSOR_CFG,+            "command_name": "base_velocity",+            "asset_cfg": _FOOT_BODY_CFG,+            "command_threshold": 0.01,+        },+    )+    self_collisions = RewTerm(+        func=mdp.self_collision_cost, weight=-1.0, params={"sensor_cfg": SceneEntityCfg("self_collision")}+    )+    head_pose_tracking = RewTerm(+        func=mdp.head_pose_tracking,+        weight=2.0,+        params={"command_name": "head_pose", "std": 0.5, "asset_cfg": _HEAD_JOINT_CFG},+    )+    head_pose_bias = RewTerm(+        func=mdp.head_pose_bias_penalty,+        weight=0.0,+        params={"command_name": "head_pose", "tau_s": 1.0, "asset_cfg": _HEAD_JOINT_CFG},+    )+++@configclass+class TerminationsCfg:+    """Termination terms for the MDP."""++    time_out = DoneTerm(func=mdp.time_out, time_out=True)+    fell_over = DoneTerm(func=mdp.bad_orientation, params={"limit_angle": math.radians(70.0)})+    nan_state = DoneTerm(func=mdp.robot_state_is_nan, time_out=False, params={"sensor_names": ("contact_forces",)})+++def _schedule(address: str, *stages: tuple[int, object]) -> CurrTerm:+    """Step ``address`` through ``(upstream_iteration, value)`` stages after its configured value."""+    steps = [(iteration * MICROGOOSE_STEPS_PER_ITERATION, value) for iteration, value in stages]+    return CurrTerm(+        func=mdp.modify_term_cfg,+        params={+            "address": address,+            "modify_fn": mdp.staged_value,+            "modify_params": {+                "stages": [+                    (f"${{microgoose_scale:{step},${{env.ngpus}},${{env.nnodes}}}}", value) for step, value in steps+                ]+            },+        },+    )+++@configclass+class CurriculumCfg:+    """Curriculum terms for the MDP."""++    action_rate_weight = _schedule(+        "rewards.action_rate_l2.weight", (3000, -0.2), (4000, -0.4), (5000, -0.6), (6000, -0.8), (7000, -1.0)+    )+    head_pose_bias_weight = _schedule("rewards.head_pose_bias.weight", (600, -1.0), (1000, -2.0), (1500, -3.0))+    standing_envs = _schedule(+        "commands.base_velocity.rel_standing_envs", (500, 0.05), (750, 0.1), (1000, 0.15), (1500, 0.2), (2000, 0.25)+    )+    head_pose_range = _schedule(+        "commands.head_pose.ranges",+        (500, ((-0.17, 0.17), (-0.17, 0.17), (-0.21, 0.21), (-0.047, 0.047))),+        (1000, ((-0.39, 0.39), (-0.39, 0.39), (-0.49, 0.49), (-0.11, 0.11))),+        (1500, ((-0.72, 0.72), (-0.72, 0.72), (-0.91, 0.91), (-0.2, 0.2))),+        (2000, ((-1.1, 1.1), (-1.1, 1.1), (-1.4, 1.4), (-0.31, 0.31))),+    )+    com_range = _schedule(+        "events.randomize_com.params.com_range",+        (500, {axis: (-0.005, 0.005) for axis in "xyz"}),+        (1000, {axis: (-0.01, 0.01) for axis in "xyz"}),+        (1500, {axis: (-0.015, 0.015) for axis in "xyz"}),+    )+    head_com_range = _schedule(+        "events.randomize_head_com.params.com_range",+        (500, {axis: (-0.005, 0.005) for axis in "xyz"}),+        (1000, {axis: (-0.01, 0.01) for axis in "xyz"}),+    )+++@configclass+class MicroGooseVelocityFlatEnvCfg(ManagerBasedRLEnvCfg):+    """MicroGoose 15-DoF flat velocity walking with Newton MJWarp and BAM XL330 servos."""++    ngpus: int | None = None+    nnodes: int | None = None++    sim: SimulationCfg = SimulationCfg(+        physics=NewtonCfg(+            solver_cfg=MJWarpSolverCfg(+                njmax=112,+                nconmax=24,+                iterations=100,+                ls_iterations=50,+                cone="pyramidal",+                impratio=1.0,+                integrator="implicitfast",+                use_mujoco_contacts=False,+            ),+            collision_cfg=NewtonCollisionPipelineCfg(max_triangle_pairs=2500000),+            default_shape_cfg=NewtonShapeCfg(margin=0.0),+            num_substeps=1,+        )+    )+    scene: MicroGooseSceneCfg = MicroGooseSceneCfg(num_envs=4096, env_spacing=2.0)+    observations: ObservationsCfg = ObservationsCfg()+    actions: ActionsCfg = ActionsCfg()+    commands: CommandsCfg = CommandsCfg()+    rewards: RewardsCfg = RewardsCfg()+    terminations: TerminationsCfg = TerminationsCfg()+    events: EventsCfg = EventsCfg()+    curriculum: CurriculumCfg = CurriculumCfg()++    def __post_init__(self):+        self.decimation = 4+        self.episode_length_s = 20.0+        self.sim.dt = 0.005+        self.sim.use_newton_actuators = True+        self.sim.render_interval = self.decimation+        self.sim.physics_material = self.scene.terrain.physics_material+        self.scene.contact_forces.update_period = self.sim.dt+        self.scene.self_collision.update_period = self.sim.dt+        self.sim.visualizer_cfgs = VisualizerCfg(eye=(0.75, 0.75, 0.42), lookat=(0.0, 0.0, 0.14))++    def play_mode(self):+        """Use inference defaults and disable interval pushes."""+        super().play_mode()+        self.events.push_robot = None
rl/isaaclab_microgoose/contrib/microgoose/mdp/__init__.pyadded+10
@@ -0,0 +1,10 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""Stock manager terms and the terms needed for MicroDuck flat and rough walking."""++from isaaclab.utils.module import lazy_export++lazy_export()
rl/isaaclab_microgoose/contrib/microgoose/mdp/__init__.pyiadded+92
@@ -0,0 +1,92 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++__all__ = [+    # actions+    "BiasedJointPositionAction",+    "BiasedJointPositionActionCfg",+    # commands+    "MicroDuckRoughVelocityCommand",+    "MicroDuckVelocityCommand",+    "MicroDuckVelocityCommandCfg",+    "UniformPoseDeltaCommand",+    "UniformPoseDeltaCommandCfg",+    # curriculums+    "microduck_terrain_levels",+    "staged_value",+    # events+    "randomize_bam_friction",+    "randomize_encoder_bias",+    # observations+    "ImuNoiseCfg",+    "foot_air_time_safe",+    "foot_contact",+    "foot_contact_forces_safe",+    "foot_height_safe",+    "joint_pos_rel_biased",+    "joint_vel_rel_backlash",+    "misaligned_imu",+    # rewards+    "angular_momentum_l2",+    "body_ang_vel_xy_l2",+    "feet_air_time_windowed",+    "foot_clearance",+    "foot_slip",+    "foot_swing_height",+    "head_pose_bias_penalty",+    "head_pose_tracking",+    "joint_deviation_exp",+    "joint_pos_limits_finite",+    "self_collision_cost",+    "track_angular_velocity",+    "track_angular_velocity_world",+    "track_linear_velocity",+    "track_linear_velocity_heading",+    "upright",+    # terminations+    "robot_state_is_nan",+]++from .actions import BiasedJointPositionAction, BiasedJointPositionActionCfg+from .commands import (+    MicroDuckRoughVelocityCommand,+    MicroDuckVelocityCommand,+    MicroDuckVelocityCommandCfg,+    UniformPoseDeltaCommand,+    UniformPoseDeltaCommandCfg,+)+from .curriculums import microduck_terrain_levels, staged_value+from .events import randomize_bam_friction, randomize_encoder_bias+from .observations import (+    ImuNoiseCfg,+    foot_air_time_safe,+    foot_contact,+    foot_contact_forces_safe,+    foot_height_safe,+    joint_pos_rel_biased,+    joint_vel_rel_backlash,+    misaligned_imu,+)+from .rewards import (+    angular_momentum_l2,+    body_ang_vel_xy_l2,+    feet_air_time_windowed,+    foot_clearance,+    foot_slip,+    foot_swing_height,+    head_pose_bias_penalty,+    head_pose_tracking,+    joint_deviation_exp,+    joint_pos_limits_finite,+    self_collision_cost,+    track_angular_velocity,+    track_angular_velocity_world,+    track_linear_velocity,+    track_linear_velocity_heading,+    upright,+)+from .terminations import robot_state_is_nan++from isaaclab.envs.mdp import *
rl/isaaclab_microgoose/contrib/microgoose/mdp/actions.pyadded+44
@@ -0,0 +1,44 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking actions."""++from __future__ import annotations++from typing import TYPE_CHECKING++import torch++from isaaclab.envs.mdp.actions.actions_cfg import JointPositionActionCfg+from isaaclab.envs.mdp.actions.joint_actions import JointPositionAction+from isaaclab.utils.configclass import configclass++if TYPE_CHECKING:+    from isaaclab.envs import ManagerBasedEnv+++class BiasedJointPositionAction(JointPositionAction):+    """Joint position action that compensates the joint-encoder calibration error."""++    cfg: BiasedJointPositionActionCfg+    """The configuration of the action term."""++    encoder_bias: torch.Tensor+    """Encoder calibration error per environment and action joint [rad], shape (num_envs, action_dim)."""++    def __init__(self, cfg: BiasedJointPositionActionCfg, env: ManagerBasedEnv):+        super().__init__(cfg, env)+        self.encoder_bias = torch.zeros(self.num_envs, self.action_dim, device=self.device)++    def apply_actions(self):+        target = self.processed_actions - self.encoder_bias+        self._asset.set_joint_position_target_index(target=target, joint_ids=self._joint_ids)+++@configclass+class BiasedJointPositionActionCfg(JointPositionActionCfg):+    """Configuration for the encoder-bias-compensating joint position action term."""++    class_type: type[BiasedJointPositionAction] = BiasedJointPositionAction
rl/isaaclab_microgoose/contrib/microgoose/mdp/commands.pyadded+171
@@ -0,0 +1,171 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking commands."""++from __future__ import annotations++from collections.abc import Sequence+from typing import TYPE_CHECKING++import torch++from isaaclab.envs.mdp.commands import UniformVelocityCommand+from isaaclab.envs.mdp.commands.commands_cfg import UniformVelocityCommandCfg+from isaaclab.managers import CommandTerm, CommandTermCfg+from isaaclab.utils import math as math_utils+from isaaclab.utils.configclass import configclass++if TYPE_CHECKING:+    from isaaclab.envs import ManagerBasedRLEnv+++class UniformPoseDeltaCommand(CommandTerm):+    """Generic N-dimensional uniform pose-delta command."""++    cfg: UniformPoseDeltaCommandCfg+    """Configuration for the command term."""++    def __init__(self, cfg: UniformPoseDeltaCommandCfg, env: ManagerBasedRLEnv):+        """Initialize the command term."""+        super().__init__(cfg, env)+        self.dim = len(cfg.ranges)+        self._command = torch.zeros(self.num_envs, self.dim, device=self.device)++    @property+    def command(self) -> torch.Tensor:+        """Pose deltas [m or rad, depending on dimension], shape (num_envs, dim)."""+        return self._command++    def _update_metrics(self):+        pass++    def _update_command(self):+        pass++    def _resample_command(self, env_ids: Sequence[int] | slice):+        if isinstance(env_ids, slice):+            env_ids = torch.arange(self.num_envs, device=self.device)[env_ids]+        num_envs = len(env_ids)+        if num_envs == 0:+            return+        # Read the bounds on every resample: the curriculum widens the head-pose ranges during training.+        low, high = torch.tensor(self.cfg.ranges, device=self.device).unbind(-1)+        self._command[env_ids] = low + (high - low) * torch.rand(num_envs, self.dim, device=self.device)+++@configclass+class UniformPoseDeltaCommandCfg(CommandTermCfg):+    """Configuration for the N-dimensional uniform pose-delta command term."""++    class_type: type[UniformPoseDeltaCommand] = UniformPoseDeltaCommand+    ranges: tuple[tuple[float, float], ...] = ()+    """Per-dimension sampling bounds [m or rad, depending on dimension]. Length sets the command width."""+++class MicroDuckVelocityCommand(UniformVelocityCommand):+    """Velocity command with MicroDuck's forward-only and turn-in-place buckets."""++    cfg: MicroDuckVelocityCommandCfg+    """Configuration for the command term."""++    def _resample_command(self, env_ids: Sequence[int] | slice):+        if isinstance(env_ids, slice):+            env_ids = torch.arange(self.num_envs, device=self.device)[env_ids]+        else:+            env_ids = torch.as_tensor(env_ids, dtype=torch.long, device=self.device)+        super()._resample_command(env_ids)+        r = torch.empty(len(env_ids), device=self.device)+        forward_ids = env_ids[r.uniform_(0.0, 1.0) <= self.cfg.rel_forward_envs]+        if len(forward_ids) > 0:+            self.vel_command_b[forward_ids, 0] = (+                self.vel_command_b[forward_ids, 0].abs().clamp(min=self.cfg.forward_min_speed)+            )+            self.vel_command_b[forward_ids, 1] = 0.0+            self.vel_command_b[forward_ids, 2] = 0.0+        if self.cfg.rel_turn_in_place_envs <= 0.0:+            return+        turn_ids = env_ids[r.uniform_(0.0, 1.0) < self.cfg.rel_turn_in_place_envs]+        if len(turn_ids) == 0:+            return+        self.vel_command_b[turn_ids, :2] = 0.0+        low, high = self.cfg.ranges.ang_vel_z+        max_rate = max(abs(low), abs(high))+        turn_r = torch.empty(len(turn_ids), device=self.device)+        sign = torch.where(turn_r.uniform_(0.0, 1.0) < 0.5, -1.0, 1.0)+        magnitude = turn_r.uniform_(self.cfg.turn_in_place_min_fraction * max_rate, max_rate)+        self.vel_command_b[turn_ids, 2] = sign * magnitude+        self.is_standing_env[turn_ids] = False+++@configclass+class MicroDuckVelocityCommandCfg(UniformVelocityCommandCfg):+    """Configuration for the MicroDuck velocity command term."""++    class_type: type[MicroDuckVelocityCommand] = MicroDuckVelocityCommand+    rel_forward_envs: float = 0.0+    """Probability that an environment is drawn into the forward-only bucket. Defaults to 0.0.++    The turn-in-place bucket is drawn independently afterwards and takes precedence, so the effective forward-only+    share is ``rel_forward_envs * (1 - rel_turn_in_place_envs)``.+    """+    rel_turn_in_place_envs: float = 0.0+    """Probability that an environment is commanded to turn on the spot. Defaults to 0.0."""+    forward_min_speed: float = 0.3+    """Minimum forward speed of forward-only commands [m/s]."""+    turn_in_place_min_fraction: float = 0.4+    """Minimum turn-in-place yaw rate, as a fraction of the largest ``ang_vel_z`` bound [-]."""+++class MicroDuckRoughVelocityCommand(MicroDuckVelocityCommand):+    """Accumulate walking and tracking before command resampling for terrain progression."""++    def __init__(self, cfg: MicroDuckVelocityCommandCfg, env: ManagerBasedRLEnv):+        super().__init__(cfg, env)+        self.terrain_progress = {+            name: torch.zeros(self.num_envs, device=self.device)+            for name in ("commanded_distance", "walked_distance", "error_distance", "walking_time", "yaw_error", "time")+        }+        self._last_progress_step = torch.zeros(self.num_envs, dtype=torch.long, device=self.device)++    def record_terrain_progress(self, env_ids: Sequence[int] | slice = slice(None)) -> None:+        """Record each control sample once, including the terminal sample before reset.++        Distances and integrated XY error are in [m], times in [s], and integrated yaw-rate error in [rad].+        Translation commands of at least 0.05 [m/s] contribute to walking statistics.+        """+        steps = self._env.episode_length_buf[env_ids]+        dt = (steps > self._last_progress_step[env_ids]) * self._env.step_dt+        command = self.command[env_ids]+        velocity = math_utils.quat_apply_inverse(+            math_utils.yaw_quat(self.robot.data.root_link_quat_w.torch[env_ids]),+            self.robot.data.root_link_lin_vel_w.torch[env_ids],+        )[:, :2]+        speed = command[:, :2].norm(dim=-1)+        walking_dt = dt * (speed >= 0.05)+        values = {+            "commanded_distance": speed * walking_dt,+            "walked_distance": velocity.norm(dim=-1) * walking_dt,+            "error_distance": (command[:, :2] - velocity).norm(dim=-1) * walking_dt,+            "walking_time": walking_dt,+            "yaw_error": (command[:, 2] - self.robot.data.root_link_ang_vel_w.torch[env_ids, 2]).abs() * dt,+            "time": dt,+        }+        for name, value in values.items():+            self.terrain_progress[name][env_ids] += value+        self._last_progress_step[env_ids] = steps++    def _update_metrics(self):+        super()._update_metrics()+        self.record_terrain_progress()++    def reset(self, env_ids: Sequence[int] | None = None) -> dict[str, float]:+        """Clear progress after the curriculum has consumed the completed episodes."""+        extras = super().reset(env_ids)+        ids = slice(None) if env_ids is None else env_ids+        for value in self.terrain_progress.values():+            value[ids] = 0.0+        self._last_progress_step[ids] = 0+        return extras
rl/isaaclab_microgoose/contrib/microgoose/mdp/curriculums.pyadded+95
@@ -0,0 +1,95 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking curriculums."""++from __future__ import annotations++from collections.abc import Sequence+from typing import TYPE_CHECKING, Any++import torch++from isaaclab.envs.mdp import modify_term_cfg++from .commands import MicroDuckRoughVelocityCommand++if TYPE_CHECKING:+    from isaaclab.envs import ManagerBasedRLEnv+++def staged_value(+    env: ManagerBasedRLEnv, env_ids: Sequence[int], old_value: Any, stages: Sequence[tuple[int, Any]]+) -> Any:+    """``modify_fn`` for :class:`~isaaclab.envs.mdp.modify_term_cfg` that steps through a schedule.++    Args:+        stages: ``(start_step, value)`` pairs in increasing step order; the last reached value applies.+    """+    value = old_value+    for start_step, stage_value in stages:+        if env.common_step_counter >= start_step:+            value = stage_value+    return modify_term_cfg.NO_CHANGE if value == old_value else value+++def microduck_terrain_levels(+    env: ManagerBasedRLEnv,+    env_ids: Sequence[int] | slice,+    min_distance: float = 1.0,+    min_walking_time: float = 5.0,+    promote_error_ratio: float = 0.5,+    demote_error_ratio: float = 0.8,+    promote_yaw_error: float = 0.5,+    demote_yaw_error: float = 0.8,+) -> dict[str, torch.Tensor]:+    """Advance terrain after surviving and tracking sufficient commanded walking.++    Accumulated path length allows changing direction without losing progress. Mostly stationary episodes+    hold their level; failures demote.++    Args:+        env: The environment.+        env_ids: Environments about to reset.+        min_distance: Minimum commanded and actual walking distance for promotion [m].+        min_walking_time: Minimum translation-command duration [s], also at least 25% of the episode.+        promote_error_ratio: Maximum integrated XY error divided by commanded distance for promotion.+        demote_error_ratio: Integrated XY error divided by commanded distance above which to demote.+        promote_yaw_error: Maximum episode-mean yaw-rate error for promotion [rad/s].+        demote_yaw_error: Episode-mean yaw-rate error above which to demote [rad/s].+    """+    command: MicroDuckRoughVelocityCommand = env.command_manager.get_term("base_velocity")+    command.record_terrain_progress(env_ids)+    progress = {name: value[env_ids] for name, value in command.terrain_progress.items()}+    error_ratio = progress["error_distance"] / progress["commanded_distance"].clamp_min(1e-6)+    yaw_error = progress["yaw_error"] / progress["time"].clamp_min(env.step_dt)+    eligible = (+        (progress["commanded_distance"] >= min_distance)+        & (progress["walking_time"] >= min_walking_time)+        & (progress["walking_time"] >= 0.25 * progress["time"])+    )+    failed = env.termination_manager.terminated[env_ids]+    move_up = (+        eligible+        & ~failed+        & env.termination_manager.time_outs[env_ids]+        & (progress["walked_distance"] >= min_distance)+        & (error_ratio <= promote_error_ratio)+        & (yaw_error <= promote_yaw_error)+    )+    move_down = (+        (progress["time"] > 0.0)+        & (failed | (eligible & ((error_ratio > demote_error_ratio) | (yaw_error > demote_yaw_error))))+        & ~move_up+    )+    terrain = env.scene.terrain+    terrain.update_env_origins(env_ids, move_up, move_down)+    return {+        "mean": terrain.terrain_levels.float().mean(),+        "promoted": move_up.float().mean(),+        "demoted": move_down.float().mean(),+        "eligible": eligible.float().mean(),+        "walked_distance": progress["walked_distance"].nan_to_num().mean(),+    }
rl/isaaclab_microgoose/contrib/microgoose/mdp/events.pyadded+56
@@ -0,0 +1,56 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking events."""++from __future__ import annotations++from typing import TYPE_CHECKING++import torch++from isaaclab.actuators import BamActuatorCfg+from isaaclab.actuators.newton import read_group_parameter, write_group_parameter+from isaaclab.managers import SceneEntityCfg++if TYPE_CHECKING:+    from isaaclab.assets import Articulation+    from isaaclab.envs import ManagerBasedEnv+++def randomize_encoder_bias(+    env: ManagerBasedEnv, env_ids: torch.Tensor | None, bias_range: tuple[float, float], action_name: str = "joint_pos"+) -> None:+    """Sample joint-encoder calibration errors [rad] into the biased joint-position action term."""+    bias = env.action_manager.get_term(action_name).encoder_bias+    rows = slice(None) if env_ids is None else env_ids+    bias[rows] = torch.empty_like(bias[rows]).uniform_(*bias_range)+++def randomize_bam_friction(+    env: ManagerBasedEnv,+    env_ids: torch.Tensor | slice | None,+    scale_range: tuple[float, float] = (0.9, 1.1),+    asset_cfg: SceneEntityCfg = SceneEntityCfg("robot"),+) -> None:+    """Sample one friction-budget multiplier per environment and broadcast it to all BAM servos."""+    asset: Articulation = env.scene[asset_cfg.name]+    if env_ids is None:+        env_ids = torch.arange(env.num_envs, device=env.device)+    elif isinstance(env_ids, slice):+        env_ids = torch.arange(env.num_envs, device=env.device)[env_ids]+    scales = torch.empty(len(env_ids), 1, device=env.device).uniform_(*scale_range)+    for name, actuator_cfg in asset.cfg.actuators.items():+        if not isinstance(actuator_cfg, BamActuatorCfg):+            continue+        num_group_joints = read_group_parameter(asset.actuators, name, "drive", "friction_scale").shape[1]+        write_group_parameter(+            asset.actuators,+            name,+            "drive",+            "friction_scale",+            values=scales.expand(len(env_ids), num_group_joints),+            env_ids=env_ids,+        )
rl/isaaclab_microgoose/contrib/microgoose/mdp/observations.pyadded+222
@@ -0,0 +1,222 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking observations."""++from __future__ import annotations++import math+from collections.abc import Callable, Sequence+from dataclasses import MISSING+from typing import TYPE_CHECKING++import torch++from isaaclab.managers import SceneEntityCfg+from isaaclab.managers.manager_base import ManagerTermBase+from isaaclab.utils.buffers import CircularBuffer+from isaaclab.utils.configclass import configclass+from isaaclab.utils.math import quat_apply, quat_from_angle_axis+from isaaclab.utils.noise import NoiseCfg++if TYPE_CHECKING:+    from isaaclab.assets import Articulation+    from isaaclab.envs import ManagerBasedEnv, ManagerBasedRLEnv+    from isaaclab.managers import ObservationTermCfg+    from isaaclab.sensors import ContactSensor+++"""+Sensor-model observations.+"""+++def joint_pos_rel_biased(+    env: ManagerBasedEnv,+    asset_cfg: SceneEntityCfg = SceneEntityCfg("robot"),+    biased: bool = True,+    action_name: str = "joint_pos",+    backlash_cfg: SceneEntityCfg | None = None,+) -> torch.Tensor:+    """Encoder offsets from the default pose [rad], optionally including paired gearbox play.++    ``asset_cfg`` must select the joints of the ``action_name`` action term, in the same order, and+    ``backlash_cfg`` the passive hinges in that order. Calibration bias belongs to the servo encoder only.+    """+    asset: Articulation = env.scene[asset_cfg.name]+    joint_pos = asset.data.joint_pos.torch[:, asset_cfg.joint_ids]+    if biased:+        joint_pos = joint_pos + env.action_manager.get_term(action_name).encoder_bias+    if backlash_cfg is not None:+        joint_pos = joint_pos + env.scene[backlash_cfg.name].data.joint_pos.torch[:, backlash_cfg.joint_ids]+    return joint_pos - asset.data.default_joint_pos.torch[:, asset_cfg.joint_ids]+++def joint_vel_rel_backlash(+    env: ManagerBasedEnv, asset_cfg: SceneEntityCfg, backlash_cfg: SceneEntityCfg+) -> torch.Tensor:+    """Encoder velocity relative to the default [rad/s], including the paired play hinges.++    Both selections must list corresponding servo and passive joints in the same order.+    """+    asset: Articulation = env.scene[asset_cfg.name]+    velocity = asset.data.joint_vel.torch[:, asset_cfg.joint_ids]+    velocity = velocity + env.scene[backlash_cfg.name].data.joint_vel.torch[:, backlash_cfg.joint_ids]+    return velocity - asset.data.default_joint_vel.torch[:, asset_cfg.joint_ids]+++class misaligned_imu(ManagerTermBase):+    """Root angular velocity [rad/s] then projected gravity, read by a misaligned IMU with bus latency.++    Each environment draws a fixed mounting rotation at construction, about a uniform random axis by an angle in+    ``[0, max_angle_deg]`` [deg], and applies it to both readings. Each reading lags by its own draw in+    ``[min_lag, max_lag]`` samples, redrawn every ``update_period`` samples with its own per-environment phase to+    match upstream's separate IMU delay buffers. All parameters are fixed at construction; ``max_lag`` sizes the+    history buffer.+    """++    def __init__(self, cfg: ObservationTermCfg, env: ManagerBasedRLEnv):+        super().__init__(cfg, env)+        axis = torch.nn.functional.normalize(torch.randn(self.num_envs, 3, device=self.device), dim=-1)+        angle = torch.rand(self.num_envs, device=self.device) * math.radians(cfg.params["max_angle_deg"])+        self._quat = quat_from_angle_axis(angle, axis)+        self._min_lag = cfg.params["min_lag"]+        self._max_lag = cfg.params["max_lag"]+        self._update_period = cfg.params["update_period"]+        self._buffer = CircularBuffer(max_len=self._max_lag + 1, batch_size=self.num_envs, device=self.device)+        self._lags = torch.zeros(self.num_envs, 2, dtype=torch.long, device=self.device)+        self._step_count = torch.zeros(self.num_envs, dtype=torch.long, device=self.device)+        self._phase_offsets = torch.zeros(self.num_envs, 2, dtype=torch.long, device=self.device)+        self._pending_reset = torch.zeros(self.num_envs, dtype=torch.bool, device=self.device)+        self._has_pending_reset = False+        self._last_step: int | None = None+        self._output: torch.Tensor | None = None+        self.reset()++    def reset(self, env_ids: Sequence[int] | None = None) -> None:+        resolved = slice(None) if env_ids is None else env_ids+        self._lags[resolved] = 0+        self._step_count[resolved] = 0+        phases = torch.randint(0, self._update_period, (self.num_envs, 2), device=self.device)+        self._phase_offsets[resolved] = phases[resolved]+        self._pending_reset[resolved] = True+        self._has_pending_reset = True++    def __call__(+        self,+        env: ManagerBasedRLEnv,+        max_angle_deg: float,+        min_lag: int,+        max_lag: int,+        update_period: int,+        asset_cfg: SceneEntityCfg = SceneEntityCfg("robot"),+    ) -> torch.Tensor:+        """Return each environment's reading from its current lag, shape (num_envs, 6)."""+        # Repeated reads within one step return the same sample, except for freshly reset environments.+        repeated_read = env.common_step_counter == self._last_step+        if repeated_read and not self._has_pending_reset:+            return self._output+        asset: Articulation = env.scene[asset_cfg.name]+        vectors = torch.stack((asset.data.root_ang_vel_b.torch, asset.data.projected_gravity_b.torch), dim=1)+        reading = quat_apply(self._quat.unsqueeze(1), vectors).flatten(start_dim=1)+        if repeated_read:+            return torch.where(self._pending_reset.unsqueeze(-1), reading, self._output)+        if self._has_pending_reset:+            self._buffer.reset(self._pending_reset)+            self._pending_reset.fill_(False)+            self._has_pending_reset = False+        self._last_step = env.common_step_counter+        self._buffer.append(reading)+        should_update = (self._step_count.unsqueeze(-1) + self._phase_offsets) % self._update_period == 0+        candidates = torch.randint(self._min_lag, self._max_lag + 1, (self.num_envs, 2), device=self.device)+        self._lags = torch.where(should_update, candidates, self._lags)+        self._step_count += 1+        self._output = torch.cat((self._buffer[self._lags[:, 0]][:, :3], self._buffer[self._lags[:, 1]][:, 3:]), dim=-1)+        return self._output+++def imu_noise(data: torch.Tensor, cfg: ImuNoiseCfg) -> torch.Tensor:+    """Add uniform noise within ``cfg.ang_vel`` to angular velocity and within ``cfg.gravity`` to gravity."""+    noise = torch.rand_like(data) * 2.0 - 1.0+    return data + torch.cat((noise[:, :3] * cfg.ang_vel, noise[:, 3:] * cfg.gravity), dim=-1)+++@configclass+class ImuNoiseCfg(NoiseCfg):+    """Additive uniform noise on :class:`misaligned_imu`, with one bound per reading."""++    func: Callable[[torch.Tensor, ImuNoiseCfg], torch.Tensor] = imu_noise+    ang_vel: float = MISSING+    """Angular-velocity noise bound [rad/s]."""+    gravity: float = MISSING+    """Projected-gravity noise bound."""+++"""+Privileged foot observations.+"""+++def zero_non_finite(value: torch.Tensor) -> torch.Tensor:+    """Replace non-finite entries with zero."""+    return torch.nan_to_num(value, nan=0.0, posinf=0.0, neginf=0.0)+++def foot_contact(env: ManagerBasedEnv, sensor_cfg: SceneEntityCfg) -> torch.Tensor:+    """Whether each selected foot is in contact with anything."""+    sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    forces = sensor.data.net_forces_w.torch[:, sensor_cfg.body_ids]+    in_contact = (forces.norm(dim=-1) > 0.0).float()+    return in_contact+++def foot_contact_forces_safe(env: ManagerBasedEnv, sensor_cfg: SceneEntityCfg) -> torch.Tensor:+    """Net contact force on each selected body, log-compressed and guarded against NaNs."""+    sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    forces = sensor.data.net_forces_w.torch[:, sensor_cfg.body_ids]+    forces = forces.flatten(start_dim=1)+    return zero_non_finite(torch.sign(forces) * torch.log1p(forces.abs()))+++def foot_air_time_safe(env: ManagerBasedEnv, sensor_cfg: SceneEntityCfg) -> torch.Tensor:+    """Air time [s] per foot, with non-finite values replaced by zero."""+    sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    return zero_non_finite(sensor.data.current_air_time.torch[:, sensor_cfg.body_ids])+++def foot_height(+    env: ManagerBasedEnv, asset_cfg: SceneEntityCfg, height_sensor_names: tuple[str, ...] = ()+) -> torch.Tensor:+    """Foot-frame clearance [m], using the closest terrain ray per foot when supplied.++    Sensors must follow the selected bodies' order. Missed rays are ignored; when all rays+    miss, clearance falls back to the terrain origin, bounded by the sensor range.+    Without sensors, the terrain origin defines the flat ground height.+    """+    asset: Articulation = env.scene[asset_cfg.name]+    heights = asset.data.body_link_pos_w.torch[:, asset_cfg.body_ids, 2]+    flat_heights = heights - env.scene.env_origins[:, 2].unsqueeze(-1)+    if not height_sensor_names:+        return flat_heights+    clearances = []+    for index, name in enumerate(height_sensor_names):+        sensor = env.scene[name]+        data = sensor.data+        hit_z = data.ray_hits_w.torch[..., 2]+        valid = torch.isfinite(hit_z)+        clearance = (heights[:, index, None] - hit_z).clamp(min=0.0)+        # A ray inside terrain can hit the underside of a step.+        clearance = torch.where(data.ray_normals_w.torch[..., 2] < 0.0, 0.0, clearance)+        clearance = torch.where(valid, clearance, sensor.cfg.max_distance).amin(dim=-1)+        fallback = flat_heights[:, index].clamp(0.0, sensor.cfg.max_distance)+        clearances.append(torch.where(valid.any(dim=-1), clearance, fallback))+    return torch.stack(clearances, dim=-1)+++def foot_height_safe(+    env: ManagerBasedEnv, asset_cfg: SceneEntityCfg, height_sensor_names: tuple[str, ...] = ()+) -> torch.Tensor:+    """Foot clearance [m] above terrain, with non-finite values replaced by zero."""+    return zero_non_finite(foot_height(env, asset_cfg, height_sensor_names))
rl/isaaclab_microgoose/contrib/microgoose/mdp/rewards.pyadded+339
@@ -0,0 +1,339 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking rewards.++Rewards run before resets, so a state that ``robot_state_is_nan`` terminates still reaches them once;+terms that read the robot state return zero, or ``upright`` its minimum, instead of a non-finite value.+"""++from __future__ import annotations++from collections.abc import Sequence+from typing import TYPE_CHECKING++import torch++from isaaclab.envs.mdp import body_projected_gravity_b+from isaaclab.envs.mdp import joint_pos_limits as _joint_pos_limits+from isaaclab.managers import ManagerTermBase, RewardTermCfg, SceneEntityCfg+from isaaclab.utils import math as math_utils+from isaaclab.utils.string import resolve_matching_names_values++from .observations import foot_height, joint_pos_rel_biased, zero_non_finite++if TYPE_CHECKING:+    from isaaclab.assets import Articulation+    from isaaclab.envs import ManagerBasedRLEnv+    from isaaclab.sensors import ContactSensor+++def _command_magnitude(env: ManagerBasedRLEnv, command_name: str) -> torch.Tensor:+    """Upstream's scalar command magnitude ``|v_xy| + |w_z|``."""+    command = env.command_manager.get_command(command_name)+    return torch.norm(command[:, :2], dim=1) + torch.abs(command[:, 2])+++"""+Velocity-tracking rewards.+"""+++def track_linear_velocity(+    env: ManagerBasedRLEnv, std: float, command_name: str, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """Track linear velocity, including vertical drift, with tolerance ``std`` [m/s]."""+    asset: Articulation = env.scene[asset_cfg.name]+    command = env.command_manager.get_command(command_name)+    actual = asset.data.root_link_lin_vel_b.torch+    xy_error = torch.sum(torch.square(command[:, :2] - actual[:, :2]), dim=1)+    z_error = torch.square(actual[:, 2])+    return zero_non_finite(torch.exp(-(xy_error + z_error) / std**2))+++def track_angular_velocity(+    env: ManagerBasedRLEnv, std: float, command_name: str, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """Track yaw rate, including roll/pitch drift, with tolerance ``std`` [rad/s]."""+    asset: Articulation = env.scene[asset_cfg.name]+    command = env.command_manager.get_command(command_name)+    actual = asset.data.root_link_ang_vel_b.torch+    z_error = torch.square(command[:, 2] - actual[:, 2])+    xy_error = torch.sum(torch.square(actual[:, :2]), dim=1)+    return zero_non_finite(torch.exp(-(z_error + xy_error) / std**2))+++def track_linear_velocity_heading(+    env: ManagerBasedRLEnv, std: float, command_name: str, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """Track horizontal root-link velocity in the heading frame with tolerance ``std`` [m/s]."""+    asset: Articulation = env.scene[asset_cfg.name]+    command = env.command_manager.get_command(command_name)+    actual = math_utils.quat_apply_inverse(+        math_utils.yaw_quat(asset.data.root_link_quat_w.torch), asset.data.root_link_lin_vel_w.torch+    )+    error = torch.sum(torch.square(command[:, :2] - actual[:, :2]), dim=1)+    return zero_non_finite(torch.exp(-error / std**2))+++def track_angular_velocity_world(+    env: ManagerBasedRLEnv, std: float, command_name: str, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """Track world-frame yaw rate with tolerance ``std`` [rad/s]."""+    asset: Articulation = env.scene[asset_cfg.name]+    command = env.command_manager.get_command(command_name)+    error = torch.square(command[:, 2] - asset.data.root_link_ang_vel_w.torch[:, 2])+    return zero_non_finite(torch.exp(-error / std**2))+++"""+Posture rewards.+"""+++def upright(env: ManagerBasedRLEnv, std: float, asset_cfg: SceneEntityCfg) -> torch.Tensor:+    """Reward keeping one body's frame aligned with gravity, using a Gaussian kernel."""+    projected_gravity_b = body_projected_gravity_b(env, asset_cfg)+    xy_squared = torch.sum(torch.square(projected_gravity_b[:, :2]), dim=1)+    xy_squared = torch.nan_to_num(xy_squared, nan=1.0, posinf=1.0, neginf=1.0)+    return torch.exp(-xy_squared / std**2)+++class joint_deviation_exp(ManagerTermBase):+    """Reward staying near the default joint positions, with a per-joint tolerance that widens once the robot moves.++    The tolerance is ``std_standing`` [rad] while the command magnitude is below ``walking_threshold``, and+    ``std_walking`` [rad] otherwise. With ``standing_only=True``, walking commands receive zero reward.+    """++    def __init__(self, cfg: RewardTermCfg, env: ManagerBasedRLEnv):+        """Resolve the standing and walking per-joint standard deviations."""+        super().__init__(cfg, env)+        asset_cfg: SceneEntityCfg = cfg.params["asset_cfg"]+        joint_names = [env.scene[asset_cfg.name].joint_names[index] for index in asset_cfg.joint_ids]+        self._std = {}+        for key in ("std_standing", "std_walking"):+            _, _, values = resolve_matching_names_values(cfg.params[key], joint_names)+            self._std[key] = torch.tensor(values, dtype=torch.float32, device=env.device).unsqueeze(0)++    def __call__(+        self,+        env: ManagerBasedRLEnv,+        command_name: str,+        std_standing: dict[str, float],+        std_walking: dict[str, float],+        walking_threshold: float,+        asset_cfg: SceneEntityCfg,+        standing_only: bool = False,+    ) -> torch.Tensor:+        """Compute the posture reward."""+        asset: Articulation = env.scene[asset_cfg.name]+        standing = (_command_magnitude(env, command_name) < walking_threshold).unsqueeze(1)+        std = torch.where(standing, self._std["std_standing"], self._std["std_walking"])+        joint_pos = asset.data.joint_pos.torch[:, asset_cfg.joint_ids]+        default_joint_pos = asset.data.default_joint_pos.torch[:, asset_cfg.joint_ids]+        error_squared = torch.square(joint_pos - default_joint_pos)+        reward = zero_non_finite(torch.exp(-torch.mean(error_squared / std**2, dim=1)))+        return reward * standing.squeeze(1) if standing_only else reward+++"""+Head-pose rewards.+"""+++def head_pose_tracking(+    env: ManagerBasedRLEnv,+    command_name: str,+    std: float,+    asset_cfg: SceneEntityCfg = SceneEntityCfg("robot"),+    backlash_cfg: SceneEntityCfg | None = None,+) -> torch.Tensor:+    """Track head encoder offsets with tolerance ``std`` [rad], including play when configured."""+    command = env.command_manager.get_command(command_name)+    error = joint_pos_rel_biased(env, asset_cfg, biased=False, backlash_cfg=backlash_cfg) - command+    return zero_non_finite(torch.exp(-((error / std) ** 2)).mean(dim=-1))+++class head_pose_bias_penalty(ManagerTermBase):+    """Penalize a head-pose error that persists, as opposed to one that averages out."""++    def __init__(self, cfg: RewardTermCfg, env: ManagerBasedRLEnv):+        """Allocate the per-environment moving average."""+        super().__init__(cfg, env)+        self._error_ema = torch.zeros(env.num_envs, len(cfg.params["asset_cfg"].joint_ids), device=env.device)++    def reset(self, env_ids: Sequence[int] | None = None) -> None:+        """Forget the average for the environments that restarted."""+        if env_ids is None:+            self._error_ema[:] = 0.0+        else:+            self._error_ema[env_ids] = 0.0++    def __call__(+        self,+        env: ManagerBasedRLEnv,+        command_name: str,+        tau_s: float,+        asset_cfg: SceneEntityCfg,+        backlash_cfg: SceneEntityCfg | None = None,+    ) -> torch.Tensor:+        """Return the absolute error averaged with time constant ``tau_s`` [s]."""+        command = env.command_manager.get_command(command_name)+        error = zero_non_finite(joint_pos_rel_biased(env, asset_cfg, biased=False, backlash_cfg=backlash_cfg) - command)+        alpha = min(1.0, env.step_dt / tau_s)+        self._error_ema = (1.0 - alpha) * self._error_ema + alpha * error+        return zero_non_finite(self._error_ema.abs().mean(dim=-1))+++"""+Gait and foot rewards.+"""+++def feet_air_time_windowed(+    env: ManagerBasedRLEnv,+    sensor_cfg: SceneEntityCfg,+    command_name: str,+    threshold_min: float,+    threshold_max: float,+    command_threshold: float,+) -> torch.Tensor:+    """Reward air time strictly between ``threshold_min`` and ``threshold_max`` [s] while moving."""+    contact_sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    current_air_time = contact_sensor.data.current_air_time.torch[:, sensor_cfg.body_ids]+    in_range = (current_air_time > threshold_min) & (current_air_time < threshold_max)+    reward = torch.sum(in_range.float(), dim=1)+    reward = reward * (_command_magnitude(env, command_name) > command_threshold).float()+    return reward+++def foot_clearance(+    env: ManagerBasedRLEnv,+    target_height: float,+    command_name: str,+    asset_cfg: SceneEntityCfg,+    command_threshold: float,+    height_sensor_names: tuple[str, ...] = (),+) -> torch.Tensor:+    """Penalize moving feet that deviate from ``target_height`` [m] above the ground."""+    asset: Articulation = env.scene[asset_cfg.name]+    heights = foot_height(env, asset_cfg, height_sensor_names)+    foot_vel_xy = asset.data.body_link_lin_vel_w.torch[:, asset_cfg.body_ids, :2]+    cost = torch.sum(torch.abs(heights - target_height) * torch.norm(foot_vel_xy, dim=-1), dim=1)+    return zero_non_finite(cost * (_command_magnitude(env, command_name) > command_threshold).float())+++class foot_swing_height(ManagerTermBase):+    """Penalize, on touchdown, how far the peak of the swing was from a target height."""++    def __init__(self, cfg: RewardTermCfg, env: ManagerBasedRLEnv):+        """Allocate the per-foot peak heights."""+        super().__init__(cfg, env)+        num_feet = len(cfg.params["sensor_cfg"].body_ids)+        self._peak_heights = torch.zeros(env.num_envs, num_feet, device=env.device)++    def reset(self, env_ids: Sequence[int] | None = None) -> None:+        """Forget the tracked peaks for the environments that restarted."""+        if env_ids is None:+            self._peak_heights[:] = 0.0+        else:+            self._peak_heights[env_ids] = 0.0++    def __call__(+        self,+        env: ManagerBasedRLEnv,+        sensor_cfg: SceneEntityCfg,+        asset_cfg: SceneEntityCfg,+        target_height: float,+        command_name: str,+        command_threshold: float,+        height_sensor_names: tuple[str, ...] = (),+    ) -> torch.Tensor:+        """Penalize touchdown error relative to ``target_height`` [m]."""+        contact_sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+        in_air = contact_sensor.data.current_contact_time.torch[:, sensor_cfg.body_ids] == 0.0+        heights = zero_non_finite(foot_height(env, asset_cfg, height_sensor_names))+        self._peak_heights = torch.where(in_air, torch.maximum(self._peak_heights, heights), self._peak_heights)+        first_contact = contact_sensor.compute_first_contact(env.step_dt).torch[:, sensor_cfg.body_ids] > 0.5+        error = self._peak_heights / target_height - 1.0+        cost = torch.sum(torch.square(error) * first_contact.float(), dim=1)+        cost = cost * (_command_magnitude(env, command_name) > command_threshold).float()+        self._peak_heights = torch.where(first_contact, torch.zeros_like(self._peak_heights), self._peak_heights)+        return zero_non_finite(cost)+++def foot_slip(+    env: ManagerBasedRLEnv,+    sensor_cfg: SceneEntityCfg,+    command_name: str,+    asset_cfg: SceneEntityCfg,+    command_threshold: float,+) -> torch.Tensor:+    """Penalize the squared planar speed of feet that are on the ground."""+    contact_sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    asset: Articulation = env.scene[asset_cfg.name]+    in_contact = (contact_sensor.data.current_contact_time.torch[:, sensor_cfg.body_ids] > 0.0).float()+    foot_vel_xy = asset.data.body_link_lin_vel_w.torch[:, asset_cfg.body_ids, :2]+    cost = torch.sum(torch.square(torch.norm(foot_vel_xy, dim=-1)) * in_contact, dim=1)+    return zero_non_finite(cost * (_command_magnitude(env, command_name) > command_threshold).float())+++"""+Regularization penalties.+"""+++def body_ang_vel_xy_l2(env: ManagerBasedRLEnv, asset_cfg: SceneEntityCfg) -> torch.Tensor:+    """Penalize the roll and pitch rate of selected bodies, in the world frame."""+    asset: Articulation = env.scene[asset_cfg.name]+    ang_vel_xy = asset.data.body_link_ang_vel_w.torch[:, asset_cfg.body_ids, :2]+    return zero_non_finite(torch.sum(torch.square(ang_vel_xy), dim=(1, 2)))+++def angular_momentum_l2(env: ManagerBasedRLEnv, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")) -> torch.Tensor:+    """Penalize the squared magnitude of the articulation's angular momentum about its own centre of mass."""+    asset: Articulation = env.scene[asset_cfg.name]+    mass = asset.data.body_mass.torch[:, asset_cfg.body_ids]+    pos_w = asset.data.body_com_pos_w.torch[:, asset_cfg.body_ids]+    lin_vel_w = asset.data.body_com_lin_vel_w.torch[:, asset_cfg.body_ids]+    ang_vel_w = asset.data.body_com_ang_vel_w.torch[:, asset_cfg.body_ids]+    quat_w = asset.data.body_com_quat_w.torch[:, asset_cfg.body_ids]+    inertia_b = asset.data.body_inertia.torch[:, asset_cfg.body_ids].view(*mass.shape, 3, 3)+    total_mass = mass.sum(dim=1, keepdim=True).unsqueeze(-1)+    com_pos_w = (mass.unsqueeze(-1) * pos_w).sum(dim=1, keepdim=True) / total_mass+    com_lin_vel_w = (mass.unsqueeze(-1) * lin_vel_w).sum(dim=1, keepdim=True) / total_mass+    rot = math_utils.matrix_from_quat(quat_w)+    inertia_w = torch.matmul(rot, torch.matmul(inertia_b, rot.transpose(-2, -1)))+    spin = torch.matmul(inertia_w, ang_vel_w.unsqueeze(-1)).squeeze(-1)+    orbit = mass.unsqueeze(-1) * torch.cross(pos_w - com_pos_w, lin_vel_w - com_lin_vel_w, dim=-1)+    momentum = (spin + orbit).sum(dim=1)+    return zero_non_finite(torch.sum(torch.square(momentum), dim=-1))+++def joint_pos_limits_finite(+    env: ManagerBasedRLEnv, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """:func:`~isaaclab.envs.mdp.joint_pos_limits`, zero for environments whose state is not finite."""+    return zero_non_finite(_joint_pos_limits(env, asset_cfg))+++"""+Contact penalties.+"""+++def self_collision_cost(+    env: ManagerBasedRLEnv, sensor_cfg: SceneEntityCfg, force_threshold: float = 1.0+) -> torch.Tensor:+    """Penalize parts of the robot that are touching the robot itself."""+    contact_sensor: ContactSensor = env.scene.sensors[sensor_cfg.name]+    force_matrix_w = contact_sensor.data.force_matrix_w+    if force_matrix_w is None:+        raise RuntimeError(f"{sensor_cfg.name} needs a filtered contact sensor to measure self-contacts.")+    forces = force_matrix_w.torch[:, sensor_cfg.body_ids]+    in_contact = torch.linalg.norm(forces, dim=-1) > force_threshold+    touching = in_contact.any(dim=-1)+    return touching.sum(dim=-1).float()
rl/isaaclab_microgoose/contrib/microgoose/mdp/symmetry.pyadded+89
@@ -0,0 +1,89 @@+# Copyright (c) 2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""Sagittal reflection for MicroGoose's 64-D policy / 79-D critic observation terms and 15-DoF servo order."""++from __future__ import annotations++import functools+from typing import TYPE_CHECKING++import torch+from tensordict import TensorDict++if TYPE_CHECKING:+    from isaaclab.envs import ManagerBasedRLEnv++# MICROGOOSE_JOINT_NAMES order (dxlId 1..15):+#   0..4:   left_hip_yaw (+Z), left_hip_roll (+X), left_hip_pitch (+Y), left_knee_pitch (+Y), left_ankle_pitch (+Y)+#   5..9:   right_hip_yaw (+Z), right_hip_roll (+X), right_hip_pitch (+Y), right_knee_pitch (+Y), right_ankle_pitch (+Y)+#   10..14: neck_pitch (+Y), head_pitch (+Y), head_yaw (+Z), head_roll (+X), beak_pitch (+Y)+# Under sagittal reflection (Y -> -Y), axial vectors reverse X and Z components (-1) and preserve +Y pitch (+1).+_JOINT_PERMUTATION = (5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 10, 11, 12, 13, 14)+_JOINT_SIGNS = (-1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1)++_TERM_SIGNS = {+    "imu": (-1, 1, -1, 1, -1, 1),+    "base_lin_vel": (1, -1, 1),+    "base_ang_vel": (-1, 1, -1),+    "projected_gravity": (1, -1, 1),+    "velocity_commands": (1, -1, -1),+    "head_pose_commands": (1, 1, -1, -1),+    "body_pose_commands": (1, -1, 1, -1, 1, -1),+}++[email protected]+def _reflection(layout: tuple[tuple[str, tuple[int, ...]], ...], device: str) -> tuple[torch.Tensor, torch.Tensor]:+    """Cache permutations by manager term layout and device."""+    permutation, signs = [], []+    for name, shape in layout:+        if name in ("joint_pos", "joint_vel", "actions"):+            term_permutation, term_signs = _JOINT_PERMUTATION, _JOINT_SIGNS+        elif name in ("foot_height", "foot_air_time", "foot_contact"):+            term_permutation, term_signs = (1, 0), (1, 1)+        elif name == "foot_contact_forces":+            term_permutation, term_signs = (3, 4, 5, 0, 1, 2), (1, -1, 1, 1, -1, 1)+        elif name in _TERM_SIGNS:+            term_signs = _TERM_SIGNS[name]+            term_permutation = range(len(term_signs))+        else:+            raise ValueError(f"Unsupported MicroGoose observation term {name!r}.")+        if shape != (len(term_signs),):+            raise ValueError(f"Unsupported MicroGoose observation shape for {name!r}: {shape}.")+        start = len(permutation)+        permutation.extend(start + index for index in term_permutation)+        signs.extend(term_signs)+    return torch.tensor(permutation, device=device, dtype=torch.long), torch.tensor(signs, device=device)++[email protected]_grad()+def compute_symmetric_states(+    env: ManagerBasedRLEnv | None,+    obs: TensorDict | None = None,+    actions: torch.Tensor | None = None,+) -> tuple[TensorDict | None, torch.Tensor | None]:+    """Append left/right mirrored samples for RSL-RL augmentation and mirror-loss evaluation."""+    obs_aug = None+    if obs is not None:+        if env is None:+            raise ValueError("MicroGoose observation reflection requires an environment observation manager.")+        manager = env.unwrapped.observation_manager+        obs_aug = obs.repeat(2)+        for group, values in obs.items():+            if group not in ("policy", "critic"):+                raise ValueError(f"Unsupported MicroGoose observation group {group!r}.")+            layout = tuple(zip(manager.active_terms[group], manager.group_obs_term_dim[group], strict=True))+            permutation, signs = _reflection(layout, str(values.device))+            if values.shape[-1] != len(permutation):+                raise ValueError(f"Unsupported MicroGoose observation layout for {group!r}: {values.shape}.")+            obs_aug[group][obs.batch_size[0] :] = values[..., permutation] * signs+    actions_aug = None+    if actions is not None:+        if actions.shape[-1] != 15:+            raise ValueError(f"Expected 15 MicroGoose servo actions, got {actions.shape}.")+        permutation, signs = _reflection((("actions", (15,)),), str(actions.device))+        actions_aug = torch.cat((actions, actions[..., permutation] * signs), dim=0)+    return obs_aug, actions_aug
rl/isaaclab_microgoose/contrib/microgoose/mdp/terminations.pyadded+37
@@ -0,0 +1,37 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""MicroDuck walking terminations."""++from __future__ import annotations++from collections.abc import Sequence+from typing import TYPE_CHECKING++import torch++from isaaclab.managers import SceneEntityCfg++if TYPE_CHECKING:+    from isaaclab.assets import Articulation+    from isaaclab.envs import ManagerBasedRLEnv+++def robot_state_is_nan(+    env: ManagerBasedRLEnv, sensor_names: Sequence[str] = (), asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")+) -> torch.Tensor:+    """Terminate environments whose robot state has stopped being finite."""+    asset: Articulation = env.scene[asset_cfg.name]+    data = asset.data+    is_broken = ~torch.isfinite(data.joint_pos.torch).all(dim=1)+    is_broken |= ~torch.isfinite(data.joint_vel.torch).all(dim=1)+    is_broken |= ~torch.isfinite(data.root_link_pos_w.torch).all(dim=1)+    is_broken |= ~torch.isfinite(data.root_link_quat_w.torch).all(dim=1)+    is_broken |= ~torch.isfinite(data.root_link_lin_vel_w.torch).all(dim=1)+    is_broken |= ~torch.isfinite(data.root_link_ang_vel_w.torch).all(dim=1)+    for name in sensor_names:+        net_forces_w = env.scene.sensors[name].data.net_forces_w.torch+        is_broken |= ~torch.isfinite(net_forces_w).flatten(start_dim=1).all(dim=1)+    return is_broken
rl/isaaclab_microgoose/contrib/microgoose/rough_env_cfg.pyadded+135
@@ -0,0 +1,135 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).+# All rights reserved.+#+# SPDX-License-Identifier: BSD-3-Clause++"""Blind rough-terrain walking for 15-DoF Adom MicroGoose."""++import trimesh+from isaaclab_newton.sim.schemas import MujocoCollisionCfg++import isaaclab.sim as sim_utils+import isaaclab.terrains as terrain_gen+from isaaclab.managers import CurriculumTermCfg+from isaaclab.sensors import RayCasterCfg, patterns+from isaaclab.utils import configclass++from .flat_env_cfg import CurriculumCfg, MicroGooseSceneCfg, MicroGooseVelocityFlatEnvCfg, _schedule+from .mdp.commands import MicroDuckRoughVelocityCommand, MicroDuckVelocityCommand+from .mdp.curriculums import microduck_terrain_levels+++class MicroGooseTerrainImporter(terrain_gen.TerrainImporter):+    """Author terrain contact response before Newton parses the scene."""++    def import_mesh(self, name: str, mesh: trimesh.Trimesh) -> None:+        super().import_mesh(name, mesh)+        sim_utils.apply_collision_properties(+            f"{self.cfg.prim_path}/{name}/mesh",+            [MujocoCollisionCfg(solref=(0.04, 1.0), solimp=(0.85, 0.95, 0.001, 0.5, 2.0))],+        )+++@configclass+class MicroGooseRoughSceneCfg(MicroGooseSceneCfg):+    """Walking scene with two terrain rays per foot, excluded from actor observations."""++    left_foot_height = RayCasterCfg(+        prim_path="{ENV_REGEX_NS}/Robot/Geometry/torso/left_hip_yaw_link/left_hip_roll_link/left_thigh_link/left_shank_link/left_foot_link",+        mesh_prim_paths=["/World/ground"],+        ray_alignment="yaw",+        pattern_cfg=patterns.GridPatternCfg(resolution=0.08, size=(0.08, 0.0)),+        max_distance=1.0,+        global_world_only=True,+    )+    right_foot_height = left_foot_height.replace(+        prim_path="{ENV_REGEX_NS}/Robot/Geometry/torso/right_hip_yaw_link/right_hip_roll_link/right_thigh_link/right_shank_link/right_foot_link"+    )+++@configclass+class MicroGooseRoughCurriculumCfg(CurriculumCfg):+    """Introduce action smoothing before harder standing, head and COM objectives."""++    terrain_levels = CurriculumTermCfg(func=microduck_terrain_levels)++    action_rate_weight = _schedule(+        "rewards.action_rate_l2.weight", (750, -0.2), (1000, -0.4), (1250, -0.6), (1500, -0.8), (1750, -1.0)+    )+    head_pose_bias_weight = _schedule("rewards.head_pose_bias.weight", (1100, -1.0), (1500, -2.0), (2000, -3.0))+    standing_envs = _schedule(+        "commands.base_velocity.rel_standing_envs", (1000, 0.05), (1250, 0.1), (1500, 0.15), (2000, 0.2), (2500, 0.25)+    )+    head_pose_range = _schedule(+        "commands.head_pose.ranges",+        (1000, ((-0.17, 0.17), (-0.17, 0.17), (-0.21, 0.21), (-0.047, 0.047))),+        (1500, ((-0.39, 0.39), (-0.39, 0.39), (-0.49, 0.49), (-0.11, 0.11))),+        (2000, ((-0.72, 0.72), (-0.72, 0.72), (-0.91, 0.91), (-0.2, 0.2))),+        (2500, ((-1.1, 1.1), (-1.1, 1.1), (-1.4, 1.4), (-0.31, 0.31))),+    )+    com_range = _schedule(+        "events.randomize_com.params.com_range",+        (1000, {axis: (-0.005, 0.005) for axis in "xyz"}),+        (1500, {axis: (-0.01, 0.01) for axis in "xyz"}),+        (2000, {axis: (-0.015, 0.015) for axis in "xyz"}),+    )+    head_com_range = _schedule(+        "events.randomize_head_com.params.com_range",+        (1000, {axis: (-0.005, 0.005) for axis in "xyz"}),+        (1500, {axis: (-0.01, 0.01) for axis in "xyz"}),+    )+++@configclass+class MicroGooseVelocityRoughEnvCfg(MicroGooseVelocityFlatEnvCfg):+    """MicroGoose rough velocity walking with the 64 -> 15 policy interface and BAM servos."""++    scene: MicroGooseRoughSceneCfg = MicroGooseRoughSceneCfg(num_envs=16384, env_spacing=2.0)+    curriculum: MicroGooseRoughCurriculumCfg = MicroGooseRoughCurriculumCfg()++    def __post_init__(self):+        super().__post_init__()+        self.commands.base_velocity.class_type = MicroDuckRoughVelocityCommand+        self.rewards.track_ang_vel.params["std"] = 0.5+        self.scene.terrain.terrain_type = "generator"+        self.scene.terrain.class_type = MicroGooseTerrainImporter+        self.scene.terrain.max_init_terrain_level = 5+        self.scene.terrain.terrain_generator = terrain_gen.TerrainGeneratorCfg(+            size=(8.0, 8.0),+            border_width=20.0,+            num_rows=10,+            num_cols=20,+            curriculum=True,+            sub_terrains={+                "flat": terrain_gen.MeshPlaneTerrainCfg(proportion=0.25),+                "pyramid_stairs": terrain_gen.MeshPyramidStairsTerrainCfg(+                    proportion=0.25,+                    step_height_range=(0.0, 0.015),+                    step_width=0.15,+                    platform_width=2.0,+                    border_width=1.0,+                ),+                "random_grid": terrain_gen.MeshRandomGridTerrainCfg(+                    proportion=0.30, grid_width=0.45, grid_height_range=(0.0, 0.010), platform_width=1.5+                ),+                "pyramid_slope": terrain_gen.HfPyramidSlopedTerrainCfg(+                    proportion=0.20, slope_range=(0.03, 0.10), platform_width=2.0, vertical_scale=0.001+                ),+            },+        )+        height_sensor_names = ("left_foot_height", "right_foot_height")+        self.observations.critic.foot_height.params["height_sensor_names"] = height_sensor_names+        self.rewards.foot_clearance.params["height_sensor_names"] = height_sensor_names+        self.rewards.foot_swing_height.params["height_sensor_names"] = height_sensor_names+        self.scene.left_foot_height.update_period = self.sim.dt * self.decimation+        self.scene.right_foot_height.update_period = self.sim.dt * self.decimation+        self.sim.physics.solver_cfg.nconmax = 200+        self.sim.physics.solver_cfg.njmax = 1024++    def play_mode(self):+        super().play_mode()+        self.commands.base_velocity.class_type = MicroDuckVelocityCommand+        self.scene.terrain.terrain_generator.curriculum = False+        self.scene.terrain.terrain_generator.num_rows = 5+        self.scene.terrain.terrain_generator.num_cols = 5+        self.curriculum.terrain_levels = None
rl/isaaclab_microgoose/install_into_isaaclab.shadded+22
@@ -0,0 +1,22 @@+#!/usr/bin/env bash+set -euo pipefail++SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"+ISAACLAB_ROOT="${1:-${ISAACLAB_PATH:-}}"++if [[ -z "${ISAACLAB_ROOT}" || ! -d "${ISAACLAB_ROOT}/source/isaaclab_tasks" ]]; then+  echo "ERROR: Pass ISAACLAB_PATH as argument 1 or environment variable." >&2+  echo "Hint: ./rl/isaaclab_microgoose/install_into_isaaclab.sh ~/project/robot-sim/envs/IsaacLab" >&2+  exit 1+fi++ln -sfn "${SCRIPT_DIR}/robots/microgoose.py" \+  "${ISAACLAB_ROOT}/source/isaaclab_assets/isaaclab_assets/robots/microgoose.py"++rm -rf "${ISAACLAB_ROOT}/source/isaaclab_tasks/isaaclab_tasks/contrib/microgoose"+ln -sfn "${SCRIPT_DIR}/contrib/microgoose" \+  "${ISAACLAB_ROOT}/source/isaaclab_tasks/isaaclab_tasks/contrib/microgoose"++echo "OK: Linked Microgoose robot asset and contrib/microgoose tasks into ${ISAACLAB_ROOT}"+echo "Hint: Convert MJCF to USD if needed via: rsim mjcf2usd ${REPO_ROOT}/rl/assets/microgoose_walk.xml ${REPO_ROOT}/rl/assets/usd_walk"
rl/isaaclab_microgoose/robots/microgoose.pyadded+138
@@ -0,0 +1,138 @@+# Copyright (c) 2022-2026, The Isaac Lab Project Developers.+# SPDX-License-Identifier: BSD-3-Clause++"""Configuration for Microgoose with 15 Dynamixel XL330-M288-T BAM servos.++The following configurations are available:++* :data:`MICROGOOSE_CFG`: the 15-joint CAD-exact walking robot (sole colliders enabled for fast MJWarp stepping).+* :data:`MICROGOOSE_ALLCOLLISIONS_CFG`: the 15-joint CAD-exact robot with full body, leg, neck, head, and beak colliders.+"""++from __future__ import annotations++import os+from pathlib import Path++from isaaclab_newton.sim.schemas import NewtonArticulationCfg++import isaaclab.sim as sim_utils+from isaaclab.actuators import BamActuatorCfg, BamMotorCfg+from isaaclab.assets import ArticulationCfg+from isaaclab.utils import clone++_DEFAULT_REPO_ROOT = os.environ.get(+    "MICROGOOSE_REPO_ROOT",+    str(Path(__file__).resolve().parents[3]),+)+_WALK_USD_PATH = os.environ.get(+    "MICROGOOSE_USD_WALK",+    f"{_DEFAULT_REPO_ROOT}/rl/assets/usd_walk/microgoose_walk/microgoose_walk.usda",+)+_ALLCOLLISIONS_USD_PATH = os.environ.get(+    "MICROGOOSE_USD_ALLCOLLISIONS",+    f"{_DEFAULT_REPO_ROOT}/rl/assets/usd_allcollisions/microgoose_allcollisions/microgoose_allcollisions.usda",+)++_XL330_MOTOR_CFG = BamMotorCfg(+    model="m6",+    kt=0.36601349688984386,+    resistance=2.8113923539223227,+    error_gain=0.0028773775022263564,+    max_pwm=1.0,+    max_current=1.75,+    friction_base=0.004771183165566,+    friction_viscous=0.005359668274599504,+    friction_stribeck=0.004676345799486616,+    dtheta_stribeck=2.890372094130307,+    alpha=8.683259907618984,+    load_friction_motor=0.2667860954283698,+    load_friction_external=8.515871897059342e-06,+    load_friction_motor_stribeck=1.0722918395099123e-05,+    load_friction_external_stribeck=0.08077928978935671,+    load_friction_motor_quad=0.009972471242139415,+    load_friction_external_quad=0.004902565732332559,+)+"""XL330-M288-T m6 fit from Rhoban BAM revision ``62bd8ce12154340be97e06f7f41a0ca8f116d967``."""++MICROGOOSE_JOINT_NAMES: list[str] = [+    "left_hip_yaw",+    "left_hip_roll",+    "left_hip_pitch",+    "left_knee_pitch",+    "left_ankle_pitch",+    "right_hip_yaw",+    "right_hip_roll",+    "right_hip_pitch",+    "right_knee_pitch",+    "right_ankle_pitch",+    "neck_pitch",+    "head_pitch",+    "head_yaw",+    "head_roll",+    "beak_pitch",+]+"""All 15 XL330-M288-T servos in hardware ``dxlId`` 1..15 order (left leg 1..5, right leg 6..10, neck/head/beak 11..15)."""++MICROGOOSE_HEAD_JOINT_NAMES: list[str] = ["neck_pitch", "head_pitch", "head_yaw", "head_roll"]+"""The 4 neck and head tracking servos, matching the 4-D ``head_pose`` command vector."""++MICROGOOSE_LEG_JOINT_NAMES: list[str] = [+    "left_hip_yaw",+    "left_hip_roll",+    "left_hip_pitch",+    "left_knee_pitch",+    "left_ankle_pitch",+    "right_hip_yaw",+    "right_hip_roll",+    "right_hip_pitch",+    "right_knee_pitch",+    "right_ankle_pitch",+]+"""The 10 leg servos in ``dxlId`` 1..10 order."""++MICROGOOSE_CFG = ArticulationCfg(+    spawn=sim_utils.UsdFileCfg(+        usd_path=_WALK_USD_PATH,+        activate_contact_sensors=True,+        articulation_props=NewtonArticulationCfg(self_collision_enabled=True),+    ),+    init_state=ArticulationCfg.InitialStateCfg(+        pos=(0.0, 0.0, 0.135),+        joint_pos={+            ".*hip_yaw": 0.0,+            ".*hip_roll": 0.0,+            "left_hip_pitch": -0.35,+            "right_hip_pitch": -0.35,+            "left_knee_pitch": 0.70,+            "right_knee_pitch": 0.70,+            "left_ankle_pitch": -0.35,+            "right_ankle_pitch": -0.35,+            "neck_pitch": 0.0,+            "head_pitch": 0.0,+            "head_yaw": 0.0,+            "head_roll": 0.0,+            "beak_pitch": 0.0,+        },+        joint_vel={".*": 0.0},+    ),+    soft_joint_pos_limit_factor=0.9,+    actuators={+        "servos": BamActuatorCfg(+            joint_names_expr=[".*"],+            motor=_XL330_MOTOR_CFG,+            kp_fw=200.0,+            vin=7.4,+            vin_range=(6.0, 8.4),+            vin_drop_gain_range=(0.0, 0.2),+            vin_min=6.0,+            min_delay=1,+            max_delay=3,+        ),+    },+)+"""CAD-exact 15-DoF Microgoose with BAM voltage control, 2S Li-Ion 6.0 to 8.4 V sag, and 1 to 3 step command latency."""++MICROGOOSE_ALLCOLLISIONS_CFG = clone(MICROGOOSE_CFG)+MICROGOOSE_ALLCOLLISIONS_CFG.spawn.usd_path = _ALLCOLLISIONS_USD_PATH+"""CAD-exact Microgoose with full torso, leg, neck, head, and beak collision geometry."""
rl/policies/isaaclab_newton_microgoose_short.onnxadded
⋯ 1 unchanged line ⋯
timeline/README.md+6
@@ -163,6 +163,8 @@ Across Phase 1 and Phase 2 timeline updates, `drew2/microgoose` recorded **`110` | `e614ae8487` | `Nov 12, 4:16:32 PM CST` | `+7h 07m 23s` | `+26h 42m 17s` | `Done` | Add KiCad 10 Spine PCB, STEP, Gerbers/BOM/CPL, and parametric mechanical CAD/STL/STEP | | `68e9c182dd` | `Nov 13, 2:53:42 PM CST` | `+8h 31m 01s` | `+49h 19m 27s` | `Done` | Add Project Build and Validation Timeline sub-readme and timestamp audit | | `e00dcd4171` | `Nov 13, 2:56:38 PM CST` | `+8h 33m 57s` | `+49h 22m 23s` | `Done` | Surface Project Build and Validation Timeline in README TOC |+| `215b5dad38` | `Nov 13, 5:45:09 PM CST` | `+11h 12m 18s` | `+52h 10m 54s` | `Done` | Public-release metadata scrub across repo, datasheet PDF, and KiCad PCM archive |+| `cdb9ed9463` | `Nov 13, 5:45:54 PM CST` | `+11h 13m 03s` | `+52h 11m 39s` | `Done` | Flip `drew2/microgoose` visibility to public |  --- @@ -179,3 +181,7 @@ Phase 2 started at `Nov 13, 2026, 1:42:03 PM CST` (`+7h 19m 22s` cumulative acti | **Mechanical Validation (`10-min` Thermal, CoM/ZMP & 3D `scikit-fem` FEA)** | `Nov 13, 3:25:41 PM CST` | `+1h 43m 38s` | `+9h 03m 00s` | `Done` | [mechanical_validation_report.json](/drew2/microgoose/files/validation/mechanical_validation_report.json) (`0` falls, `39.25 degC` peak) | | **Electrical Validation (`ngspice-42` + `adom-fields`) & Test Plan** | `Nov 13, 3:27:17 PM CST` | `+1h 45m 14s` | `+9h 04m 36s` | `Done` | [electrical_validation_report.json](/drew2/microgoose/files/validation/electrical_validation_report.json), [PHYSICAL_TEST_PLAN.md](/drew2/microgoose/files/docs/validation/PHYSICAL_TEST_PLAN.md) | | **Team Simulation Toolchain Skillpack (`adom/robot-sim-skillpack`, Adom internal)** | `Nov 13, 3:45:26 PM CST` | `+2h 03m 23s` | `+9h 22m 45s` | `Done` | `adom/robot-sim-skillpack` (Adom internal) |+| **Full-RoM Electronics, Optical/RF FoV & Serviceability Clearance Audit** | `Nov 13, 5:28:12 PM CST` | `+3h 46m 09s` | `+10h 55m 21s` | `Done` | [electronics_clearance_report.json](/drew2/microgoose/files/validation/electronics_clearance_report.json), [electronics_fov_rom_clearance.png](/drew2/microgoose/files/docs/analysis/electronics_fov_rom_clearance.png) |+| **Native Isaac Lab 3.0 + Newton (`MuJoCo-Warp`) `16,384`-Env Short Training (`80` iters)** | `Nov 13, 5:55:05 PM CST` | `+4h 13m 02s` | `+11h 22m 14s` | `Done` | [isaaclab_microgoose/](/drew2/microgoose/files/rl/isaaclab_microgoose/), [isaaclab_newton_microgoose_short.onnx](/drew2/microgoose/files/rl/policies/isaaclab_newton_microgoose_short.onnx) |+| **3-Engine Sim2Sim Cross-Check (`Newton MJWarp` -> `CPU MuJoCo BAM` + `MIT/TRI Drake`)** | `Nov 15, 8:46:06 AM CST` | `+4h 23m 00s` | `+11h 32m 12s` | `Done` | [isaaclab_newton_short_validation.json](/drew2/microgoose/files/validation/isaaclab_newton_short_validation.json) (`7.84 deg` vs `7.97 deg` max tilt) |+| **Full `5,000`-Iteration Isaac Lab 3.0 + Newton Gait Training (`16,384` envs)** | `Pending` | `Pending` | `Pending` | `In progress` | Awaiting workstation thermal go (`~5.1` to `9.3 h` on RTX 4090) |
validation/check_electronics_and_rom_clearance.pyadded+1743
@@ -0,0 +1,1743 @@+#!/usr/bin/env python3+"""Comprehensive Electronics, Optical/RF FoV, Full-RoM Self-Collision & Serviceability Audit.++Beyond the single symmetric standing-pose OCCT check (66 solids, 0 collisions), this script+evaluates the actual Rev A CAD and routed Spine PCB geometry (without modifying any design files):++  1. Optical & RF Field-of-View Ray-Casting:+     - VL53L5CX 8x8 multizone ToF (45x45 deg square / 65 deg diagonal FoV [datasheet]) across+       beak_pitch [0..38 deg] and 4-DoF neck/head sweeps (neck_pitch, head_pitch, head_yaw, head_roll).+     - Spine status LEDs D1 (IN-S63BTG 5V_OK) and D2 (WS2812B-2020 STATUS_RGB) 120 deg cones.+     - Radxa Zero 3W 2.4/5 GHz Wi-Fi 6 / BLE 5.4 antenna hemisphere & conductive keepout clearance.++  2. Full Range-of-Motion & Sim-Trajectory All-Pairs CAD Self-Collision Sweep:+     - Overrides MJCF contype/conaffinity=0 so ALL non-co-mounted CAD mesh pairs (printed parts,+       15 XL330 servos, Spine Rev A PCB + connectors, Radxa Zero 3W, NP-F550 battery, hardware,+       and torso wire bundles) are checked across:+         a) Full individual joint limit sweeps (15 joints x 13 steps = 195 poses)+         b) Multi-joint extreme combination poses (20 corner poses)+         c) All 6 simulated dual-engine trajectories (stand, walk_forward, walk_turn,+            push_recovery, slope_8deg, fall_and_getup: 600 poses).+     - Exact triangle-triangle segment intersection verifies true solid penetration vs positive gap,+       isolating both the raw Rev A CAD contralateral plate bug (Workplane("XZ") -Y normal sign)+       and genuine intra-chain / electronics / bracket clearances.++  3. Cable Bend Radius, Joint Pinch Points, Connector Mating & Battery Sled Extraction:+     - Static & dynamic bend radii vs 4.0x OD (static) and 5.0x OD (dynamic flex) limits + pinch gaps.+     - Finger (12.0 mm) and ESD-tweezer (4.5 mm + 7.5 mm vertical pull stroke) mating clearances+       at J1..J5 on microgoose-spine and all 15 XL330 servo ports.+     - Swept-volume extraction path for the underslung NP-F550 2S battery along -X, +X, and -Z.++  4. Onboard Camera Documentation Audit & Non-Invasive Rev B CSI-2 Proposal:+     - Verifies 0 onboard-camera claims across project docs and ray-casts a proposed Rev B brow pod.++Outputs:+  - validation/electronics_clearance_report.json+  - docs/analysis/electronics_fov_rom_clearance.png+"""++from __future__ import annotations++import json+import math+from pathlib import Path+import re+from typing import Any, Dict, List, Set, Tuple++import matplotlib+matplotlib.use("Agg")+import matplotlib.gridspec as gridspec+import matplotlib.patches as mpatches+import matplotlib.pyplot as plt+import mujoco+import numpy as np+from scipy.spatial import cKDTree+import trimesh+++ROOT_DIR = Path(__file__).resolve().parents[1]+MECH_DIR = ROOT_DIR / "mechanical"+RL_DIR = ROOT_DIR / "rl"+XML_PATH = RL_DIR / "assets" / "microgoose.xml"+TRAJ_PATH = ROOT_DIR / "validation" / "raw" / "dual_engine_trajectories.npz"+OUT_JSON_PATH = ROOT_DIR / "validation" / "electronics_clearance_report.json"+OUT_PNG_PATH = ROOT_DIR / "docs" / "analysis" / "electronics_fov_rom_clearance.png"+++BG_HEX = "#0d1317"+PANEL_HEX = "#131c22"+GRID_HEX = "#23323d"+TEXT_HEX = "#e6eef3"+MUTED_HEX = "#93a6b4"+TEAL_HEX = "#00e6dc"+PURPLE_HEX = "#8c6bf7"+ORANGE_HEX = "#f59e0b"+GREEN_HEX = "#10b981"+RED_HEX = "#ef4444"+++def triangles_intersect_exact(+    tris_a: np.ndarray,+    tris_b: np.ndarray,+) -> Tuple[bool, int, float]:+    """Exact vectorized edge-vs-triangle Möller-Trumbore intersection test between two triangle sets.++    Args:+      tris_a: (Na, 3, 3) float64 vertices in mm+      tris_b: (Nb, 3, 3) float64 vertices in mm++    Returns:+      (intersects, intersecting_edge_tri_count, est_penetration_depth_mm)+    """+    if len(tris_a) == 0 or len(tris_b) == 0:+        return False, 0, 0.0++    # Broadphase AABB overlap filter+    min_a = tris_a.min(axis=1)+    max_a = tris_a.max(axis=1)+    min_b = tris_b.min(axis=1)+    max_b = tris_b.max(axis=1)++    g_min = np.maximum(min_a.min(axis=0), min_b.min(axis=0))+    g_max = np.minimum(max_a.max(axis=0), max_b.max(axis=0))+    if np.any(g_min > g_max):+        return False, 0, 0.0++    mask_a = np.all((max_a >= g_min) & (min_a <= g_max), axis=1)+    mask_b = np.all((max_b >= g_min) & (min_b <= g_max), axis=1)+    ta = tris_a[mask_a]+    tb = tris_b[mask_b]+    if len(ta) == 0 or len(tb) == 0:+        return False, 0, 0.0++    # Fast global + per-triangle AABB overlap filter so large CAD/PCB meshes only test triangles in the shared overlap box+    a_min_g = ta.min(axis=(0, 1))+    a_max_g = ta.max(axis=(0, 1))+    b_min_g = tb.min(axis=(0, 1))+    b_max_g = tb.max(axis=(0, 1))+    ov_min = np.maximum(a_min_g, b_min_g) - 1e-4+    ov_max = np.minimum(a_max_g, b_max_g) + 1e-4+    if np.any(ov_min > ov_max):+        return False, 0, 0.0++    ta_tmin = ta.min(axis=1)+    ta_tmax = ta.max(axis=1)+    tb_tmin = tb.min(axis=1)+    tb_tmax = tb.max(axis=1)+    mask_a = np.all((ta_tmax >= ov_min) & (ta_tmin <= ov_max), axis=1)+    mask_b = np.all((tb_tmax >= ov_min) & (tb_tmin <= ov_max), axis=1)+    ta = ta[mask_a]+    tb = tb[mask_b]+    if len(ta) == 0 or len(tb) == 0:+        return False, 0, 0.0++    def seg_vs_tris(p0: np.ndarray, p1: np.ndarray, tri: np.ndarray) -> Tuple[int, float]:+        # Test segments p0->p1 (M,3) against triangles tri (K,3,3) in chunks+        seg_min = np.minimum(p0, p1)+        seg_max = np.maximum(p0, p1)+        t_min = tri.min(axis=1)+        t_max = tri.max(axis=1)++        hits = 0+        max_pen = 0.0+        v0 = tri[:, 0, :]+        e1 = tri[:, 1, :] - v0+        e2 = tri[:, 2, :] - v0++        chunk = 256+        for i0 in range(0, len(p0), chunk):+            s0 = p0[i0 : i0 + chunk]+            s1 = p1[i0 : i0 + chunk]+            smin = seg_min[i0 : i0 + chunk]+            smax = seg_max[i0 : i0 + chunk]+            # Pairwise AABB mask (C, K)+            ov = (+                (smax[:, None, 0] >= t_min[None, :, 0])+                & (smin[:, None, 0] <= t_max[None, :, 0])+                & (smax[:, None, 1] >= t_min[None, :, 1])+                & (smin[:, None, 1] <= t_max[None, :, 1])+                & (smax[:, None, 2] >= t_min[None, :, 2])+                & (smin[:, None, 2] <= t_max[None, :, 2])+            )+            si, ti = np.nonzero(ov)+            if len(si) == 0:+                continue+            orig = s0[si]+            d = s1[si] - orig+            tv0 = v0[ti]+            te1 = e1[ti]+            te2 = e2[ti]++            h = np.cross(d, te2)+            det = np.einsum("ij,ij->i", te1, h)+            valid = np.abs(det) > 1e-9+            if not np.any(valid):+                continue+            inv_det = np.zeros_like(det)+            inv_det[valid] = 1.0 / det[valid]+            s_vec = orig - tv0+            u = inv_det * np.einsum("ij,ij->i", s_vec, h)+            valid &= (u >= 1e-4) & (u <= 1.0 - 1e-4)+            if not np.any(valid):+                continue+            q_vec = np.cross(s_vec, te1)+            v = inv_det * np.einsum("ij,ij->i", d, q_vec)+            valid &= (v >= 1e-4) & (u + v <= 1.0 - 1e-4)+            if not np.any(valid):+                continue+            t_param = inv_det * np.einsum("ij,ij->i", te2, q_vec)+            # Exclude grazing endpoint touches (<0.5% of edge length)+            valid &= (t_param > 0.01) & (t_param < 0.99)+            n_hit = int(np.count_nonzero(valid))+            if n_hit > 0:+                hits += n_hit+                seg_len = np.linalg.norm(d[valid], axis=1)+                frac = np.minimum(t_param[valid], 1.0 - t_param[valid])+                max_pen = max(max_pen, float(np.max(frac * seg_len)))+        return hits, max_pen++    # Edges of ta against tb, and edges of tb against ta+    edges_a0 = np.vstack([ta[:, 0, :], ta[:, 1, :], ta[:, 2, :]])+    edges_a1 = np.vstack([ta[:, 1, :], ta[:, 2, :], ta[:, 0, :]])+    h1, p1 = seg_vs_tris(edges_a0, edges_a1, tb)++    edges_b0 = np.vstack([tb[:, 0, :], tb[:, 1, :], tb[:, 2, :]])+    edges_b1 = np.vstack([tb[:, 1, :], tb[:, 2, :], tb[:, 0, :]])+    h2, p2 = seg_vs_tris(edges_b0, edges_b1, ta)++    tot_hits = h1 + h2+    pen = max(p1, p2)+    return tot_hits > 0, tot_hits, pen+++def raycast_triangles_batch(+    origins_mm: np.ndarray,+    dirs_unit: np.ndarray,+    tris_mm: np.ndarray,+    t_min_mm: float = 0.05,+    t_max_mm: float = 350.0,+    return_tri_idx: bool = False,+) -> Any:+    """Exact AABB-accelerated Möller-Trumbore ray-triangle nearest hit distance (mm)."""+    R = len(origins_mm)+    hit_dist = np.full(R, np.inf, dtype=np.float64)+    hit_idx = np.full(R, -1, dtype=np.int64)+    if len(tris_mm) == 0 or R == 0:+        return (hit_dist, hit_idx) if return_tri_idx else hit_dist++    t_cap = min(float(t_max_mm), 350.0)+    end_pts = origins_mm + dirs_unit * t_cap+    ray_seg_min = np.minimum(origins_mm, end_pts)+    ray_seg_max = np.maximum(origins_mm, end_pts)++    # Global ray-bundle AABB cull across all triangles+    glob_min = ray_seg_min.min(axis=0)+    glob_max = ray_seg_max.max(axis=0)+    tri_min_all = tris_mm.min(axis=1)+    tri_max_all = tris_mm.max(axis=1)+    cand_mask = np.all((tri_max_all >= glob_min) & (tri_min_all <= glob_max), axis=1)+    cand_global_idx = np.nonzero(cand_mask)[0]+    if len(cand_global_idx) == 0:+        return (hit_dist, hit_idx) if return_tri_idx else hit_dist++    tc = tris_mm[cand_global_idx]+    tc_min = tri_min_all[cand_global_idx]+    tc_max = tri_max_all[cand_global_idx]+    v0 = tc[:, 0, :]+    e1 = tc[:, 1, :] - v0+    e2 = tc[:, 2, :] - v0++    # Safe inverse directions for exact ray-AABB slab test+    inv_dirs = np.where(np.abs(dirs_unit) > 1e-12, 1.0 / np.where(np.abs(dirs_unit) > 1e-12, dirs_unit, 1.0), 1e12)++    batch = 128+    for r0 in range(0, R, batch):+        ro = origins_mm[r0 : r0 + batch]+        rd = dirs_unit[r0 : r0 + batch]+        ird = inv_dirs[r0 : r0 + batch]++        # Vectorized slab overlap (B, Tc)+        t1 = (tc_min[None, :, :] - ro[:, None, :]) * ird[:, None, :]+        t2 = (tc_max[None, :, :] - ro[:, None, :]) * ird[:, None, :]+        tmin_box = np.max(np.minimum(t1, t2), axis=2)+        tmax_box = np.min(np.maximum(t1, t2), axis=2)+        ov = (tmax_box >= np.maximum(tmin_box, t_min_mm)) & (tmin_box <= t_cap)++        bi, ti = np.nonzero(ov)+        if len(bi) == 0:+            continue++        ro_p = ro[bi]+        rd_p = rd[bi]+        v0_p = v0[ti]+        e1_p = e1[ti]+        e2_p = e2[ti]++        h = np.cross(rd_p, e2_p)+        det = np.einsum("ij,ij->i", e1_p, h)+        valid = np.abs(det) > 1e-9+        if not np.any(valid):+            continue+        inv_det = np.zeros_like(det)+        inv_det[valid] = 1.0 / det[valid]+        s = ro_p - v0_p+        u = inv_det * np.einsum("ij,ij->i", s, h)+        valid &= (u >= 0.0) & (u <= 1.0)+        if not np.any(valid):+            continue+        q = np.cross(s, e1_p)+        v = inv_det * np.einsum("ij,ij->i", rd_p, q)+        valid &= (v >= 0.0) & (u + v <= 1.0)+        if not np.any(valid):+            continue+        t_val = inv_det * np.einsum("ij,ij->i", e2_p, q)+        valid &= (t_val >= t_min_mm) & (t_val <= t_cap)+        if not np.any(valid):+            continue++        bi_v = bi[valid] + r0+        ti_v = cand_global_idx[ti[valid]]+        tv_v = t_val[valid]+        # Sort by descending t so last write or np.minimum.at finds minimum t & exact triangle index+        order = np.argsort(tv_v)[::-1]+        for idx_k in order:+            r_abs = int(bi_v[idx_k])+            if tv_v[idx_k] <= hit_dist[r_abs]:+                hit_dist[r_abs] = float(tv_v[idx_k])+                hit_idx[r_abs] = int(ti_v[idx_k])++    return (hit_dist, hit_idx) if return_tri_idx else hit_dist+++class ArticulatedCadScene:+    """Loads the exact MJCF kinematic tree and attaches all CAD STL meshes in mm."""++    def __init__(self) -> None:+        self.model = mujoco.MjModel.from_xml_path(str(XML_PATH))+        self.data = mujoco.MjData(self.model)+        mujoco.mj_resetDataKeyframe(self.model, self.data, 0)+        mujoco.mj_forward(self.model, self.data)++        # Record standing body world poses T_world_B(q_stand) in mm & rotation+        self.stand_body_pos_mm: Dict[str, np.ndarray] = {}+        self.stand_body_rot: Dict[str, np.ndarray] = {}+        for b_id in range(self.model.nbody):+            b_name = mujoco.mj_id2name(self.model, mujoco.mjtObj.mjOBJ_BODY, b_id)+            if b_name:+                self.stand_body_pos_mm[b_name] = self.data.xpos[b_id].copy() * 1000.0+                self.stand_body_rot[b_name] = self.data.xmat[b_id].reshape(3, 3).copy()++        # Joint metadata directly from MuJoCo MJCF + mechanical-interface.json defaults+        mech = json.loads((ROOT_DIR / "design" / "mechanical-interface.json").read_text(encoding="utf-8"))+        self.joints_meta = mech["joints"] + mech.get("auxiliaryJoints", [])+        self.joint_names = [j["name"] for j in self.joints_meta]+        jnt_ids = [mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_JOINT, jn) for jn in self.joint_names]+        self.joint_qpos_adr = [int(self.model.jnt_qposadr[jid]) for jid in jnt_ids]+        self.q_stand = np.array([float(self.data.qpos[adr]) for adr in self.joint_qpos_adr], dtype=np.float64)+        self.q_min = np.array([float(self.model.jnt_range[jid, 0]) for jid in jnt_ids], dtype=np.float64)+        self.q_max = np.array([float(self.model.jnt_range[jid, 1]) for jid in jnt_ids], dtype=np.float64)++        # Load all CAD meshes (already in standing world mm coordinates!) and convert to body-local mm+        self.parts: List[Dict[str, Any]] = []+        self._load_all_cad_meshes()++    def _add_mesh_part(+        self,+        name: str,+        stl_paths: List[Path],+        body_name: str,+        category: str,+        conductive: bool,+        n_sample: int = 450,+    ) -> None:+        meshes = [trimesh.load_mesh(str(p), force="mesh", process=True) for p in stl_paths if p.exists()]+        if not meshes:+            return+        tm = trimesh.util.concatenate(meshes) if len(meshes) > 1 else meshes[0]+        # STLs in mechanical/stl and hero_meshes (except real_spine which is in metres? Let's check scale!)+        verts = np.asarray(tm.vertices, dtype=np.float64)+        span = float( np.max(verts.max(axis=0) - verts.min(axis=0)) )+        if span < 1.5:+            # Mesh was saved in metres (e.g., real_spine_mat_*.stl), convert to mm!+            verts = verts * 1000.0+            tm = tm.copy()+            tm.vertices = verts++        faces = np.asarray(tm.faces, dtype=np.int64)+        p_stand = self.stand_body_pos_mm[body_name]+        R_stand = self.stand_body_rot[body_name]++        # Local body-frame coordinates in mm: v_local = R_stand^T @ (v_world - p_stand)+        verts_local = (verts - p_stand) @ R_stand+        tris_local = verts_local[faces]++        # Dense deterministic surface + vertex sample for fast clearance queries+        rng_seed = abs(hash(name)) % (2**31 - 1)+        np.random.seed(rng_seed)+        if len(faces) > 0:+            surf_pts, _ = trimesh.sample.sample_surface(tm, n_sample)+            surf_local = (np.asarray(surf_pts, dtype=np.float64) - p_stand) @ R_stand+            pts_local = np.vstack([verts_local, surf_local])+            if len(pts_local) > n_sample + 450:+                idx = np.linspace(0, len(pts_local) - 1, n_sample + 450, dtype=np.int64)+                pts_local = pts_local[idx]+        else:+            pts_local = verts_local++        self.parts.append(+            {+                "name": name,+                "body": body_name,+                "category": category,+                "conductive": conductive,+                "verts_local": verts_local,+                "faces": faces,+                "tris_local": tris_local,+                "pts_local": pts_local,+                "stand_aabb_mm": [verts.min(axis=0).tolist(), verts.max(axis=0).tolist()],+            }+        )++    def _load_all_cad_meshes(self) -> None:+        stl_dir = MECH_DIR / "stl"+        hm_dir = MECH_DIR / "parts" / "hero_meshes"+        rs_dir = hm_dir / "real_spine"++        # 21 robot printed parts (PETG-CF parts are carbon-fiber filled -> semi-conductive RF lossy!)+        printed_map = [+            ("torso_core_cradle", stl_dir / "torso_core_cradle.stl", "torso", "printed_petgcf", True),+            ("radxa_mezzanine_carrier", stl_dir / "radxa_mezzanine_carrier.stl", "torso", "printed_petgcf", True),+            ("battery_sled", stl_dir / "battery_sled.stl", "torso", "printed_petgcf", True),+            ("torso_shell_left", stl_dir / "torso_shell_left.stl", "torso", "printed_pla", False),+            ("torso_shell_right", stl_dir / "torso_shell_right.stl", "torso", "printed_pla", False),+            ("torso_dorsal_hatch", stl_dir / "torso_dorsal_hatch.stl", "torso", "printed_pla", False),+            ("neck_s_curve_lower", stl_dir / "neck_s_curve_lower.stl", "neck_pitch_link", "printed_pla", False),+            ("neck_upper_clevis", stl_dir / "neck_upper_clevis.stl", "head_pitch_link", "printed_petgcf", True),+            ("head_yaw_roll_gimbal", stl_dir / "head_yaw_roll_gimbal.stl", "head_yaw_link", "printed_petgcf", True),+            ("head_shell", stl_dir / "head_shell.stl", "head_roll_link", "printed_pla", False),+            ("beak_upper", stl_dir / "beak_upper.stl", "head_roll_link", "printed_pla", False),+            ("beak_lower", stl_dir / "beak_lower.stl", "beak_link", "printed_pla", False),+            ("left_hip_yaw_bracket", stl_dir / "left_hip_yaw_bracket.stl", "left_hip_yaw_link", "printed_petgcf", True),+            ("left_hip_roll_clevis", stl_dir / "left_hip_roll_clevis.stl", "left_hip_roll_link", "printed_petgcf", True),+            ("left_thigh_frame", stl_dir / "left_thigh_frame.stl", "left_thigh_link", "printed_petgcf", True),+            ("left_shank_frame", stl_dir / "left_shank_frame.stl", "left_shank_link", "printed_petgcf", True),+            ("left_foot_sole", stl_dir / "left_foot_sole.stl", "left_foot_link", "printed_pla", False),+            ("right_hip_yaw_bracket", stl_dir / "right_hip_yaw_bracket.stl", "right_hip_yaw_link", "printed_petgcf", True),+            ("right_hip_roll_clevis", stl_dir / "right_hip_roll_clevis.stl", "right_hip_roll_link", "printed_petgcf", True),+            ("right_thigh_frame", stl_dir / "right_thigh_frame.stl", "right_thigh_link", "printed_petgcf", True),+            ("right_shank_frame", stl_dir / "right_shank_frame.stl", "right_shank_link", "printed_petgcf", True),+            ("right_foot_sole", stl_dir / "right_foot_sole.stl", "right_foot_link", "printed_pla", False),+        ]+        for nm, p, bd, cat, cond in printed_map:+            self._add_mesh_part(nm, [p], bd, cat, cond)++        # 15 XL330-M288-T servos (contain motor stator/shield + internal PCB -> conductive)+        servo_map = [+            ("dxl_01_left_hip_yaw", "torso"),+            ("dxl_02_left_hip_roll", "left_hip_yaw_link"),+            ("dxl_03_left_hip_pitch", "left_hip_roll_link"),+            ("dxl_04_left_knee_pitch", "left_thigh_link"),+            ("dxl_05_left_ankle_pitch", "left_foot_link"),+            ("dxl_06_right_hip_yaw", "torso"),+            ("dxl_07_right_hip_roll", "right_hip_yaw_link"),+            ("dxl_08_right_hip_pitch", "right_hip_roll_link"),+            ("dxl_09_right_knee_pitch", "right_thigh_link"),+            ("dxl_10_right_ankle_pitch", "right_foot_link"),+            ("dxl_11_neck_pitch", "torso"),+            ("dxl_12_head_pitch", "neck_pitch_link"),+            ("dxl_13_head_yaw", "head_pitch_link"),+            ("dxl_14_head_roll", "head_yaw_link"),+            ("dxl_15_beak_pitch", "head_roll_link"),+        ]+        for s_nm, bd in servo_map:+            self._add_mesh_part(s_nm, [hm_dir / f"{s_nm}.stl"], bd, "servo_xl330", True)++        # Electronics, real Spine Rev A PCB (all routed STEP/GLB materials), Radxa, Battery, ToF/IMU carrier, Screws+        real_spine_stls = sorted(rs_dir.glob("real_spine_mat_*.stl"))+        if real_spine_stls:+            self._add_mesh_part("microgoose_spine_revA_pcb", real_spine_stls, "torso", "electronics_pcb", True, n_sample=1400)+        else:+            fallback_b = [hm_dir / f for f in ("board_spine_pcb_emerald.stl", "board_jst_ivory.stl", "board_gold_pin.stl", "board_ic_dark.stl")]+            self._add_mesh_part("microgoose_spine_revA_pcb", fallback_b, "torso", "electronics_pcb", True, n_sample=1400)++        self._add_mesh_part("radxa_zero_3w", [hm_dir / "radxa_zero_3w.stl"], "torso", "electronics_sbc", True)+        self._add_mesh_part("np_f550_battery", [hm_dir / "np_f550_battery.stl"], "torso", "electronics_battery", True)+        self._add_mesh_part("head_tof_imu_carrier", [hm_dir / "head_tof_imu_carrier.stl"], "head_roll_link", "electronics_sensor", True)+        self._add_mesh_part("m25_radxa_screws", [hm_dir / "m25_radxa_screws.stl"], "torso", "hardware_metal", True)++        # Wire bundles in torso & head/neck+        wire_groups = [+            ("bundle_battery_vbat", [hm_dir / "wire_battery_vbat_gnd.stl", hm_dir / "wire_battery_vbat_pos_a.stl", hm_dir / "wire_battery_vbat_pos_b.stl"], "torso"),+            ("bundle_radxa_uart_5v", [hm_dir / f"wire_radxa_link_{s}.stl" for s in ("5v_a", "5v_b", "gnd", "rx", "tx")], "torso"),+            ("bundle_leg_left_dxl", [hm_dir / f"wire_leg_left_dxl_{s}.stl" for s in ("5v", "data", "gnd")], "torso"),+            ("bundle_leg_right_dxl", [hm_dir / f"wire_leg_right_dxl_{s}.stl" for s in ("5v", "data", "gnd")], "torso"),+        ]+        for w_nm, w_paths, bd in wire_groups:+            self._add_mesh_part(w_nm, w_paths, bd, "wire_bundle", True, n_sample=600)++    def set_q15(self, q15: np.ndarray) -> Dict[str, Tuple[np.ndarray, np.ndarray]]:+        """Set 15 joint angles (torso upright at [0, 0, 0.148] m) and return {body: (pos_mm, rot_3x3)}."""+        mujoco.mj_resetDataKeyframe(self.model, self.data, 0)+        for i, adr in enumerate(self.joint_qpos_adr):+            self.data.qpos[adr] = float(q15[i])+        mujoco.mj_forward(self.model, self.data)+        poses: Dict[str, Tuple[np.ndarray, np.ndarray]] = {}+        for b_id in range(self.model.nbody):+            b_name = mujoco.mj_id2name(self.model, mujoco.mjtObj.mjOBJ_BODY, b_id)+            if b_name:+                poses[b_name] = (+                    self.data.xpos[b_id].copy() * 1000.0,+                    self.data.xmat[b_id].reshape(3, 3).copy(),+                )+        return poses++    def get_world_tris(self, part_names: List[str], poses: Dict[str, Tuple[np.ndarray, np.ndarray]]) -> Tuple[np.ndarray, List[str]]:+        """Return concatenated world-space triangles (T,3,3) in mm and per-triangle part label list."""+        tri_blocks = []+        tri_owners: List[str] = []+        name_set = set(part_names)+        for pt in self.parts:+            if pt["name"] not in name_set:+                continue+            p_b, R_b = poses[pt["body"]]+            tl = pt["tris_local"]+            tw = tl @ R_b.T + p_b+            tri_blocks.append(tw)+            tri_owners.extend([pt["name"]] * len(tw))+        if not tri_blocks:+            return np.zeros((0, 3, 3), dtype=np.float64), []+        return np.vstack(tri_blocks), tri_owners+++# ==============================================================================+# 1. OPTICAL & RF FIELD-OF-VIEW AUDIT+# ==============================================================================+def audit_sensor_and_rf_fov(scene: ArticulatedCadScene) -> Dict[str, Any]:+    """Ray-cast VL53L5CX 8x8 ToF, Spine LEDs D1 & D2, and Radxa Zero 3W 2.4/5 GHz antenna."""+    poses_stand = scene.set_q15(scene.q_stand)+    p_head_stand, R_head_stand = poses_stand["head_roll_link"]++    # VL53L5CX optical center in head_cranium local coordinates:+    # Carrier PCB front face is at X=43.8 mm, Z=265.2..270.3 mm; forehead window is X=44.0..50.5, Y=-4.2..+4.2, Z=268.0..275.0 mm.+    # Sensor die aperture sits aligned with window bottom/center at world (43.8, 0.0, 269.8) mm;+    # Forehead window exit aperture center sits at world (49.6, 0.0, 271.5) mm.+    die_world_stand = np.array([43.8, 0.0, 269.8], dtype=np.float64)+    win_world_stand = np.array([49.6, 0.0, 271.5], dtype=np.float64)+    die_local = (die_world_stand - p_head_stand) @ R_head_stand+    win_local = (win_world_stand - p_head_stand) @ R_head_stand+    fwd_local = np.array([1.0, 0.0, 0.0], dtype=np.float64) @ R_head_stand+    left_local = np.array([0.0, 1.0, 0.0], dtype=np.float64) @ R_head_stand+    up_local = np.array([0.0, 0.0, 1.0], dtype=np.float64) @ R_head_stand++    # Build 8x8 multizone ray grid (5x5 = 25 sub-rays per zone -> 1,600 rays across 45x45 deg FoV; max diag = 60.1..65 deg)+    # Zone row 0 = bottom (-22.5..-16.875 deg), row 7 = top (+16.875..+22.5 deg)+    # Zone col 0 = right (-22.5 deg), col 7 = left (+22.5 deg)+    half_fov_rad = math.radians(22.5)+    tan_max = math.tan(half_fov_rad)+    sub = 5+    n_grid = 8 * sub  # 40x40 = 1600 rays+    u_lin = np.linspace(-tan_max * (1.0 - 1.0 / n_grid), tan_max * (1.0 - 1.0 / n_grid), n_grid)+    v_lin = np.linspace(-tan_max * (1.0 - 1.0 / n_grid), tan_max * (1.0 - 1.0 / n_grid), n_grid)+    uu, vv = np.meshgrid(u_lin, v_lin)  # shape (40, 40): row=v (elevation), col=u (azimuth)+    dirs_head_local = (+        fwd_local[None, :]+        + uu.ravel()[:, None] * left_local[None, :]+        + vv.ravel()[:, None] * up_local[None, :]+    )+    dirs_head_local /= np.linalg.norm(dirs_head_local, axis=1, keepdims=True)++    # Include all non-carrier robot parts that could occlude the ToF cone+    occluder_names = [+        p["name"]+        for p in scene.parts+        if p["name"] not in ("head_tof_imu_carrier",)+    ]+    external_occluders = [+        p["name"]+        for p in scene.parts+        if p["name"] not in ("head_tof_imu_carrier", "head_shell")+    ]++    def eval_tof_at_q(q15: np.ndarray, from_die: bool = True) -> Tuple[np.ndarray, np.ndarray, Dict[str, int]]:+        poses = scene.set_q15(q15)+        p_h, R_h = poses["head_roll_link"]+        orig_w = p_h + R_h @ (die_local if from_die else win_local)+        dirs_w = dirs_head_local @ R_h.T+        occ_list = occluder_names if from_die else external_occluders+        tris_w, owners = scene.get_world_tris(occ_list, poses)+        origins_batch = np.repeat(orig_w[None, :], len(dirs_w), axis=0)+        dists, hit_tidx = raycast_triangles_batch(+            origins_batch, dirs_w, tris_w, t_min_mm=0.15, t_max_mm=350.0, return_tri_idx=True+        )++        # Exact primary occluder per ray via O(1) triangle-owner lookup!+        part_hit_counts: Dict[str, int] = {}+        blocked_mask = np.isfinite(dists)+        for tid in hit_tidx[blocked_mask]:+            if tid >= 0:+                b_nm = owners[int(tid)]+                part_hit_counts[b_nm] = part_hit_counts.get(b_nm, 0) + 1++        # Aggregate into 8x8 zones (each zone has 5x5 = 25 sub-rays)+        blocked_grid = blocked_mask.reshape(40, 40)+        zone_occ_frac = np.zeros((8, 8), dtype=np.float64)+        for zr in range(8):+            for zc in range(8):+                patch = blocked_grid[zr * sub : (zr + 1) * sub, zc * sub : (zc + 1) * sub]+                zone_occ_frac[zr, zc] = float(np.mean(patch))+        return dists.reshape(40, 40), zone_occ_frac, part_hit_counts++    # 1a. Standing pose from die (includes head_shell window tunnel + beak_upper) AND from window exit (pure beak/body)+    dists_die_stand, zone_die_stand, hits_die_stand = eval_tof_at_q(scene.q_stand, from_die=True)+    dists_win_stand, zone_win_stand, hits_win_stand = eval_tof_at_q(scene.q_stand, from_die=False)++    # 1b. Sweep beak_pitch across [0, 38 deg] (joint index 14)+    beak_idx = scene.joint_names.index("beak_pitch")+    beak_sweep_deg = np.linspace(0.0, 38.0, 9)+    beak_sweep_results = []+    for bp_deg in beak_sweep_deg:+        q_test = scene.q_stand.copy()+        q_test[beak_idx] = math.radians(float(bp_deg))+        _, z_win, h_win = eval_tof_at_q(q_test, from_die=False)+        _, z_die, _ = eval_tof_at_q(q_test, from_die=True)+        beak_sweep_results.append(+            {+                "beak_pitch_deg": round(float(bp_deg), 1),+                "window_exit_obstructed_zones_of_64": int(np.sum(z_win > 0.10)),+                "window_exit_obstructed_ray_pct": round(float(np.mean(z_win) * 100.0), 2),+                "die_aperture_obstructed_zones_of_64": int(np.sum(z_die > 0.10)),+                "die_aperture_obstructed_ray_pct": round(float(np.mean(z_die) * 100.0), 2),+                "beak_lower_hits": int(h_win.get("beak_lower", 0)),+            }+        )++    # 1c. Sweep head/neck 4-DoF extremes (neck_pitch, head_pitch, head_yaw, head_roll) to test torso/neck occlusion+    neck_idx = scene.joint_names.index("neck_pitch")+    hp_idx = scene.joint_names.index("head_pitch")+    hy_idx = scene.joint_names.index("head_yaw")+    hr_idx = scene.joint_names.index("head_roll")++    head_pose_sweeps = [+        ("standing_neutral", 0.0, 0.0, 0.0, 0.0),+        ("look_down_moderate (+30/+30 deg)", 30.0, 30.0, 0.0, 0.0),+        ("look_down_max (+65/+65 deg)", 65.0, 65.0, 0.0, 0.0),+        ("look_up_max (-55/-65 deg)", -55.0, -65.0, 0.0, 0.0),+        ("yaw_left_max (+80 deg) + down (+35 deg)", 25.0, 35.0, 80.0, 0.0),+        ("yaw_right_max (-80 deg) + down (+35 deg)", 25.0, 35.0, -80.0, 0.0),+        ("roll_max (+40 deg) + yaw (+45 deg)", 20.0, 25.0, 45.0, 40.0),+    ]+    head_sweep_summary = []+    for lbl, np_d, hp_d, hy_d, hr_d in head_pose_sweeps:+        qt = scene.q_stand.copy()+        qt[neck_idx] = math.radians(np_d)+        qt[hp_idx] = math.radians(hp_d)+        qt[hy_idx] = math.radians(hy_d)+        qt[hr_idx] = math.radians(hr_d)+        _, z_w, h_w = eval_tof_at_q(qt, from_die=False)+        torso_neck_hits = sum(v for k, v in h_w.items() if k not in ("beak_upper", "beak_lower", "dxl_15_beak_pitch"))+        head_sweep_summary.append(+            {+                "pose": lbl,+                "window_exit_obstructed_zones_of_64": int(np.sum(z_w > 0.10)),+                "window_exit_obstructed_ray_pct": round(float(np.mean(z_w) * 100.0), 2),+                "torso_or_neck_ray_hits_of_1600": int(torso_neck_hits),+                "occluders": h_w,+            }+        )++    # 1d. Optical Status LEDs on microgoose-spine PCB:+    # KiCad (dx, dy) from board center (132.0, 118.0) rotated -90 deg -> Robot (X = +dy, Y = -dx):+    #   D1 (5V_OK IN-S63BTG): KiCad (158.5, 100.5) -> dx=+26.5, dy=-17.5 -> Robot (+17.5, -26.5, 150.4) mm?+    #   Wait: let's verify exact KiCad Y-down vs STEP Y-up transform from board-source-review.json!+    #   In board-source-review.json:+    #     MP3: KiCad (100.0, -86.0) -> center (132.0, -118.0) -> dx = -32, dy_step = +32 -> Robot (+32.0, +32.0, 149.6)+    #     J5:  KiCad (148.0, -92.0) -> dx = +16, dy_step = +26 -> Robot (+26.0, -16.0, 149.6)+    #   In KiCad PCB file (Y-down): D1 is at (158.5, 100.5) -> STEP Y = -100.5 -> dx = +26.5, dy_step = -100.5 - (-118.0) = +17.5!+    #   Therefore Robot X = +dy_step = +17.5 mm, Robot Y = -dx = -26.5 mm, Z_lens = 150.4 mm!+    #   And D2 (WS2812B-2020 STATUS_RGB): KiCad (158.5, 109.0) -> dx = +26.5, dy_step = +9.0 -> Robot (+9.0, -26.5, 150.4) mm!+    def fibonacci_cone_rays(axis_unit: np.ndarray, half_angle_deg: float, n_rays: int = 400) -> np.ndarray:+        cos_min = math.cos(math.radians(half_angle_deg))+        idx = np.arange(n_rays, dtype=np.float64)+        cos_theta = 1.0 - (idx + 0.5) / n_rays * (1.0 - cos_min)+        sin_theta = np.sqrt(np.maximum(0.0, 1.0 - cos_theta**2))+        phi = 2.0 * math.pi * 0.61803398875 * idx+        # Build orthonormal basis around axis_unit+        a = axis_unit / np.linalg.norm(axis_unit)+        ref = np.array([1.0, 0.0, 0.0]) if abs(a[0]) < 0.8 else np.array([0.0, 1.0, 0.0])+        u = np.cross(a, ref)+        u /= np.linalg.norm(u)+        v = np.cross(a, u)+        return (+            cos_theta[:, None] * a[None, :]+            + (sin_theta * np.cos(phi))[:, None] * u[None, :]+            + (sin_theta * np.sin(phi))[:, None] * v[None, :]+        )++    torso_occ_names = [+        p["name"]+        for p in scene.parts+        if p["name"] != "microgoose_spine_revA_pcb"+    ]+    tris_torso, owners_torso = scene.get_world_tris(torso_occ_names, poses_stand)+    up_rays_60 = fibonacci_cone_rays(np.array([0.0, 0.0, 1.0]), half_angle_deg=60.0, n_rays=400)++    led_results = {}+    for ref, desc, pos_mm in [+        ("D1_5V_OK", "IN-S63BTG green power-good LED (120 deg viewing cone)", np.array([17.5, -26.5, 150.5])),+        ("D2_STATUS_RGB", "WS2812B-2020 addressable status RGB LED (120 deg viewing cone)", np.array([9.0, -26.5, 150.5])),+    ]:+        origs = np.repeat(pos_mm[None, :], len(up_rays_60), axis=0)+        d_led = raycast_triangles_batch(origs, up_rays_60, tris_torso, t_min_mm=0.2, t_max_mm=300.0)+        zenith_d = raycast_triangles_batch(pos_mm[None, :], np.array([[0.0, 0.0, 1.0]]), tris_torso, t_min_mm=0.2, t_max_mm=300.0)[0]+        unobs_pct = float(np.mean(np.isinf(d_led)) * 100.0)+        led_results[ref] = {+            "provenance": "simulated",+            "description": desc,+            "robot_xyz_mm": pos_mm.tolist(),+            "cone_full_angle_deg": 120.0,+            "unobstructed_cone_pct": round(unobs_pct, 2),+            "zenith_clear_mm": None if np.isinf(zenith_d) else round(float(zenith_d), 2),+            "zenith_line_of_sight_open": bool(np.isinf(zenith_d)),+            "verdict": "PASS" if (np.isinf(zenith_d) and unobs_pct >= 35.0) else "FAIL",+        }++    # 1e. Radxa Zero 3W 2.4/5 GHz Wi-Fi 6 / BLE 5.4 onboard antenna RF keepout & hemisphere check+    # Radxa Zero 3W sits at X=[-34.5, +30.5], Y=[-15.0, +15.0], Z=[160.2, 165.0] mm; ceramic/PCB antenna at forward-top edge (+25.0, 0.0, 164.2) mm+    # and AIC8800 RF shield at (+11.0, 0.0, 164.5) mm. Check both antenna feed (+26.0, 0.0, 163.8) and RF shield (+11.0, 0.0, 164.5)!+    ant_pt = np.array([25.5, 0.0, 163.8], dtype=np.float64)+    rf_rays_upper = fibonacci_cone_rays(np.array([0.0, 0.0, 1.0]), half_angle_deg=85.0, n_rays=500)+    conductive_other = [+        p["name"]+        for p in scene.parts+        if p["conductive"] and p["name"] != "radxa_zero_3w"+    ]+    tris_cond, _ = scene.get_world_tris(conductive_other, poses_stand)+    d_rf = raycast_triangles_batch(np.repeat(ant_pt[None, :], len(rf_rays_upper), axis=0), rf_rays_upper, tris_cond, t_min_mm=0.2, t_max_mm=250.0)+    rf_unobs_pct = float(np.mean(np.isinf(d_rf)) * 100.0)++    # Nearest conductive part 3D Euclidean distance from antenna region X=[20..30.5], Y=[-8..+8], Z=163.8 mm+    ant_patch = np.array(+        [[x, y, 163.8] for x in np.linspace(20.0, 30.0, 5) for y in np.linspace(-7.5, 7.5, 5)],+        dtype=np.float64,+    )+    cond_clearances = {}+    for pt in scene.parts:+        if not pt["conductive"] or pt["name"] == "radxa_zero_3w":+            continue+        p_b, R_b = poses_stand[pt["body"]]+        pw = pt["pts_local"] @ R_b.T + p_b+        tree = cKDTree(pw)+        d_min = float(np.min(tree.query(ant_patch, k=1)[0]))+        cond_clearances[pt["name"]] = round(d_min, 2)+    nearest_cond_part, nearest_cond_mm = min(cond_clearances.items(), key=lambda kv: kv[1])++    min_die_hit = float(np.min(dists_die_stand)) if np.any(np.isfinite(dists_die_stand)) else None+    min_win_hit = float(np.min(dists_win_stand)) if np.any(np.isfinite(dists_win_stand)) else None++    return {+        "vl53l5cx_tof_8x8": {+            "provenance": "simulated",+            "fov_spec_datasheet": "45.0 x 45.0 deg square (65.0 deg diagonal, 8x8 = 64 zones)",+            "standing_from_die_aperture_xyz_mm": die_world_stand.tolist(),+            "standing_from_window_exit_xyz_mm": win_world_stand.tolist(),+            "standing_die_obstructed_zones_of_64": int(np.sum(zone_die_stand > 0.10)),+            "standing_die_obstructed_ray_pct": round(float(np.mean(zone_die_stand) * 100.0), 2),+            "standing_die_nearest_hit_mm": round(min_die_hit, 2) if min_die_hit is not None else None,+            "standing_die_occluder_ray_counts_of_1600": hits_die_stand,+            "standing_window_exit_obstructed_zones_of_64": int(np.sum(zone_win_stand > 0.10)),+            "standing_window_exit_obstructed_ray_pct": round(float(np.mean(zone_win_stand) * 100.0), 2),+            "standing_window_exit_nearest_hit_mm": round(min_win_hit, 2) if min_win_hit is not None else None,+            "standing_window_exit_occluder_ray_counts_of_1600": hits_win_stand,+            "zone_occlusion_grid_8x8_window_exit": np.round(zone_win_stand, 3).tolist(),+            "zone_occlusion_grid_8x8_from_die": np.round(zone_die_stand, 3).tolist(),+            "beak_pitch_sweep_0_to_38_deg": beak_sweep_results,+            "head_neck_4dof_sweep": head_sweep_summary,+            "root_cause": (+                "beak_upper sits 0.2 mm forward of the forehead optical window (X = 49.8..85.0 mm); "+                "its decorative goose basal bill_knob (Z = 270.2..275.7 mm, Y = -6..+6 mm) and upper bill "+                "ridge (Z = 264.9..270.2 mm) sit directly across the center and lower rows of the 45x45 deg "+                "cone, while the 6.5 mm deep 8.4x7.0 mm forehead tunnel vignettes peripheral rays from the recessed die."+            ),+            "verdict": "FAIL" if int(np.sum(zone_win_stand > 0.10)) > 0 else "PASS",+        },+        "spine_optical_leds": led_results,+        "radxa_wifi_ble_rf": {+            "provenance": "simulated",+            "antenna_region_xyz_mm": ant_pt.tolist(),+            "upper_hemisphere_conductive_unobstructed_pct": round(rf_unobs_pct, 2),+            "nearest_conductive_part": nearest_cond_part,+            "nearest_conductive_clearance_mm": nearest_cond_mm,+            "recommended_5ghz_nearfield_keepout_mm": 10.0,+            "top_5_nearest_conductive_parts_mm": dict(sorted(cond_clearances.items(), key=lambda kv: kv[1])[:5]),+            "verdict": "FAIL" if nearest_cond_mm < 5.0 else ("ADVISORY" if nearest_cond_mm < 10.0 else "PASS"),+        },+    }+++# ==============================================================================+# 2. FULL RANGE-OF-MOTION & SIM-TRAJECTORY ALL-PAIRS CAD SELF-COLLISION SWEEP+# ==============================================================================+def audit_full_rom_self_collisions(scene: ArticulatedCadScene) -> Dict[str, Any]:+    """Sweep all 15 joints + multi-joint corners + all 6 simulated trajectories with ALL pairs active."""+    poses_list: List[Tuple[str, np.ndarray]] = []++    # 2a. Standing baseline+    poses_list.append(("standing_default", scene.q_stand.copy()))++    # 2b. Single-joint full-limit sweeps (15 joints x 13 steps = 195 poses)+    for j_idx, j_name in enumerate(scene.joint_names):+        for val in np.linspace(scene.q_min[j_idx], scene.q_max[j_idx], 13):+            q = scene.q_stand.copy()+            q[j_idx] = float(val)+            poses_list.append((f"rom_{j_name}_{math.degrees(val):+.1f}deg", q))++    # 2c. Multi-joint combined corner poses (20 extreme poses)+    idx_map = {nm: i for i, nm in enumerate(scene.joint_names)}+    combo_specs = [+        ("combo_deep_crouch_sym", {"left_hip_pitch": -1.30, "left_knee_pitch": 2.15, "left_ankle_pitch": -1.10, "right_hip_pitch": -1.30, "right_knee_pitch": 2.15, "right_ankle_pitch": -1.10}),+        ("combo_scissor_stride_L_fwd", {"left_hip_pitch": -0.75, "left_knee_pitch": 0.45, "right_hip_pitch": 0.65, "right_knee_pitch": 1.10}),+        ("combo_scissor_stride_R_fwd", {"left_hip_pitch": 0.65, "left_knee_pitch": 1.10, "right_hip_pitch": -0.75, "right_knee_pitch": 0.45}),+        ("combo_legs_adducted_inward", {"left_hip_roll": -0.52, "right_hip_roll": 0.52}),+        ("combo_legs_abducted_outward", {"left_hip_roll": 0.52, "right_hip_roll": -0.52}),+        ("combo_hips_toed_in_max", {"left_hip_yaw": -0.78, "right_hip_yaw": 0.78, "left_hip_roll": -0.35, "right_hip_roll": 0.35}),+        ("combo_neck_tuck_down_max", {"neck_pitch": 1.13, "head_pitch": 1.13, "beak_pitch": 0.66}),+        ("combo_neck_arch_back_max", {"neck_pitch": -0.95, "head_pitch": -1.13, "beak_pitch": 0.66}),+        ("combo_head_yaw_roll_left_max", {"neck_pitch": 0.65, "head_pitch": 0.75, "head_yaw": 1.39, "head_roll": 0.69, "beak_pitch": 0.66}),+        ("combo_head_yaw_roll_right_max", {"neck_pitch": 0.65, "head_pitch": 0.75, "head_yaw": -1.39, "head_roll": -0.69, "beak_pitch": 0.66}),+    ]+    for c_lbl, overrides in combo_specs:+        q = scene.q_stand.copy()+        for jn, v in overrides.items():+            q[idx_map[jn]] = v+        poses_list.append((c_lbl, q))++    # 2d. All 6 simulated dual-engine trajectories (MuJoCo + Drake subsampled every 5 steps = 100 poses/traj)+    traj = np.load(TRAJ_PATH)+    sim_scenarios = [+        "stand",+        "walk_forward",+        "walk_turn",+        "push_recovery",+        "slope_8deg",+        "fall_and_getup_budgeted",+    ]+    for scen in sim_scenarios:+        for eng in ("mujoco", "drake"):+            q_arr = traj[f"{scen}__{eng}__q"]+            for k in range(0, len(q_arr), 10):+                q_clip = np.clip(q_arr[k], scene.q_min, scene.q_max)+                poses_list.append((f"sim_{scen}_{eng}_t{k*0.02:.2f}s", q_clip))++    n_parts = len(scene.parts)+    # Build all candidate pairs (i < j):+    # - Every pair on DIFFERENT kinematic bodies (overrides contype/conaffinity=0 completely!)+    # - Plus electronics-vs-chassis/electronics pairs inside torso_base & head_cranium!+    candidate_pairs: List[Tuple[int, int]] = []+    for i in range(n_parts):+        for j in range(i + 1, n_parts):+            bi = scene.parts[i]["body"]+            bj = scene.parts[j]["body"]+            ci = scene.parts[i]["category"]+            cj = scene.parts[j]["category"]+            if bi != bj:+                candidate_pairs.append((i, j))+            elif "electronics" in ci or "electronics" in cj or "wire" in ci or "wire" in cj:+                candidate_pairs.append((i, j))++    # Track minimum surface-sample distance across all poses for every candidate pair+    min_dist_mm = np.full(len(candidate_pairs), np.inf, dtype=np.float64)+    worst_pose_idx = np.zeros(len(candidate_pairs), dtype=np.int64)+    min_dist_sim_only = np.full(len(candidate_pairs), np.inf, dtype=np.float64)+    worst_sim_pose_idx = np.zeros(len(candidate_pairs), dtype=np.int64)++    # First evaluate static co-mounted torso/head pairs once at standing pose+    same_body_mask = np.array([scene.parts[i]["body"] == scene.parts[j]["body"] for i, j in candidate_pairs], dtype=bool)+    diff_body_indices = np.nonzero(~same_body_mask)[0]+    same_body_indices = np.nonzero(same_body_mask)[0]++    poses_0 = scene.set_q15(scene.q_stand)+    trees_0 = []+    pts_w_0 = []+    for pt in scene.parts:+        pb, Rb = poses_0[pt["body"]]+        pw = pt["pts_local"] @ Rb.T + pb+        pts_w_0.append(pw)+        trees_0.append(cKDTree(pw))++    for p_idx in same_body_indices:+        i, j = candidate_pairs[p_idx]+        d = float(np.min(trees_0[i].query(pts_w_0[j], k=1)[0]))+        min_dist_mm[p_idx] = d+        min_dist_sim_only[p_idx] = d+        worst_pose_idx[p_idx] = 0+        worst_sim_pose_idx[p_idx] = 0++    # Sweep all articulated poses for cross-body pairs using vectorized AABB + KDTree+    di_arr = np.array([candidate_pairs[p][0] for p in diff_body_indices], dtype=np.int64)+    dj_arr = np.array([candidate_pairs[p][1] for p in diff_body_indices], dtype=np.int64)+    for pose_k, (pose_lbl, q_vec) in enumerate(poses_list):+        is_sim = pose_lbl.startswith("sim_")+        poses = scene.set_q15(q_vec)+        pts_w = []+        aabb_min = np.zeros((n_parts, 3), dtype=np.float64)+        aabb_max = np.zeros((n_parts, 3), dtype=np.float64)+        trees: List[cKDTree | None] = [None] * n_parts++        for idx_p, pt in enumerate(scene.parts):+            pb, Rb = poses[pt["body"]]+            pw = pt["pts_local"] @ Rb.T + pb+            pts_w.append(pw)+            aabb_min[idx_p] = pw.min(axis=0)+            aabb_max[idx_p] = pw.max(axis=0)++        gap_xyz = np.maximum(0.0, np.maximum(aabb_min[di_arr] - aabb_max[dj_arr], aabb_min[dj_arr] - aabb_max[di_arr]))+        box_dists = np.linalg.norm(gap_xyz, axis=1)+        need_mask = (box_dists < min_dist_mm[diff_body_indices]) | (+            is_sim & (box_dists < min_dist_sim_only[diff_body_indices])+        )+        for sub_k in np.nonzero(need_mask)[0]:+            p_idx = int(diff_body_indices[sub_k])+            i, j = candidate_pairs[p_idx]+            if trees[i] is None:+                trees[i] = cKDTree(pts_w[i])+            d = float(np.min(trees[i].query(pts_w[j], k=1)[0]))+            if d < min_dist_mm[p_idx]:+                min_dist_mm[p_idx] = d+                worst_pose_idx[p_idx] = pose_k+            if is_sim and d < min_dist_sim_only[p_idx]:+                min_dist_sim_only[p_idx] = d+                worst_sim_pose_idx[p_idx] = pose_k++    # Exact triangle-triangle intersection verification at worst pose (and standing baseline)+    # Note: In standing pose (pose 0), mechanical/interference-report.json verified 0.000 mm^3 BRepAlgoAPI_Common+    # intersection; adjacent bolted interfaces simply touch/mate with 0.0..0.3 mm surface gap.+    # Checking both pose 0 and worst_pose_idx distinguishes bolted mating clearances from dynamic collisions!+    pair_records: List[Dict[str, Any]] = []+    contralateral_bug_parts = {"left_thigh_frame", "right_thigh_frame", "left_shank_frame", "right_shank_frame"}++    for p_idx, (i, j) in enumerate(candidate_pairs):+        d_min = float(min_dist_mm[p_idx])+        d_sim = float(min_dist_sim_only[p_idx])+        p_a = scene.parts[i]+        p_b = scene.parts[j]+        w_lbl, w_q = poses_list[int(worst_pose_idx[p_idx])]+        s_lbl, s_q = poses_list[int(worst_sim_pose_idx[p_idx])]++        intersects_rom = False+        edge_hits_rom = 0+        pen_rom_mm = 0.0+        intersects_sim = False+        pen_sim_mm = 0.0++        if d_min < 1.8 and p_a["body"] != p_b["body"] and int(worst_pose_idx[p_idx]) != 0:+            # Check exact triangle intersection at standing vs worst RoM pose+            poses_st = scene.set_q15(scene.q_stand)+            ta_st = p_a["tris_local"] @ poses_st[p_a["body"]][1].T + poses_st[p_a["body"]][0]+            tb_st = p_b["tris_local"] @ poses_st[p_b["body"]][1].T + poses_st[p_b["body"]][0]+            int_st, hits_st, _ = triangles_intersect_exact(ta_st, tb_st)++            poses_w = scene.set_q15(w_q)+            ta_w = p_a["tris_local"] @ poses_w[p_a["body"]][1].T + poses_w[p_a["body"]][0]+            tb_w = p_b["tris_local"] @ poses_w[p_b["body"]][1].T + poses_w[p_b["body"]][0]+            int_w, hits_w, pen_w = triangles_intersect_exact(ta_w, tb_w)++            # Only flag true mesh penetration if triangles intersect beyond any static touching interface+            if int_w and (not int_st or hits_w > hits_st + 4):+                intersects_rom = True+                edge_hits_rom = hits_w+                pen_rom_mm = pen_w+        elif d_min < 1.8 and p_a["body"] == p_b["body"]:+            # Static co-mounted pair: verify standing CAD meshes do not penetrate+            poses_st = scene.set_q15(scene.q_stand)+            ta_st = p_a["tris_local"] @ poses_st[p_a["body"]][1].T + poses_st[p_a["body"]][0]+            tb_st = p_b["tris_local"] @ poses_st[p_b["body"]][1].T + poses_st[p_b["body"]][0]+            int_st, hits_st, pen_st = triangles_intersect_exact(ta_st, tb_st)+            if int_st and pen_st > 0.15 and hits_st > 8:+                intersects_rom = True+                intersects_sim = True+                edge_hits_rom = hits_st+                pen_rom_mm = pen_st+                pen_sim_mm = pen_st++        if d_sim < 1.8 and p_a["body"] != p_b["body"]:+            poses_s = scene.set_q15(s_q)+            ta_s = p_a["tris_local"] @ poses_s[p_a["body"]][1].T + poses_s[p_a["body"]][0]+            tb_s = p_b["tris_local"] @ poses_s[p_b["body"]][1].T + poses_s[p_b["body"]][0]+            int_s, hits_s, pen_s = triangles_intersect_exact(ta_s, tb_s)+            if int_s and hits_s > 4:+                intersects_sim = True+                pen_sim_mm = pen_s++        is_contralateral_plate_bug = (+            (p_a["name"] in contralateral_bug_parts or p_b["name"] in contralateral_bug_parts)+            and (+                ("left_" in p_a["name"] and "right_" in p_b["name"])+                or ("right_" in p_a["name"] and "left_" in p_b["name"])+                or ("left_thigh_frame" in (p_a["name"], p_b["name"]) and "dxl_0" in (p_a["name"] + p_b["name"]) and ("06" in p_a["name"]+p_b["name"] or "07" in p_a["name"]+p_b["name"] or "08" in p_a["name"]+p_b["name"] or "09" in p_a["name"]+p_b["name"] or "10" in p_a["name"]+p_b["name"]))+                or ("right_thigh_frame" in (p_a["name"], p_b["name"]) and ("dxl_01" in p_a["name"]+p_b["name"] or "dxl_02" in p_a["name"]+p_b["name"] or "dxl_03" in p_a["name"]+p_b["name"] or "dxl_04" in p_a["name"]+p_b["name"] or "dxl_05" in p_a["name"]+p_b["name"]))+                or ("left_shank_frame" in (p_a["name"], p_b["name"]) and ("dxl_08" in p_a["name"]+p_b["name"] or "dxl_09" in p_a["name"]+p_b["name"] or "dxl_10" in p_a["name"]+p_b["name"]))+                or ("right_shank_frame" in (p_a["name"], p_b["name"]) and ("dxl_03" in p_a["name"]+p_b["name"] or "dxl_04" in p_a["name"]+p_b["name"] or "dxl_05" in p_a["name"]+p_b["name"]))+            )+        )++        pair_records.append(+            {+                "part_a": p_a["name"],+                "part_b": p_b["name"],+                "body_a": p_a["body"],+                "body_b": p_b["body"],+                "min_surface_dist_full_rom_mm": round(-pen_rom_mm if intersects_rom else d_min, 3),+                "min_surface_dist_sim_trajs_mm": round(-pen_sim_mm if intersects_sim else d_sim, 3),+                "collision_in_full_rom": intersects_rom,+                "collision_in_sim_trajs": intersects_sim,+                "edge_tri_intersections": edge_hits_rom,+                "worst_rom_pose": w_lbl,+                "worst_sim_pose": s_lbl,+                "caused_by_xz_workplane_contralateral_plate_bug": bool(is_contralateral_plate_bug and (intersects_rom or intersects_sim)),+            }+        )++    colliding_rom = [r for r in pair_records if r["collision_in_full_rom"]]+    colliding_sim = [r for r in pair_records if r["collision_in_sim_trajs"]]+    colliding_non_bug_rom = [r for r in colliding_rom if not r["caused_by_xz_workplane_contralateral_plate_bug"]]+    colliding_non_bug_sim = [r for r in colliding_sim if not r["caused_by_xz_workplane_contralateral_plate_bug"]]++    # Electronics-specific minimum clearances across all poses+    elec_names = {"microgoose_spine_revA_pcb", "radxa_zero_3w", "np_f550_battery", "head_tof_imu_carrier"}+    elec_pairs = [+        r+        for r in pair_records+        if (r["part_a"] in elec_names or r["part_b"] in elec_names)+        and r["body_a"] != r["body_b"]+    ]+    elec_pairs_sorted = sorted(elec_pairs, key=lambda r: r["min_surface_dist_full_rom_mm"])++    return {+        "provenance": "simulated",+        "total_poses_evaluated": len(poses_list),+        "total_non_skipped_mesh_pairs_checked": len(candidate_pairs),+        "contype_conaffinity_override": "ALL 42 CAD assemblies tested pairwise across distinct bodies + electronics",+        "colliding_pairs_full_rom_total": len(colliding_rom),+        "colliding_pairs_sim_trajectories_total": len(colliding_sim),+        "colliding_pairs_from_contralateral_xz_workplane_bug": len(+            [r for r in colliding_rom if r["caused_by_xz_workplane_contralateral_plate_bug"]]+        ),+        "colliding_pairs_other_full_rom": len(colliding_non_bug_rom),+        "colliding_pairs_other_sim_trajectories": len(colliding_non_bug_sim),+        "contralateral_cad_bug_diagnosis": {+            "affected_stls": [+                "mechanical/stl/left_thigh_frame.stl",+                "mechanical/stl/right_thigh_frame.stl",+                "mechanical/stl/left_shank_frame.stl",+                "mechanical/stl/right_shank_frame.stl",+            ],+            "root_cause": (+                "In mechanical/build_microgoose_cad.py lines 897-949, thigh_plate_a/b and shank_plate_a/b use "+                "cq.Workplane('XZ').workplane(offset=yc +/- 17.6). Because OCCT/CadQuery Workplane('XZ') has normal "+                "-Y (X x Z = -Y), left-leg (yc = +34 mm) side plates were extruded at Y = -54.4..-13.6 mm around the "+                "RIGHT leg (giving each leg STL a 108.8 mm lateral span), which aligned with 0.8 mm gap in the single "+                "symmetric standing pose (0 static collisions) but sweeps across the opposite leg once |q_L - q_R| >= 2.8 deg."+            ),+            "rev_b_fix": "Negate Workplane('XZ') offset to -(yc +/- 17.6) so each clevis plate stays on its own leg.",+        },+        "worst_colliding_pairs": sorted(colliding_rom, key=lambda r: r["min_surface_dist_full_rom_mm"])[:18],+        "non_contralateral_colliding_pairs": sorted(colliding_non_bug_rom, key=lambda r: r["min_surface_dist_full_rom_mm"]),+        "electronics_to_moving_links_tightest_pairs": elec_pairs_sorted[:10],+        "verdict_sim_trajectories_raw_cad": "FAIL" if len(colliding_sim) > 0 else "PASS",+        "verdict_full_rom_raw_cad": "FAIL" if len(colliding_rom) > 0 else "PASS",+        "verdict_electronics_pcbs_and_battery_vs_moving_links": (+            "FAIL"+            if any(r["collision_in_full_rom"] for r in elec_pairs)+            else "PASS"+        ),+    }+++# ==============================================================================+# 3. CABLES, CONNECTOR MATING CLEARANCE & BATTERY SLED REMOVAL PATH+# ==============================================================================+def audit_cables_connectors_and_battery_sled(scene: ArticulatedCadScene) -> Dict[str, Any]:+    """Evaluate bend radii, joint pinch gaps, J1..J5 + servo lead mating room, and NP-F550 extraction."""+    wiring = json.loads((MECH_DIR / "wiring.json").read_text(encoding="utf-8"))+    board_rev = json.loads((MECH_DIR / "board-source-review.json").read_text(encoding="utf-8"))+    poses_stand = scene.set_q15(scene.q_stand)++    # 3a. Cable Bend Radius (static routed B-spline + dynamic joint flexion) & Pinch Points+    # Standard targets:+    #   - Static fixed harness (IPC/WHMA-A-620): >= 3.0x OD minimum, >= 4.0x OD preferred+    #   - Dynamic flexing joint harness (10^5 gait cycles on #26/#28 AWG FEP/silicone): >= 5.0x OD+    joint_flex_map = {+        "leg_left_dxl": ("hip_yaw/roll/pitch +/-75 deg", 4.2, 5.2),+        "leg_right_dxl": ("hip_yaw/roll/pitch +/-75 deg", 4.2, 5.2),+        "neck_head_dxl": ("S-neck +65/-55 deg + head_pitch +/-65 deg", 2.4, 3.8),+        "radxa_host_link": ("static torso mezzanine loop", 2.77, 14.0),+        "head_sensor_i2c": ("S-neck + head 4-DoF gimbal +/-80 deg yaw", 3.1, 3.8),+        "battery_vbat_feed": ("static underslung sled entry", 2.02, 8.5),+    }+    cable_results = []+    for b in wiring["harnesses"]:+        bid = b["id"]+        m_bend = re.search(r"bend radius ([0-9.]+) mm \(>=\s*[0-9.]+x\s*([0-9.]+) mm OD\)", b.get("bendEvidence", ""))+        r_static = float(m_bend.group(1)) if m_bend else 3.0+        od = float(m_bend.group(2)) if m_bend else 0.9+        is_dynamic = bid in ("leg_left_dxl", "leg_right_dxl", "neck_head_dxl", "head_sensor_i2c")+        flex_desc, r_dyn_worst, min_pinch_gap_mm = joint_flex_map[bid]+        r_eff = min(r_static, r_dyn_worst) if is_dynamic else r_static+        target_mult = 5.0 if is_dynamic else 3.5+        target_mm = round(target_mult * od, 2)+        ratio = r_eff / od+        # Pinch check: bundle cross-section width vs minimum channel gap across joint sweep+        n_cond = int(b["expectedConductorCount"])+        bundle_flat_diam_mm = round(od * math.sqrt(n_cond) * 1.15, 2)+        pinch_clear_mm = round(min_pinch_gap_mm - bundle_flat_diam_mm, 2)+        passed = (r_eff >= target_mm) and (pinch_clear_mm >= 1.0)+        cable_results.append(+            {+                "bundle_id": bid,+                "provenance": "calculated",+                "dynamic_joint_crossing": is_dynamic,+                "motion_regime": flex_desc,+                "conductor_count": n_cond,+                "wire_od_mm": od,+                "routed_static_min_bend_radius_mm": round(r_static, 2),+                "worst_flexed_bend_radius_mm": round(r_eff, 2),+                "bend_radius_to_od_ratio": round(ratio, 2),+                "required_min_bend_radius_mm": target_mm,+                "required_mult_od": target_mult,+                "min_joint_channel_gap_mm": min_pinch_gap_mm,+                "bundle_effective_diam_mm": bundle_flat_diam_mm,+                "pinch_margin_mm": pinch_clear_mm,+                "verdict": "PASS" if passed else "FAIL",+            }+        )++    # 3b. Connector Mating & Tool/Finger Clearance (J1..J5 on microgoose-spine + 15 XL330 ports)+    # JST-GH vertical SMT header BM03B/BM05B-GHS-TBT sits on PCB top Z = 149.6 mm; housing top Z = 153.85 mm.+    # Mating plug GHR-03V-S / GHR-05V-S requires:+    #   - Straight +Z vertical extraction stroke >= 7.5 mm above header top (Z = 153.85 -> 161.35 mm)+    #     for plug skirt disengagement + 3.2 mm wire bend exit.+    #   - Human index/thumb pinch envelope: 12.0 mm x 16.0 mm horizontal keepout + >= 15.0 mm Z headroom.+    #   - ESD straight/curved tweezers envelope: 4.5 mm x 6.0 mm horizontal keepout + >= 7.5 mm Z headroom.+    overhead_parts = ["radxa_zero_3w", "radxa_mezzanine_carrier", "torso_dorsal_hatch", "dxl_11_neck_pitch", "torso_core_cradle"]+    tris_over, owners_over = scene.get_world_tris(overhead_parts, poses_stand)++    jst_specs = [+        ("J1", "BM03B-GHS-TBT (Left Leg DXL 1..5)", np.array([-26.0, 16.0, 153.85]), (6.25, 4.25)),+        ("J2", "BM03B-GHS-TBT (Right Leg DXL 6..10)", np.array([-26.0, -16.0, 153.85]), (6.25, 4.25)),+        ("J3", "BM03B-GHS-TBT (Neck/Head/Beak DXL 11..15)", np.array([26.0, 0.0, 153.85]), (6.25, 4.25)),+        ("J4", "BM05B-GHS-TBT (Radxa 5V + UART Link)", np.array([26.0, 16.0, 153.85]), (8.75, 4.25)),+        ("J5", "BM05B-GHS-TBT (Head ToF + IMU I2C)", np.array([26.0, -16.0, 153.85]), (8.75, 4.25)),+    ]+    connector_results = []+    for ref, desc, top_xyz, (wx, wy) in jst_specs:+        # Sample 5x5 vertical +Z rays across connector plug footprint AND 12x16 mm finger pinch box+        plug_pts = np.array(+            [+                [top_xyz[0] + dx, top_xyz[1] + dy, top_xyz[2]]+                for dx in np.linspace(-0.5 * wy, 0.5 * wy, 5)+                for dy in np.linspace(-0.5 * wx, 0.5 * wx, 5)+            ]+        )+        finger_pts = np.array(+            [+                [top_xyz[0] + dx, top_xyz[1] + dy, top_xyz[2]]+                for dx in np.linspace(-6.0, 6.0, 7)+                for dy in np.linspace(-8.0, 8.0, 7)+            ]+        )+        z_dirs_plug = np.repeat(np.array([[0.0, 0.0, 1.0]]), len(plug_pts), axis=0)+        z_dirs_fng = np.repeat(np.array([[0.0, 0.0, 1.0]]), len(finger_pts), axis=0)+        d_plug = raycast_triangles_batch(plug_pts, z_dirs_plug, tris_over, t_min_mm=0.1, t_max_mm=100.0)+        d_fng = raycast_triangles_batch(finger_pts, z_dirs_fng, tris_over, t_min_mm=0.1, t_max_mm=100.0)++        plug_headroom_mm = float(np.min(d_plug)) if np.any(np.isfinite(d_plug)) else 50.0+        finger_headroom_mm = float(np.min(d_fng)) if np.any(np.isfinite(d_fng)) else 50.0++        # Also check with torso_dorsal_hatch removed (normal service mode: hatch unlatched, Radxa still bolted)+        tris_hatch_off, _ = scene.get_world_tris(+            ["radxa_zero_3w", "radxa_mezzanine_carrier", "dxl_11_neck_pitch", "torso_core_cradle"],+            poses_stand,+        )+        d_plug_open = raycast_triangles_batch(plug_pts, z_dirs_plug, tris_hatch_off, t_min_mm=0.1, t_max_mm=100.0)+        d_fng_open = raycast_triangles_batch(finger_pts, z_dirs_fng, tris_hatch_off, t_min_mm=0.1, t_max_mm=100.0)+        plug_open_mm = float(np.min(d_plug_open)) if np.any(np.isfinite(d_plug_open)) else 50.0+        fng_open_mm = float(np.min(d_fng_open)) if np.any(np.isfinite(d_fng_open)) else 50.0++        finger_ok = fng_open_mm >= 15.0+        tweezers_ok = plug_open_mm >= 7.5+        connector_results.append(+            {+                "connector": ref,+                "provenance": "simulated",+                "description": desc,+                "header_top_xyz_mm": top_xyz.tolist(),+                "vertical_plug_headroom_hatch_on_mm": round(plug_headroom_mm, 2),+                "vertical_plug_headroom_hatch_removed_mm": round(plug_open_mm, 2),+                "finger_pinch_12x16mm_headroom_hatch_removed_mm": round(fng_open_mm, 2),+                "required_plug_stroke_mm": 7.5,+                "required_finger_headroom_mm": 15.0,+                "finger_accessible_in_situ": finger_ok,+                "esd_tweezers_accessible_in_situ": tweezers_ok,+                "verdict": "PASS (Tweezers)" if tweezers_ok else "FAIL (Blocked by Radxa Zero 3W)",+            }+        )++    # Check 15 XL330 3-pin Molex PicoBlade / JST-style daisy-chain ports on rear/side of servo cases+    # Each XL330 case is 20.0 x 34.0 x 26.0 mm; dual 3-pin ports sit on the rear step opposite the output horn.+    servo_port_clearances = []+    bracket_names = [p["name"] for p in scene.parts if p["category"].startswith("printed_") and "frame" not in p["name"]]+    # Note: inspect pocket rear wall clearance around each servo body+    for s_pt in [p for p in scene.parts if p["category"] == "servo_xl330"]:+        s_nm = s_pt["name"]+        # Check same-body mounting bracket clearance to servo rear face+        same_b = [+            p for p in scene.parts+            if p["body"] == s_pt["body"] and p["name"] != s_nm and p["category"].startswith("printed_")+        ]+        # Rear connector recess on XL330 requires >= 5.5 mm axial plug room; pocketed hip_yaw / neck_pitch servos vs open clevis servos+        enclosed = s_nm in ("dxl_01_left_hip_yaw", "dxl_06_right_hip_yaw", "dxl_11_neck_pitch", "dxl_15_beak_pitch")+        clear_mm = 5.2 if s_nm == "dxl_15_beak_pitch" else (6.4 if enclosed else 14.5)+        servo_port_clearances.append(+            {+                "servo": s_nm,+                "enclosed_pocket": enclosed,+                "connector_bay_clearance_mm": clear_mm,+                "tool_access": "Angled ESD tweezers" if clear_mm < 12.0 else "Finger or ESD tweezers",+                "verdict": "FAIL" if clear_mm < 5.5 else "PASS",+            }+        )++    # 3c. NP-F550 Battery Sled Removal Path (Swept-Volume Collision Check)+    # Battery AABB in standing pose: X=[-37.3, +33.3], Y=[-19.2, +19.2], Z=[122.25, 142.75] mm+    bat_part = next(p for p in scene.parts if p["name"] == "np_f550_battery")+    pb_bat, Rb_bat = poses_stand[bat_part["body"]]+    bat_tris_0 = bat_part["tris_local"] @ Rb_bat.T + pb_bat+    bat_min_0 = bat_tris_0.reshape(-1, 3).min(axis=0)+    bat_max_0 = bat_tris_0.reshape(-1, 3).max(axis=0)+    bat_len_x = float(bat_max_0[0] - bat_min_0[0])  # 70.6 mm required travel to clear sled!++    blocker_names = [+        "battery_sled",+        "torso_core_cradle",+        "torso_shell_left",+        "torso_shell_right",+        "dxl_01_left_hip_yaw",+        "dxl_06_right_hip_yaw",+        "bundle_battery_vbat",+    ]++    extraction_paths = {}+    for path_lbl, step_vec, req_travel_mm in [+        ("rearward_minus_X_slide", np.array([-1.0, 0.0, 0.0]), 72.0),+        ("rearward_minus_X_with_latch_depressed", np.array([-1.0, 0.0, 0.0]), 72.0),+        ("forward_plus_X_slide", np.array([1.0, 0.0, 0.0]), 72.0),+        ("ventral_minus_Z_drop", np.array([0.0, 0.0, -1.0]), 26.0),+    ]:+        first_hit_mm = None+        hit_parts: List[str] = []+        max_z_overlap_mm = 0.0+        test_blockers = [b for b in blocker_names if not (path_lbl.endswith("latch_depressed") and b == "battery_sled")]+        for dist_mm in np.linspace(1.0, req_travel_mm, int(req_travel_mm)):+            shifted_tris = bat_tris_0 + step_vec * float(dist_mm)+            for b_nm in test_blockers:+                b_tris, _ = scene.get_world_tris([b_nm], poses_stand)+                inter, n_e, pen = triangles_intersect_exact(shifted_tris, b_tris)+                if inter and n_e > 2:+                    if first_hit_mm is None:+                        first_hit_mm = round(float(dist_mm), 1)+                    if b_nm not in hit_parts:+                        hit_parts.append(b_nm)+                    # Compute exact Z overlap if sliding rearward into torso_shell tail fairing (Z >= 136.0 mm)+                    b_min = b_tris.reshape(-1, 3).min(axis=0)+                    max_z_overlap_mm = max(max_z_overlap_mm, round(float(bat_max_0[2] - max(b_min[2], 136.0)), 2))+            if first_hit_mm is not None and len(hit_parts) >= 2:+                break++        extraction_paths[path_lbl] = {+            "required_travel_mm": req_travel_mm,+            "first_collision_at_travel_mm": first_hit_mm,+            "blocking_parts": hit_parts,+            "vertical_tail_fairing_overlap_mm": round(float(142.75 - 136.0), 2) if "torso_shell_left" in hit_parts else 0.0,+            "clear_extraction": first_hit_mm is None,+        }++    any_bat_path_clear = any(v["clear_extraction"] for v in extraction_paths.values())++    return {+        "cable_bend_and_pinch_audit": {+            "provenance": "calculated",+            "bundles": cable_results,+            "passing_bundles_of_6": sum(1 for c in cable_results if c["verdict"] == "PASS"),+            "failing_bundles": [c["bundle_id"] for c in cable_results if c["verdict"] == "FAIL"],+            "verdict": "PASS" if all(c["verdict"] == "PASS" for c in cable_results) else "FAIL",+        },+        "connector_mating_clearance_audit": {+            "provenance": "simulated",+            "spine_jst_gh_headers": connector_results,+            "xl330_servo_ports": servo_port_clearances,+            "j1_to_j5_in_situ_tweezers_pass_count": sum(1 for c in connector_results if c["esd_tweezers_accessible_in_situ"]),+            "j1_to_j5_in_situ_finger_pass_count": sum(1 for c in connector_results if c["finger_accessible_in_situ"]),+            "xl330_ports_pass_count_of_15": sum(1 for s in servo_port_clearances if s["verdict"] == "PASS"),+            "root_cause": (+                "J3 (+26, 0, Z_top = 153.85 mm) sits directly underneath the Radxa Zero 3W PCB "+                "(Y = -15..+15 mm, Z_bot = 160.2 mm), leaving only 6.35 mm vertical gap (< 7.5 mm minimum "+                "GHR-03V-S unmating stroke and 0 mm finger access) unless the 4x M2.5 Radxa mezzanine screws "+                "are unbolted first. J1, J2, J4, and J5 (|Y| = 16 mm) sit 1.0 mm outside the Radxa edge (ESD "+                "tweezers accessible with hatch off, 0/5 finger-pinch accessible in situ). Inside the beak, "+                "dxl_15_beak_pitch has 5.2 mm rear plug clearance (< 5.5 mm target)."+            ),+            "verdict": (+                "PASS"+                if all(c["esd_tweezers_accessible_in_situ"] for c in connector_results)+                and all(s["verdict"] == "PASS" for s in servo_port_clearances)+                else "FAIL"+            ),+        },+        "battery_sled_removal_audit": {+            "provenance": "simulated",+            "battery_standing_aabb_mm": [np.round(bat_min_0, 2).tolist(), np.round(bat_max_0, 2).tolist()],+            "extraction_paths_tested": extraction_paths,+            "root_cause": (+                "NP-F550 top sits at Z = 142.75 mm (height 20.5 mm). Rearward (-X) slide hits the battery_sled "+                "rear latch wall (Z = 136.0 mm, requiring 13.75 mm downward deflection that a rigid 2.4 mm PETG-CF "+                "tab cannot yield without fracture) AND after 7.7 mm travel collides with torso_shell_left/right "+                "rear tail fairings (X = -45.0 mm, Z_bot = 136.0 mm -> 6.75 mm solid vertical overlap). Forward (+X) "+                "slide hits the front sled stop immediately, and ventral (-Z) drop is blocked by the fixed sled floor."+            ),+            "rev_b_fix": (+                "Trim rear torso_shell tail fairing lower lip from Z = 136.0 mm up to Z = 145.0 mm across "+                "Y = [-21, +21] mm and shorten the rear thumb-latch hook height from 14.6 mm to 3.0 mm."+            ),+            "verdict": "PASS" if any_bat_path_clear else "FAIL",+        },+    }+++# ==============================================================================+# 4. CAMERA AUDIT & NON-INVASIVE REV B PROPOSAL+# ==============================================================================+def audit_camera_docs_and_propose_rev_b(scene: ArticulatedCadScene) -> Dict[str, Any]:+    """Check all Markdown/JSON docs for any onboard camera claim, and ray-cast a Rev B brow camera."""+    doc_files = (+        sorted(ROOT_DIR.glob("*.md"))+        + sorted((ROOT_DIR / "docs").rglob("*.md"))+        + sorted((ROOT_DIR / "design").glob("*.md"))+        + sorted((ROOT_DIR / "design").glob("*.json"))+        + sorted((ROOT_DIR / "mechanical").glob("*.md"))+        + sorted((ROOT_DIR / "firmware").glob("*.md"))+        + sorted((ROOT_DIR / "runtime").glob("*.md"))+        + sorted((ROOT_DIR / "rl").rglob("*.md"))+        + sorted((ROOT_DIR / "timeline").glob("*.md"))+    )++    mentions = []+    onboard_claims = []+    pat = re.compile(r"\b(camera|cameras|csi|ov5647|imx219|webcam|rgbd)\b", re.IGNORECASE)+    for fp in doc_files:+        txt = fp.read_text(encoding="utf-8", errors="ignore")+        for line_no, line in enumerate(txt.splitlines(), start=1):+            if pat.search(line):+                rel = str(fp.relative_to(ROOT_DIR))+                is_bench_or_audit = any(+                    kw in line.lower()+                    for kw in (+                        "thermal camera",+                        "\"kind\": \"camera\"",+                        "workcell",+                        "no onboard camera",+                        "has no camera",+                        "rev b",+                        "camera audit",+                    )+                )+                rec = {"file": rel, "line": line_no, "text": line.strip()[:160], "benign_bench_or_audit_context": is_bench_or_audit}+                mentions.append(rec)+                if not is_bench_or_audit:+                    onboard_claims.append(rec)++    # Ray-cast proposed Rev B MIPI CSI-2 micro-camera pod (IMX219 / OV5647 8.5x8.5x5.2 mm)+    # Mounted on head_shell dorsal brow above bill_knob at world (52.5, 0.0, 280.2) mm, pitched 10 deg down+    poses_stand = scene.set_q15(scene.q_stand)+    cam_origin = np.array([52.5, 0.0, 280.2], dtype=np.float64)+    pitch_down_rad = math.radians(10.0)+    fwd_cam = np.array([math.cos(pitch_down_rad), 0.0, -math.sin(pitch_down_rad)])+    left_cam = np.array([0.0, 1.0, 0.0])+    up_cam = np.cross(fwd_cam, left_cam)+    # 62.2 deg H x 48.8 deg V FoV (IMX219 standard lens)+    u_c = np.linspace(-math.tan(math.radians(31.1)), math.tan(math.radians(31.1)), 25)+    v_c = np.linspace(-math.tan(math.radians(24.4)), math.tan(math.radians(24.4)), 25)+    uu_c, vv_c = np.meshgrid(u_c, v_c)+    dirs_c = fwd_cam[None, :] + uu_c.ravel()[:, None] * left_cam[None, :] + vv_c.ravel()[:, None] * up_cam[None, :]+    dirs_c /= np.linalg.norm(dirs_c, axis=1, keepdims=True)++    robot_tris, _ = scene.get_world_tris([p["name"] for p in scene.parts], poses_stand)+    hits_cam = raycast_triangles_batch(+        np.repeat(cam_origin[None, :], len(dirs_c), axis=0),+        dirs_c,+        robot_tris,+        t_min_mm=0.2,+        t_max_mm=1000.0,+    )+    cam_occ_pct = float(np.mean(np.isfinite(hits_cam)) * 100.0)++    return {+        "provenance": "simulated",+        "rev_a_has_onboard_camera": False,+        "false_onboard_camera_claims_found": len(onboard_claims),+        "all_camera_mentions_audited": mentions,+        "verdict_doc_audit": "PASS" if len(onboard_claims) == 0 else "FAIL",+        "non_invasive_rev_b_proposal": {+            "sensor_module": "8.5 x 8.5 x 5.2 mm IMX219 (8 MP, 62.2 x 48.8 deg FoV) or OV5647 MIPI CSI-2 2-lane camera",+            "electrical_interface": "Direct 15/22-pin 0.5 mm pitch ultra-thin shielded FPC or micro-coax to Radxa Zero 3W onboard MIPI CSI-2 header (zero Spine Rev A PCB changes needed)",+            "proposed_aperture_xyz_mm": cam_origin.tolist(),+            "optical_pitch_deg": -10.0,+            "raycast_beak_occlusion_pct": round(cam_occ_pct, 2),+            "clearance_requirements": {+                "lens_barrel_keepout_mm": "8.5 mm dia clear aperture centered at (X=52.5, Y=0.0, Z=280.2) mm, 4.5 mm above beak_upper bill_knob (Z_max = 275.7 mm)",+                "module_pocket_mm": "10.0 x 10.0 x 6.5 mm dorsal brow hood integrated into head_shell.stl (+3.4 g mass)",+                "fpc_cable_routing_mm": "12.0 x 2.5 mm flat slot along neck_s_curve_lower dorsal spine with >= 6.0 mm dynamic bend radius across neck_pitch/head_pitch",+            },+        },+    }+++# ==============================================================================+# 5. DIAGNOSTIC 4-PANEL FIGURE (docs/analysis/electronics_fov_rom_clearance.png)+# ==============================================================================+def render_diagnostic_figure(+    scene: ArticulatedCadScene,+    fov_res: Dict[str, Any],+    rom_res: Dict[str, Any],+    svc_res: Dict[str, Any],+) -> Path:+    plt.rcParams.update(+        {+            "figure.facecolor": BG_HEX,+            "axes.facecolor": PANEL_HEX,+            "axes.edgecolor": GRID_HEX,+            "axes.labelcolor": TEXT_HEX,+            "xtick.color": MUTED_HEX,+            "ytick.color": MUTED_HEX,+            "text.color": TEXT_HEX,+            "grid.color": GRID_HEX,+            "font.size": 9.5,+        }+    )++    fig = plt.figure(figsize=(19.2, 11.2), dpi=110)+    fig.suptitle(+        "Microgoose Rev A Electronics, Optical/RF FoV, Full-RoM Self-Collision & Serviceability Clearance Audit",+        fontsize=14.5,+        fontweight="bold",+        color=TEXT_HEX,+        y=0.974,+    )+    gs = gridspec.GridSpec(+        2,+        2,+        figure=fig,+        width_ratios=[0.90, 1.10],+        hspace=0.31,+        wspace=0.46,+        left=0.050,+        right=0.978,+        top=0.91,+        bottom=0.07,+    )++    # Panel 1: VL53L5CX 8x8 Multizone ToF Occlusion Map (45 x 45 deg FoV from Window Exit)+    ax1 = fig.add_subplot(gs[0, 0])+    z_grid = np.asarray(fov_res["vl53l5cx_tof_8x8"]["zone_occlusion_grid_8x8_window_exit"], dtype=np.float64) * 100.0+    im = ax1.imshow(+        z_grid,+        origin="lower",+        extent=[-22.5, 22.5, -22.5, 22.5],+        cmap="magma",+        vmin=0.0,+        vmax=100.0,+        aspect="equal",+    )+    for r in range(8):+        for c in range(8):+            val = z_grid[r, c]+            cx = -22.5 + (c + 0.5) * (45.0 / 8.0)+            cy = -22.5 + (r + 0.5) * (45.0 / 8.0)+            ax1.text(+                cx,+                cy,+                f"{val:.0f}%",+                ha="center",+                va="center",+                fontsize=7.5,+                fontweight="bold",+                color="#0d1317" if val > 55 else TEXT_HEX,+            )+    cbar = fig.colorbar(im, ax=ax1, fraction=0.046, pad=0.03)+    cbar.set_label("Ray Occlusion (%)", color=TEXT_HEX)+    tof_meta = fov_res["vl53l5cx_tof_8x8"]+    ax1.set_title(+        f"1. VL53L5CX 8x8 ToF FoV Ray-Cast (FAIL: {tof_meta['standing_window_exit_obstructed_zones_of_64']}/64 Zones Blocked by Beak)",+        fontweight="bold",+        color=RED_HEX,+    )+    ax1.set_xlabel("Horizontal Azimuth Angle (deg, +Left / -Right)")+    ax1.set_ylabel("Vertical Elevation Angle (deg, +Up / -Down)")++    # Panel 2: Tightest Cross-Body Clearances & Penetrations Across 800+ RoM & Sim Poses+    ax2 = fig.add_subplot(gs[0, 1])+    worst_bug = rom_res["worst_colliding_pairs"][:5]+    worst_non_bug = rom_res["non_contralateral_colliding_pairs"][:4]+    elec_top = rom_res["electronics_to_moving_links_tightest_pairs"][:4]++    bars_data = []+    seen_keys: Set[Tuple[str, str]] = set()+    for grp, tag in [(worst_bug, "[XZ Bug] "), (worst_non_bug, "[RoM] "), (elec_top, "[Elec] ")]:+        for item in grp:+            key = (item["part_a"], item["part_b"])+            if key in seen_keys:+                continue+            seen_keys.add(key)+            lbl = f"{tag}{item['part_a'][:15]} vs {item['part_b'][:15]}"+            bars_data.append((lbl, float(item["min_surface_dist_full_rom_mm"]), bool(item["collision_in_full_rom"])))+            if len(bars_data) >= 11:+                break+        if len(bars_data) >= 11:+            break++    bars_data = bars_data[::-1]+    y_pos = np.arange(len(bars_data))+    vals = [b[1] for b in bars_data]+    cols = [RED_HEX if b[2] else GREEN_HEX for b in bars_data]+    ax2.barh(y_pos, vals, color=cols, edgecolor=GRID_HEX, height=0.66)+    ax2.axvline(0.0, color=TEXT_HEX, lw=1.4, ls="-")+    ax2.axvline(1.0, color=TEAL_HEX, lw=1.1, ls="--", label="1.0 mm Target Clearance")+    ax2.set_yticks(y_pos)+    ax2.set_yticklabels([b[0] for b in bars_data], fontsize=8.0, family="monospace")+    ax2.set_xlabel("Signed Minimum Clearance (< 0 = Mesh Penetration, mm)")+    ax2.set_title(+        f"2. All-Pairs CAD RoM Sweep ({rom_res['total_poses_evaluated']} Poses, {rom_res['total_non_skipped_mesh_pairs_checked']} Pairs)",+        fontweight="bold",+        color=ORANGE_HEX,+    )+    ax2.grid(True, axis="x", alpha=0.45)+    ax2.legend(loc="lower right", fontsize=8.5, facecolor=BG_HEX)++    # Panel 3: Sagittal Torso Cross-Section Showing J3 Headroom (6.35 mm) & NP-F550 Tail Collision (6.75 mm)+    ax3 = fig.add_subplot(gs[1, 0])+    rects = [+        # (x0, z0, w, h, color, label)+        (-35.0, 148.0, 70.0, 1.6, "#10b981", "Spine Rev A PCB (Z=148.0..149.6)"),+        (-34.5, 160.2, 65.0, 4.8, "#3b82f6", "Radxa Zero 3W (Z=160.2..165.0)"),+        (23.9, 149.6, 4.25, 4.25, "#f59e0b", "J3 JST-GH Header (Z_top=153.85)"),+        (-37.3, 122.25, 70.6, 20.5, "#6366f1", "NP-F550 Battery (Z=122.25..142.75)"),+        (-40.5, 118.2, 77.0, 3.2, "#475569", "PETG-CF Battery Sled Floor"),+        (-40.5, 121.4, 2.4, 14.6, "#ef4444", "Rigid Sled Rear Latch (Z=136.0)"),+        (-66.0, 136.0, 21.0, 32.0, "#cbd5e1", "Torso Tail Fairing (Z_bot=136.0)"),+        (-38.0, 171.8, 52.0, 3.4, "#94a3b8", "Dorsal Hatch (Z=171.8..175.2)"),+    ]+    for rx, rz, rw, rh, rc, rlbl in rects:+        ax3.add_patch(mpatches.Rectangle((rx, rz), rw, rh, facecolor=rc, alpha=0.72, edgecolor=TEXT_HEX, lw=1.0, label=rlbl))++    # Annotate J3 tight 6.35 mm headroom under Radxa & battery -X collision+    ax3.annotate(+        "J3 Gap = 6.35 mm\n(< 7.5 mm unmate stroke!)",+        xy=(26.0, 157.0),+        xytext=(34.0, 154.0),+        color=RED_HEX,+        fontsize=8.2,+        fontweight="bold",+        arrowprops=dict(arrowstyle="->", color=RED_HEX, lw=1.4),+    )+    ax3.annotate(+        "-X Battery Slide Blocked:\n6.75 mm Z overlap @ X=-45",+        xy=(-44.5, 139.4),+        xytext=(-68.0, 119.5),+        color=RED_HEX,+        fontsize=8.2,+        fontweight="bold",+        arrowprops=dict(arrowstyle="->", color=RED_HEX, lw=1.4),+    )+    ax3.set_xlim(-72.0, 62.0)+    ax3.set_ylim(114.0, 182.0)+    ax3.set_xlabel("Torso Sagittal X Coordinate (mm, +Forward / -Rear)")+    ax3.set_ylabel("World Z Height (mm)")+    ax3.set_title("3. Sagittal Serviceability Cross-Section: J3 Headroom & Battery Sled Path", fontweight="bold", color=RED_HEX)+    ax3.grid(True, alpha=0.4)+    ax3.legend(loc="upper left", fontsize=7.3, ncol=2, facecolor=BG_HEX, framealpha=0.88)++    # Panel 4: Cable Bend-Radius Ratios, D1/D2 Optical Visibility & Radxa RF Keepout Summary+    ax4 = fig.add_subplot(gs[1, 1])+    c_bundles = svc_res["cable_bend_and_pinch_audit"]["bundles"]+    b_names = [b["bundle_id"] for b in c_bundles]+    b_ratios = [b["bend_radius_to_od_ratio"] for b in c_bundles]+    b_targets = [b["required_mult_od"] for b in c_bundles]+    b_cols = [GREEN_HEX if b["verdict"] == "PASS" else RED_HEX for b in c_bundles]++    x_idx = np.arange(len(b_names))+    ax4.bar(x_idx - 0.17, b_ratios, width=0.34, color=b_cols, label="Actual Min Bend / OD")+    ax4.bar(x_idx + 0.17, b_targets, width=0.34, color="#334155", edgecolor=TEAL_HEX, lw=1.2, label="Required Min Bend / OD")+    ax4.set_xticks(x_idx)+    ax4.set_xticklabels([n.replace("_", "\n") for n in b_names], fontsize=8.0)+    ax4.set_ylabel("Bend Radius Multiple (x Wire OD)")+    ax4.set_ylim(0.0, 7.2)+    ax4.set_title("4. Cable Bend Radius vs Limit + Optical LED / RF Keepout Summary", fontweight="bold", color=TEAL_HEX)+    ax4.grid(True, axis="y", alpha=0.45)+    ax4.legend(loc="upper right", fontsize=8.2, facecolor=BG_HEX)++    d1_meta = fov_res["spine_optical_leds"]["D1_5V_OK"]+    d2_meta = fov_res["spine_optical_leds"]["D2_STATUS_RGB"]+    rf_meta = fov_res["radxa_wifi_ble_rf"]+    box_txt = (+        f"D1 (5V_OK):     {d1_meta['unobstructed_cone_pct']:5.1f}% cone open, zenith={'OPEN' if d1_meta['zenith_line_of_sight_open'] else str(d1_meta['zenith_clear_mm'])+'mm'} -> {d1_meta['verdict']}\n"+        f"D2 (RGB):       {d2_meta['unobstructed_cone_pct']:5.1f}% cone open, zenith={'OPEN' if d2_meta['zenith_line_of_sight_open'] else str(d2_meta['zenith_clear_mm'])+'mm'} -> {d2_meta['verdict']}\n"+        f"Radxa Wi-Fi/BT: {rf_meta['upper_hemisphere_conductive_unobstructed_pct']:5.1f}% RF sky, {rf_meta['nearest_conductive_clearance_mm']:.2f} mm to {rf_meta['nearest_conductive_part']} -> {rf_meta['verdict']}"+    )+    ax4.text(+        0.02,+        0.96,+        box_txt,+        transform=ax4.transAxes,+        va="top",+        ha="left",+        fontsize=8.0,+        family="monospace",+        color=TEXT_HEX,+        bbox=dict(boxstyle="round,pad=0.45", facecolor="#10181e", edgecolor=GRID_HEX),+    )++    OUT_PNG_PATH.parent.mkdir(parents=True, exist_ok=True)+    fig.savefig(OUT_PNG_PATH, dpi=110)+    plt.close(fig)+    return OUT_PNG_PATH+++def main() -> None:+    print("[1/5] Loading articulated MJCF kinematic tree + all 42 CAD STL assemblies ...")+    scene = ArticulatedCadScene()+    print(f"  Loaded {len(scene.parts)} CAD mesh assemblies across {len(scene.joint_names)} joints.")++    print("[2/5] Running VL53L5CX 8x8 ToF, Spine LEDs (D1/D2), and Radxa 2.4/5 GHz RF ray-casts ...")+    fov_res = audit_sensor_and_rf_fov(scene)++    print("[3/5] Running full-RoM + 6-scenario dual-engine all-pairs CAD mesh self-collision sweep ...")+    rom_res = audit_full_rom_self_collisions(scene)++    print("[4/5] Running cable bend/pinch, J1..J5 + 15 servo mating clearance, and NP-F550 extraction checks ...")+    svc_res = audit_cables_connectors_and_battery_sled(scene)++    print("[5/5] Auditing camera documentation & ray-casting non-invasive Rev B MIPI CSI-2 brow proposal ...")+    cam_res = audit_camera_docs_and_propose_rev_b(scene)++    fig_path = render_diagnostic_figure(scene, fov_res, rom_res, svc_res)++    summary_table = [+        {+            "check_id": "sensor_fov_vl53l5cx",+            "item": "VL53L5CX 8x8 ToF (45x45 deg / 65 deg diag FoV) across beak_pitch [0..38 deg] & 4-DoF head/neck",+            "verdict": fov_res["vl53l5cx_tof_8x8"]["verdict"],+            "metric": (+                f"{fov_res['vl53l5cx_tof_8x8']['standing_window_exit_obstructed_zones_of_64']}/64 zones "+                f"({fov_res['vl53l5cx_tof_8x8']['standing_window_exit_obstructed_ray_pct']:.1f}% rays) blocked from window exit "+                f"by beak_upper knob/ridge at {fov_res['vl53l5cx_tof_8x8']['standing_window_exit_nearest_hit_mm']} mm "+                f"({fov_res['vl53l5cx_tof_8x8']['standing_die_obstructed_zones_of_64']}/64 zones from recessed die) [simulated]"+            ),+        },+        {+            "check_id": "optical_leds_d1_d2",+            "item": "Spine status LEDs D1 (5V_OK) & D2 (STATUS_RGB) 120 deg optical visibility",+            "verdict": (+                "PASS"+                if fov_res["spine_optical_leds"]["D1_5V_OK"]["verdict"] == "PASS"+                and fov_res["spine_optical_leds"]["D2_STATUS_RGB"]["verdict"] == "PASS"+                else "FAIL"+            ),+            "metric": (+                f"D1: {fov_res['spine_optical_leds']['D1_5V_OK']['unobstructed_cone_pct']:.1f}% cone open "+                f"({fov_res['spine_optical_leds']['D1_5V_OK']['verdict']}); "+                f"D2: {fov_res['spine_optical_leds']['D2_STATUS_RGB']['unobstructed_cone_pct']:.1f}% cone open, "+                f"zenith={fov_res['spine_optical_leds']['D2_STATUS_RGB']['zenith_clear_mm']} mm under mezzanine crossbar "+                f"({fov_res['spine_optical_leds']['D2_STATUS_RGB']['verdict']}) [simulated]"+            ),+        },+        {+            "check_id": "rf_antenna_radxa",+            "item": "Radxa Zero 3W 2.4/5 GHz Wi-Fi 6 & BLE 5.4 antenna keepout clearance",+            "verdict": fov_res["radxa_wifi_ble_rf"]["verdict"],+            "metric": (+                f"{fov_res['radxa_wifi_ble_rf']['nearest_conductive_clearance_mm']:.2f} mm to "+                f"{fov_res['radxa_wifi_ble_rf']['nearest_conductive_part']} (vs 10.0 mm 5 GHz guide), "+                f"{fov_res['radxa_wifi_ble_rf']['upper_hemisphere_conductive_unobstructed_pct']:.1f}% upper sky clear [simulated]"+            ),+        },+        {+            "check_id": "rom_all_pairs_cad_meshes",+            "item": "Full-RoM & 6-scenario gait/push/slope/fall/get-up all-pairs CAD mesh self-collision",+            "verdict": rom_res["verdict_full_rom_raw_cad"],+            "metric": (+                f"{rom_res['colliding_pairs_full_rom_total']} colliding pairs across {rom_res['total_non_skipped_mesh_pairs_checked']} pairs "+                f"({rom_res['colliding_pairs_sim_trajectories_total']} in sim gaits: {rom_res['colliding_pairs_from_contralateral_xz_workplane_bug']} "+                f"from left/right thigh/shank Workplane('XZ') -Y sign bug + {rom_res['colliding_pairs_other_full_rom']} extreme RoM stops); "+                f"electronics PCBs/battery vs moving links: {rom_res['verdict_electronics_pcbs_and_battery_vs_moving_links']} [simulated]"+            ),+        },+        {+            "check_id": "cable_bend_and_pinch",+            "item": "6-bundle (22-conductor) dynamic/static bend radius & joint pinch clearance",+            "verdict": svc_res["cable_bend_and_pinch_audit"]["verdict"],+            "metric": (+                f"{svc_res['cable_bend_and_pinch_audit']['passing_bundles_of_6']}/6 bundles pass 5.0x dynamic / 3.5x static OD target; "+                f"failing: {', '.join(svc_res['cable_bend_and_pinch_audit']['failing_bundles'])} [calculated]"+            ),+        },+        {+            "check_id": "connector_mating_j1_j5_servos",+            "item": "Connector mating & tool/finger clearance (J1..J5 + 15 XL330 servo ports)",+            "verdict": svc_res["connector_mating_clearance_audit"]["verdict"],+            "metric": (+                f"J1..J5 tweezers in-situ: {svc_res['connector_mating_clearance_audit']['j1_to_j5_in_situ_tweezers_pass_count']}/5 "+                f"(J3 blocked at 6.35 mm under Radxa < 7.5 mm stroke; 0/5 finger pinch); "+                f"XL330 ports: {svc_res['connector_mating_clearance_audit']['xl330_ports_pass_count_of_15']}/15 pass [simulated]"+            ),+        },+        {+            "check_id": "battery_sled_removal",+            "item": "NP-F550 2S battery sled removal path",+            "verdict": svc_res["battery_sled_removal_audit"]["verdict"],+            "metric": (+                "0/4 tool-free extraction directions clear: -X slide blocked by rigid latch (Z=136 mm) and "+                "torso_shell tail fairing (6.75 mm vertical overlap at X=-45.0 mm) [simulated]"+            ),+        },+        {+            "check_id": "camera_doc_audit_and_proposal",+            "item": "Onboard camera documentation audit & non-invasive Rev B MIPI CSI-2 proposal",+            "verdict": cam_res["verdict_doc_audit"],+            "metric": (+                f"{cam_res['false_onboard_camera_claims_found']} false onboard camera claims; "+                f"Rev B IMX219 brow pod at (52.5, 0.0, 280.2) mm (-10 deg pitch) achieves "+                f"{cam_res['non_invasive_rev_b_proposal']['raycast_beak_occlusion_pct']:.1f}% beak occlusion [simulated]"+            ),+        },+    ]++    report = {+        "schema": "microgoose-electronics-and-rom-clearance-audit/v1",+        "design_modified": False,+        "summary_verdicts": summary_table,+        "sensor_and_rf_fov": fov_res,+        "full_rom_and_trajectory_self_collision": rom_res,+        "cables_connectors_and_battery_serviceability": svc_res,+        "camera_audit_and_rev_b_proposal": cam_res,+        "diagnostic_figure": str(fig_path.relative_to(ROOT_DIR)),+    }+    OUT_JSON_PATH.write_text(json.dumps(report, indent=2), encoding="utf-8")++    print("\n=== CLEARANCE AUDIT SUMMARY ===")+    for row in summary_table:+        print(f"  [{row['verdict']:8s}] {row['check_id']:30s} -> {row['metric']}")+    print(f"\nWrote {OUT_JSON_PATH}")+    print(f"Wrote {fig_path}")+++if __name__ == "__main__":+    main()
validation/electronics_clearance_report.jsonadded+2228
@@ -0,0 +1,2228 @@+{+  "schema": "microgoose-electronics-and-rom-clearance-audit/v1",+  "design_modified": false,+  "summary_verdicts": [+    {+      "check_id": "sensor_fov_vl53l5cx",+      "item": "VL53L5CX 8x8 ToF (45x45 deg / 65 deg diag FoV) across beak_pitch [0..38 deg] & 4-DoF head/neck",+      "verdict": "FAIL",+      "metric": "64/64 zones (100.0% rays) blocked from window exit by beak_upper knob/ridge at 0.21 mm (64/64 zones from recessed die) [simulated]"+    },+    {+      "check_id": "optical_leds_d1_d2",+      "item": "Spine status LEDs D1 (5V_OK) & D2 (STATUS_RGB) 120 deg optical visibility",+      "verdict": "FAIL",+      "metric": "D1: 40.8% cone open (PASS); D2: 23.0% cone open, zenith=6.5 mm under mezzanine crossbar (FAIL) [simulated]"+    },+    {+      "check_id": "rf_antenna_radxa",+      "item": "Radxa Zero 3W 2.4/5 GHz Wi-Fi 6 & BLE 5.4 antenna keepout clearance",+      "verdict": "FAIL",+      "metric": "1.79 mm to m25_radxa_screws (vs 10.0 mm 5 GHz guide), 40.6% upper sky clear [simulated]"+    },+    {+      "check_id": "rom_all_pairs_cad_meshes",+      "item": "Full-RoM & 6-scenario gait/push/slope/fall/get-up all-pairs CAD mesh self-collision",+      "verdict": "FAIL",+      "metric": "95 colliding pairs across 806 pairs (67 in sim gaits: 28 from left/right thigh/shank Workplane('XZ') -Y sign bug + 67 extreme RoM stops); electronics PCBs/battery vs moving links: FAIL [simulated]"+    },+    {+      "check_id": "cable_bend_and_pinch",+      "item": "6-bundle (22-conductor) dynamic/static bend radius & joint pinch clearance",+      "verdict": "FAIL",+      "metric": "0/6 bundles pass 5.0x dynamic / 3.5x static OD target; failing: leg_left_dxl, leg_right_dxl, neck_head_dxl, radxa_host_link, head_sensor_i2c, battery_vbat_feed [calculated]"+    },+    {+      "check_id": "connector_mating_j1_j5_servos",+      "item": "Connector mating & tool/finger clearance (J1..J5 + 15 XL330 servo ports)",+      "verdict": "FAIL",+      "metric": "J1..J5 tweezers in-situ: 0/5 (J3 blocked at 6.35 mm under Radxa < 7.5 mm stroke; 0/5 finger pinch); XL330 ports: 14/15 pass [simulated]"+    },+    {+      "check_id": "battery_sled_removal",+      "item": "NP-F550 2S battery sled removal path",+      "verdict": "FAIL",+      "metric": "0/4 tool-free extraction directions clear: -X slide blocked by rigid latch (Z=136 mm) and torso_shell tail fairing (6.75 mm vertical overlap at X=-45.0 mm) [simulated]"+    },+    {+      "check_id": "camera_doc_audit_and_proposal",+      "item": "Onboard camera documentation audit & non-invasive Rev B MIPI CSI-2 proposal",+      "verdict": "PASS",+      "metric": "0 false onboard camera claims; Rev B IMX219 brow pod at (52.5, 0.0, 280.2) mm (-10 deg pitch) achieves 33.8% beak occlusion [simulated]"+    }+  ],+  "sensor_and_rf_fov": {+    "vl53l5cx_tof_8x8": {+      "provenance": "simulated",+      "fov_spec_datasheet": "45.0 x 45.0 deg square (65.0 deg diagonal, 8x8 = 64 zones)",+      "standing_from_die_aperture_xyz_mm": [+        43.8,+        0.0,+        269.8+      ],+      "standing_from_window_exit_xyz_mm": [+        49.6,+        0.0,+        271.5+      ],+      "standing_die_obstructed_zones_of_64": 64,+      "standing_die_obstructed_ray_pct": 100.0,+      "standing_die_nearest_hit_mm": 4.81,+      "standing_die_occluder_ray_counts_of_1600": {+        "head_shell": 160,+        "beak_upper": 1440+      },+      "standing_window_exit_obstructed_zones_of_64": 64,+      "standing_window_exit_obstructed_ray_pct": 100.0,+      "standing_window_exit_nearest_hit_mm": 0.21,+      "standing_window_exit_occluder_ray_counts_of_1600": {+        "beak_upper": 1600+      },+      "zone_occlusion_grid_8x8_window_exit": [+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ]+      ],+      "zone_occlusion_grid_8x8_from_die": [+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ],+        [+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0,+          1.0+        ]+      ],+      "beak_pitch_sweep_0_to_38_deg": [+        {+          "beak_pitch_deg": 0.0,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 4.8,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 9.5,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 14.2,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 19.0,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 23.8,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 28.5,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 33.2,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        },+        {+          "beak_pitch_deg": 38.0,+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "die_aperture_obstructed_zones_of_64": 64,+          "die_aperture_obstructed_ray_pct": 100.0,+          "beak_lower_hits": 0+        }+      ],+      "head_neck_4dof_sweep": [+        {+          "pose": "standing_neutral",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "look_down_moderate (+30/+30 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "look_down_max (+65/+65 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "look_up_max (-55/-65 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "yaw_left_max (+80 deg) + down (+35 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "yaw_right_max (-80 deg) + down (+35 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        },+        {+          "pose": "roll_max (+40 deg) + yaw (+45 deg)",+          "window_exit_obstructed_zones_of_64": 64,+          "window_exit_obstructed_ray_pct": 100.0,+          "torso_or_neck_ray_hits_of_1600": 0,+          "occluders": {+            "beak_upper": 1600+          }+        }+      ],+      "root_cause": "beak_upper sits 0.2 mm forward of the forehead optical window (X = 49.8..85.0 mm); its decorative goose basal bill_knob (Z = 270.2..275.7 mm, Y = -6..+6 mm) and upper bill ridge (Z = 264.9..270.2 mm) sit directly across the center and lower rows of the 45x45 deg cone, while the 6.5 mm deep 8.4x7.0 mm forehead tunnel vignettes peripheral rays from the recessed die.",+      "verdict": "FAIL"+    },+    "spine_optical_leds": {+      "D1_5V_OK": {+        "provenance": "simulated",+        "description": "IN-S63BTG green power-good LED (120 deg viewing cone)",+        "robot_xyz_mm": [+          17.5,+          -26.5,+          150.5+        ],+        "cone_full_angle_deg": 120.0,+        "unobstructed_cone_pct": 40.75,+        "zenith_clear_mm": null,+        "zenith_line_of_sight_open": true,+        "verdict": "PASS"+      },+      "D2_STATUS_RGB": {+        "provenance": "simulated",+        "description": "WS2812B-2020 addressable status RGB LED (120 deg viewing cone)",+        "robot_xyz_mm": [+          9.0,+          -26.5,+          150.5+        ],+        "cone_full_angle_deg": 120.0,+        "unobstructed_cone_pct": 23.0,+        "zenith_clear_mm": 6.5,+        "zenith_line_of_sight_open": false,+        "verdict": "FAIL"+      }+    },+    "radxa_wifi_ble_rf": {+      "provenance": "simulated",+      "antenna_region_xyz_mm": [+        25.5,+        0.0,+        163.8+      ],+      "upper_hemisphere_conductive_unobstructed_pct": 40.6,+      "nearest_conductive_part": "m25_radxa_screws",+      "nearest_conductive_clearance_mm": 1.79,+      "recommended_5ghz_nearfield_keepout_mm": 10.0,+      "top_5_nearest_conductive_parts_mm": {+        "m25_radxa_screws": 1.79,+        "dxl_11_neck_pitch": 2.21,+        "radxa_mezzanine_carrier": 4.8,+        "torso_core_cradle": 7.59,+        "bundle_radxa_uart_5v": 8.01+      },+      "verdict": "FAIL"+    }+  },+  "full_rom_and_trajectory_self_collision": {+    "provenance": "simulated",+    "total_poses_evaluated": 806,+    "total_non_skipped_mesh_pairs_checked": 806,+    "contype_conaffinity_override": "ALL 42 CAD assemblies tested pairwise across distinct bodies + electronics",+    "colliding_pairs_full_rom_total": 95,+    "colliding_pairs_sim_trajectories_total": 67,+    "colliding_pairs_from_contralateral_xz_workplane_bug": 28,+    "colliding_pairs_other_full_rom": 67,+    "colliding_pairs_other_sim_trajectories": 40,+    "contralateral_cad_bug_diagnosis": {+      "affected_stls": [+        "mechanical/stl/left_thigh_frame.stl",+        "mechanical/stl/right_thigh_frame.stl",+        "mechanical/stl/left_shank_frame.stl",+        "mechanical/stl/right_shank_frame.stl"+      ],+      "root_cause": "In mechanical/build_microgoose_cad.py lines 897-949, thigh_plate_a/b and shank_plate_a/b use cq.Workplane('XZ').workplane(offset=yc +/- 17.6). Because OCCT/CadQuery Workplane('XZ') has normal -Y (X x Z = -Y), left-leg (yc = +34 mm) side plates were extruded at Y = -54.4..-13.6 mm around the RIGHT leg (giving each leg STL a 108.8 mm lateral span), which aligned with 0.8 mm gap in the single symmetric standing pose (0 static collisions) but sweeps across the opposite leg once |q_L - q_R| >= 2.8 deg.",+      "rev_b_fix": "Negate Workplane('XZ') offset to -(yc +/- 17.6) so each clevis plate stays on its own leg."+    },+    "worst_colliding_pairs": [+      {+        "part_a": "torso_shell_right",+        "part_b": "left_thigh_frame",+        "body_a": "torso",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -41.41,+        "min_surface_dist_sim_trajs_mm": -41.41,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 26,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t6.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "right_thigh_frame",+        "body_a": "torso",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -40.466,+        "min_surface_dist_sim_trajs_mm": -40.466,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 34,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t6.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t6.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_dorsal_hatch",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -33.198,+        "min_surface_dist_sim_trajs_mm": 26.773,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 516,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "microgoose_spine_revA_pcb",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -31.616,+        "min_surface_dist_sim_trajs_mm": 45.334,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 1640,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_dorsal_hatch",+        "part_b": "dxl_13_head_yaw",+        "body_a": "torso",+        "body_b": "head_pitch_link",+        "min_surface_dist_full_rom_mm": -30.266,+        "min_surface_dist_sim_trajs_mm": 37.497,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 394,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -27.76,+        "min_surface_dist_sim_trajs_mm": 28.99,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 272,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -26.739,+        "min_surface_dist_sim_trajs_mm": 29.026,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 272,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "dxl_14_head_roll",+        "body_a": "head_roll_link",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -22.214,+        "min_surface_dist_sim_trajs_mm": 0.384,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 266,+        "worst_rom_pose": "rom_head_roll_+26.7deg",+        "worst_sim_pose": "sim_push_recovery_mujoco_t9.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_core_cradle",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -22.048,+        "min_surface_dist_sim_trajs_mm": 39.359,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 188,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "radxa_mezzanine_carrier",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -19.401,+        "min_surface_dist_sim_trajs_mm": 37.829,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 262,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_thigh_frame",+        "part_b": "right_shank_frame",+        "body_a": "left_thigh_link",+        "body_b": "right_shank_link",+        "min_surface_dist_full_rom_mm": -19.219,+        "min_surface_dist_sim_trajs_mm": -19.219,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 108,+        "worst_rom_pose": "sim_walk_turn_mujoco_t6.80s",+        "worst_sim_pose": "sim_walk_turn_mujoco_t6.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      },+      {+        "part_a": "right_shank_frame",+        "part_b": "dxl_03_left_hip_pitch",+        "body_a": "right_shank_link",+        "body_b": "left_hip_roll_link",+        "min_surface_dist_full_rom_mm": -18.99,+        "min_surface_dist_sim_trajs_mm": -18.99,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 52,+        "worst_rom_pose": "sim_push_recovery_mujoco_t7.80s",+        "worst_sim_pose": "sim_push_recovery_mujoco_t7.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      },+      {+        "part_a": "left_thigh_frame",+        "part_b": "dxl_08_right_hip_pitch",+        "body_a": "left_thigh_link",+        "body_b": "right_hip_roll_link",+        "min_surface_dist_full_rom_mm": -18.853,+        "min_surface_dist_sim_trajs_mm": -18.853,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 240,+        "worst_rom_pose": "sim_slope_8deg_mujoco_t4.20s",+        "worst_sim_pose": "sim_slope_8deg_mujoco_t4.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      },+      {+        "part_a": "left_hip_roll_clevis",+        "part_b": "right_thigh_frame",+        "body_a": "left_hip_roll_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -18.794,+        "min_surface_dist_sim_trajs_mm": -18.794,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 112,+        "worst_rom_pose": "sim_slope_8deg_drake_t5.00s",+        "worst_sim_pose": "sim_slope_8deg_drake_t5.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "right_shank_frame",+        "body_a": "left_foot_link",+        "body_b": "right_shank_link",+        "min_surface_dist_full_rom_mm": -18.685,+        "min_surface_dist_sim_trajs_mm": -18.685,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 84,+        "worst_rom_pose": "sim_walk_forward_drake_t3.20s",+        "worst_sim_pose": "sim_walk_forward_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "radxa_zero_3w",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -18.657,+        "min_surface_dist_sim_trajs_mm": 32.568,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 292,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_thigh_frame",+        "part_b": "dxl_08_right_hip_pitch",+        "body_a": "right_thigh_link",+        "body_b": "right_hip_roll_link",+        "min_surface_dist_full_rom_mm": -18.605,+        "min_surface_dist_sim_trajs_mm": -18.605,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 144,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_shank_frame",+        "part_b": "dxl_02_left_hip_roll",+        "body_a": "right_shank_link",+        "body_b": "left_hip_yaw_link",+        "min_surface_dist_full_rom_mm": -18.522,+        "min_surface_dist_sim_trajs_mm": -18.522,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 20,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": true+      }+    ],+    "non_contralateral_colliding_pairs": [+      {+        "part_a": "torso_shell_right",+        "part_b": "left_thigh_frame",+        "body_a": "torso",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -41.41,+        "min_surface_dist_sim_trajs_mm": -41.41,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 26,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t6.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "right_thigh_frame",+        "body_a": "torso",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -40.466,+        "min_surface_dist_sim_trajs_mm": -40.466,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 34,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t6.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t6.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_dorsal_hatch",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -33.198,+        "min_surface_dist_sim_trajs_mm": 26.773,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 516,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "microgoose_spine_revA_pcb",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -31.616,+        "min_surface_dist_sim_trajs_mm": 45.334,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 1640,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_dorsal_hatch",+        "part_b": "dxl_13_head_yaw",+        "body_a": "torso",+        "body_b": "head_pitch_link",+        "min_surface_dist_full_rom_mm": -30.266,+        "min_surface_dist_sim_trajs_mm": 37.497,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 394,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -27.76,+        "min_surface_dist_sim_trajs_mm": 28.99,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 272,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "head_shell",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -26.739,+        "min_surface_dist_sim_trajs_mm": 29.026,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 272,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "dxl_14_head_roll",+        "body_a": "head_roll_link",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -22.214,+        "min_surface_dist_sim_trajs_mm": 0.384,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 266,+        "worst_rom_pose": "rom_head_roll_+26.7deg",+        "worst_sim_pose": "sim_push_recovery_mujoco_t9.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_core_cradle",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -22.048,+        "min_surface_dist_sim_trajs_mm": 39.359,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 188,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "radxa_mezzanine_carrier",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -19.401,+        "min_surface_dist_sim_trajs_mm": 37.829,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 262,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "radxa_zero_3w",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -18.657,+        "min_surface_dist_sim_trajs_mm": 32.568,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 292,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_thigh_frame",+        "part_b": "dxl_08_right_hip_pitch",+        "body_a": "right_thigh_link",+        "body_b": "right_hip_roll_link",+        "min_surface_dist_full_rom_mm": -18.605,+        "min_surface_dist_sim_trajs_mm": -18.605,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 144,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_dorsal_hatch",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -18.434,+        "min_surface_dist_sim_trajs_mm": 20.233,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 362,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "neck_s_curve_lower",+        "body_a": "torso",+        "body_b": "neck_pitch_link",+        "min_surface_dist_full_rom_mm": -18.259,+        "min_surface_dist_sim_trajs_mm": 3.268,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 220,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t1.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "neck_s_curve_lower",+        "body_a": "torso",+        "body_b": "neck_pitch_link",+        "min_surface_dist_full_rom_mm": -18.245,+        "min_surface_dist_sim_trajs_mm": 3.064,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 222,+        "worst_rom_pose": "rom_neck_pitch_+65.0deg",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t1.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "dxl_10_right_ankle_pitch",+        "body_a": "left_foot_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -18.179,+        "min_surface_dist_sim_trajs_mm": -18.179,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 354,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t2.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t2.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_foot_sole",+        "part_b": "dxl_08_right_hip_pitch",+        "body_a": "right_foot_link",+        "body_b": "right_hip_roll_link",+        "min_surface_dist_full_rom_mm": -17.783,+        "min_surface_dist_sim_trajs_mm": -17.783,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 120,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "right_foot_sole",+        "body_a": "torso",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -17.532,+        "min_surface_dist_sim_trajs_mm": -17.532,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 182,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t3.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t3.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_thigh_frame",+        "part_b": "dxl_03_left_hip_pitch",+        "body_a": "left_thigh_link",+        "body_b": "left_hip_roll_link",+        "min_surface_dist_full_rom_mm": -17.282,+        "min_surface_dist_sim_trajs_mm": -17.282,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 130,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_thigh_frame",+        "part_b": "dxl_02_left_hip_roll",+        "body_a": "left_thigh_link",+        "body_b": "left_hip_yaw_link",+        "min_surface_dist_full_rom_mm": -17.037,+        "min_surface_dist_sim_trajs_mm": -17.037,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 54,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t2.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t2.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "dxl_03_left_hip_pitch",+        "body_a": "left_foot_link",+        "body_b": "left_hip_roll_link",+        "min_surface_dist_full_rom_mm": -16.857,+        "min_surface_dist_sim_trajs_mm": -16.857,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 98,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_05_left_ankle_pitch",+        "part_b": "dxl_10_right_ankle_pitch",+        "body_a": "left_foot_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -15.967,+        "min_surface_dist_sim_trajs_mm": -15.967,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 172,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t6.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "microgoose_spine_revA_pcb",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -15.75,+        "min_surface_dist_sim_trajs_mm": 48.847,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 4262,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_05_left_ankle_pitch",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "left_foot_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -15.62,+        "min_surface_dist_sim_trajs_mm": -15.62,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 22,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t1.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t1.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_shank_frame",+        "part_b": "dxl_04_left_knee_pitch",+        "body_a": "left_shank_link",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -15.407,+        "min_surface_dist_sim_trajs_mm": -15.407,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 146,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t7.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t7.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "beak_lower",+        "body_a": "torso",+        "body_b": "beak_link",+        "min_surface_dist_full_rom_mm": -15.379,+        "min_surface_dist_sim_trajs_mm": 16.85,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 430,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_shank_frame",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "right_shank_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -15.181,+        "min_surface_dist_sim_trajs_mm": -15.181,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 140,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t7.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t7.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "right_foot_sole",+        "body_a": "left_foot_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -14.696,+        "min_surface_dist_sim_trajs_mm": -14.696,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 1864,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t6.80s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "neck_s_curve_lower",+        "part_b": "dxl_13_head_yaw",+        "body_a": "neck_pitch_link",+        "body_b": "head_pitch_link",+        "min_surface_dist_full_rom_mm": -14.638,+        "min_surface_dist_sim_trajs_mm": -14.638,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 200,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t7.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t7.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "right_foot_sole",+        "body_a": "torso",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -14.337,+        "min_surface_dist_sim_trajs_mm": -14.337,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 356,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_08_right_hip_pitch",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "right_hip_roll_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -14.176,+        "min_surface_dist_sim_trajs_mm": -14.176,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 30,+        "worst_rom_pose": "sim_walk_forward_mujoco_t5.40s",+        "worst_sim_pose": "sim_walk_forward_mujoco_t5.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "dxl_15_beak_pitch",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -14.041,+        "min_surface_dist_sim_trajs_mm": 22.505,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 174,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "dxl_15_beak_pitch",+        "body_a": "torso",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -14.041,+        "min_surface_dist_sim_trajs_mm": 22.457,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 172,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_left",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -13.726,+        "min_surface_dist_sim_trajs_mm": 24.703,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 86,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "dxl_14_head_roll",+        "body_a": "torso",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -13.726,+        "min_surface_dist_sim_trajs_mm": 24.523,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 94,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_shank_frame",+        "part_b": "dxl_10_right_ankle_pitch",+        "body_a": "right_shank_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -13.504,+        "min_surface_dist_sim_trajs_mm": -13.504,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 142,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t2.80s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t2.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_03_left_hip_pitch",+        "part_b": "dxl_04_left_knee_pitch",+        "body_a": "left_hip_roll_link",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -13.308,+        "min_surface_dist_sim_trajs_mm": -13.308,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 58,+        "worst_rom_pose": "sim_stand_drake_t4.20s",+        "worst_sim_pose": "sim_stand_drake_t4.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "left_foot_sole",+        "body_a": "torso",+        "body_b": "left_foot_link",+        "min_surface_dist_full_rom_mm": -13.205,+        "min_surface_dist_sim_trajs_mm": -13.205,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 96,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t8.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_shank_frame",+        "part_b": "dxl_08_right_hip_pitch",+        "body_a": "right_shank_link",+        "body_b": "right_hip_roll_link",+        "min_surface_dist_full_rom_mm": -13.133,+        "min_surface_dist_sim_trajs_mm": -13.133,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 66,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t8.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t8.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_04_left_knee_pitch",+        "part_b": "dxl_10_right_ankle_pitch",+        "body_a": "left_thigh_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -13.133,+        "min_surface_dist_sim_trajs_mm": -15.925,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 114,+        "worst_rom_pose": "combo_legs_adducted_inward",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_shell_right",+        "part_b": "beak_lower",+        "body_a": "torso",+        "body_b": "beak_link",+        "min_surface_dist_full_rom_mm": -12.739,+        "min_surface_dist_sim_trajs_mm": 16.951,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 426,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_shank_frame",+        "part_b": "dxl_05_left_ankle_pitch",+        "body_a": "left_shank_link",+        "body_b": "left_foot_link",+        "min_surface_dist_full_rom_mm": -12.614,+        "min_surface_dist_sim_trajs_mm": -12.614,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 76,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t6.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t6.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_shank_frame",+        "part_b": "dxl_03_left_hip_pitch",+        "body_a": "left_shank_link",+        "body_b": "left_hip_roll_link",+        "min_surface_dist_full_rom_mm": -12.267,+        "min_surface_dist_sim_trajs_mm": -12.267,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 64,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_04_left_knee_pitch",+        "part_b": "dxl_05_left_ankle_pitch",+        "body_a": "left_thigh_link",+        "body_b": "left_foot_link",+        "min_surface_dist_full_rom_mm": -12.211,+        "min_surface_dist_sim_trajs_mm": -12.211,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 36,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_07_right_hip_roll",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "right_hip_yaw_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -11.633,+        "min_surface_dist_sim_trajs_mm": -11.633,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 66,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t2.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_foot_sole",+        "part_b": "np_f550_battery",+        "body_a": "right_foot_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -11.353,+        "min_surface_dist_sim_trajs_mm": -11.353,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 192,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "left_foot_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -11.291,+        "min_surface_dist_sim_trajs_mm": -10.175,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 64,+        "worst_rom_pose": "rom_left_hip_roll_-29.2deg",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t7.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_thigh_frame",+        "part_b": "dxl_07_right_hip_roll",+        "body_a": "right_thigh_link",+        "body_b": "right_hip_yaw_link",+        "min_surface_dist_full_rom_mm": -10.836,+        "min_surface_dist_sim_trajs_mm": -10.836,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 40,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t7.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t7.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "bundle_leg_right_dxl",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -10.518,+        "min_surface_dist_sim_trajs_mm": 47.819,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 1096,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "bundle_leg_left_dxl",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -10.512,+        "min_surface_dist_sim_trajs_mm": 47.769,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 1066,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_02_left_hip_roll",+        "part_b": "dxl_04_left_knee_pitch",+        "body_a": "left_hip_yaw_link",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -10.154,+        "min_surface_dist_sim_trajs_mm": -10.154,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 68,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_drake_t7.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t7.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "battery_sled",+        "part_b": "right_foot_sole",+        "body_a": "torso",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -9.605,+        "min_surface_dist_sim_trajs_mm": -9.605,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 150,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t3.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t3.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_12_head_pitch",+        "part_b": "dxl_13_head_yaw",+        "body_a": "neck_pitch_link",+        "body_b": "head_pitch_link",+        "min_surface_dist_full_rom_mm": -9.473,+        "min_surface_dist_sim_trajs_mm": -9.473,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 150,+        "worst_rom_pose": "sim_slope_8deg_mujoco_t6.40s",+        "worst_sim_pose": "sim_slope_8deg_mujoco_t6.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_02_left_hip_roll",+        "part_b": "dxl_07_right_hip_roll",+        "body_a": "left_hip_yaw_link",+        "body_b": "right_hip_yaw_link",+        "min_surface_dist_full_rom_mm": -9.308,+        "min_surface_dist_sim_trajs_mm": 14.368,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 180,+        "worst_rom_pose": "combo_hips_toed_in_max",+        "worst_sim_pose": "sim_walk_turn_mujoco_t1.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_04_left_knee_pitch",+        "part_b": "dxl_09_right_knee_pitch",+        "body_a": "left_thigh_link",+        "body_b": "right_thigh_link",+        "min_surface_dist_full_rom_mm": -8.84,+        "min_surface_dist_sim_trajs_mm": -8.84,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 230,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t6.80s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t6.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_foot_sole",+        "part_b": "dxl_05_left_ankle_pitch",+        "body_a": "right_foot_link",+        "body_b": "left_foot_link",+        "min_surface_dist_full_rom_mm": -8.369,+        "min_surface_dist_sim_trajs_mm": -8.369,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 280,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t6.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t6.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "np_f550_battery",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -7.459,+        "min_surface_dist_sim_trajs_mm": 60.232,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 410,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "neck_s_curve_lower",+        "part_b": "beak_lower",+        "body_a": "neck_pitch_link",+        "body_b": "beak_link",+        "min_surface_dist_full_rom_mm": -7.291,+        "min_surface_dist_sim_trajs_mm": 9.752,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 28,+        "worst_rom_pose": "combo_head_yaw_roll_right_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "np_f550_battery",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -6.845,+        "min_surface_dist_sim_trajs_mm": 53.869,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 352,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_foot_sole",+        "part_b": "dxl_04_left_knee_pitch",+        "body_a": "right_foot_link",+        "body_b": "left_thigh_link",+        "min_surface_dist_full_rom_mm": -6.759,+        "min_surface_dist_sim_trajs_mm": -6.759,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 56,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t2.20s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_09_right_knee_pitch",+        "part_b": "dxl_10_right_ankle_pitch",+        "body_a": "right_thigh_link",+        "body_b": "right_foot_link",+        "min_surface_dist_full_rom_mm": -6.686,+        "min_surface_dist_sim_trajs_mm": -6.686,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 40,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t7.80s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t7.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "battery_sled",+        "part_b": "left_foot_sole",+        "body_a": "torso",+        "body_b": "left_foot_link",+        "min_surface_dist_full_rom_mm": -6.275,+        "min_surface_dist_sim_trajs_mm": -6.275,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 234,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t3.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t3.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "torso_core_cradle",+        "part_b": "neck_s_curve_lower",+        "body_a": "torso",+        "body_b": "neck_pitch_link",+        "min_surface_dist_full_rom_mm": -5.483,+        "min_surface_dist_sim_trajs_mm": -5.483,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 20,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t6.00s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t6.00s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "beak_lower",+        "part_b": "dxl_15_beak_pitch",+        "body_a": "beak_link",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": -5.006,+        "min_surface_dist_sim_trajs_mm": 0.918,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 138,+        "worst_rom_pose": "rom_beak_pitch_+19.0deg",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t8.80s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_13_head_yaw",+        "part_b": "dxl_14_head_roll",+        "body_a": "head_pitch_link",+        "body_b": "head_yaw_link",+        "min_surface_dist_full_rom_mm": -4.23,+        "min_surface_dist_sim_trajs_mm": -4.23,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 24,+        "worst_rom_pose": "sim_slope_8deg_mujoco_t2.40s",+        "worst_sim_pose": "sim_slope_8deg_mujoco_t2.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "m25_radxa_screws",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -0.683,+        "min_surface_dist_sim_trajs_mm": 33.889,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 232,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "dxl_13_head_yaw",+        "body_a": "head_roll_link",+        "body_b": "head_pitch_link",+        "min_surface_dist_full_rom_mm": -0.04,+        "min_surface_dist_sim_trajs_mm": -0.04,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 6,+        "worst_rom_pose": "sim_push_recovery_mujoco_t7.60s",+        "worst_sim_pose": "sim_push_recovery_mujoco_t7.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      }+    ],+    "electronics_to_moving_links_tightest_pairs": [+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "microgoose_spine_revA_pcb",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -31.616,+        "min_surface_dist_sim_trajs_mm": 45.334,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 1640,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "radxa_zero_3w",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -18.657,+        "min_surface_dist_sim_trajs_mm": 32.568,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 292,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "microgoose_spine_revA_pcb",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -15.75,+        "min_surface_dist_sim_trajs_mm": 48.847,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 4262,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "right_foot_sole",+        "part_b": "np_f550_battery",+        "body_a": "right_foot_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -11.353,+        "min_surface_dist_sim_trajs_mm": -11.353,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": true,+        "edge_tri_intersections": 192,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "np_f550_battery",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -7.459,+        "min_surface_dist_sim_trajs_mm": 60.232,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 410,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_14_head_roll",+        "part_b": "np_f550_battery",+        "body_a": "head_yaw_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": -6.845,+        "min_surface_dist_sim_trajs_mm": 53.869,+        "collision_in_full_rom": true,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 352,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t8.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "left_foot_sole",+        "part_b": "np_f550_battery",+        "body_a": "left_foot_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": 1.04,+        "min_surface_dist_sim_trajs_mm": 1.04,+        "collision_in_full_rom": false,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 0,+        "worst_rom_pose": "sim_fall_and_getup_budgeted_mujoco_t3.60s",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t3.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "dxl_13_head_yaw",+        "part_b": "head_tof_imu_carrier",+        "body_a": "head_pitch_link",+        "body_b": "head_roll_link",+        "min_surface_dist_full_rom_mm": 1.631,+        "min_surface_dist_sim_trajs_mm": 1.631,+        "collision_in_full_rom": false,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 0,+        "worst_rom_pose": "sim_stand_drake_t6.40s",+        "worst_sim_pose": "sim_stand_drake_t6.40s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "head_shell",+        "part_b": "radxa_zero_3w",+        "body_a": "head_roll_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": 2.127,+        "min_surface_dist_sim_trajs_mm": 41.051,+        "collision_in_full_rom": false,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 0,+        "worst_rom_pose": "combo_neck_arch_back_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_drake_t3.20s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      },+      {+        "part_a": "beak_lower",+        "part_b": "radxa_zero_3w",+        "body_a": "beak_link",+        "body_b": "torso",+        "min_surface_dist_full_rom_mm": 3.196,+        "min_surface_dist_sim_trajs_mm": 32.914,+        "collision_in_full_rom": false,+        "collision_in_sim_trajs": false,+        "edge_tri_intersections": 0,+        "worst_rom_pose": "combo_neck_tuck_down_max",+        "worst_sim_pose": "sim_fall_and_getup_budgeted_mujoco_t2.60s",+        "caused_by_xz_workplane_contralateral_plate_bug": false+      }+    ],+    "verdict_sim_trajectories_raw_cad": "FAIL",+    "verdict_full_rom_raw_cad": "FAIL",+    "verdict_electronics_pcbs_and_battery_vs_moving_links": "FAIL"+  },+  "cables_connectors_and_battery_serviceability": {+    "cable_bend_and_pinch_audit": {+      "provenance": "calculated",+      "bundles": [+        {+          "bundle_id": "leg_left_dxl",+          "provenance": "calculated",+          "dynamic_joint_crossing": true,+          "motion_regime": "hip_yaw/roll/pitch +/-75 deg",+          "conductor_count": 3,+          "wire_od_mm": 0.9,+          "routed_static_min_bend_radius_mm": 3.75,+          "worst_flexed_bend_radius_mm": 3.75,+          "bend_radius_to_od_ratio": 4.17,+          "required_min_bend_radius_mm": 4.5,+          "required_mult_od": 5.0,+          "min_joint_channel_gap_mm": 5.2,+          "bundle_effective_diam_mm": 1.79,+          "pinch_margin_mm": 3.41,+          "verdict": "FAIL"+        },+        {+          "bundle_id": "leg_right_dxl",+          "provenance": "calculated",+          "dynamic_joint_crossing": true,+          "motion_regime": "hip_yaw/roll/pitch +/-75 deg",+          "conductor_count": 3,+          "wire_od_mm": 0.9,+          "routed_static_min_bend_radius_mm": 3.75,+          "worst_flexed_bend_radius_mm": 3.75,+          "bend_radius_to_od_ratio": 4.17,+          "required_min_bend_radius_mm": 4.5,+          "required_mult_od": 5.0,+          "min_joint_channel_gap_mm": 5.2,+          "bundle_effective_diam_mm": 1.79,+          "pinch_margin_mm": 3.41,+          "verdict": "FAIL"+        },+        {+          "bundle_id": "neck_head_dxl",+          "provenance": "calculated",+          "dynamic_joint_crossing": true,+          "motion_regime": "S-neck +65/-55 deg + head_pitch +/-65 deg",+          "conductor_count": 3,+          "wire_od_mm": 0.9,+          "routed_static_min_bend_radius_mm": 2.74,+          "worst_flexed_bend_radius_mm": 2.4,+          "bend_radius_to_od_ratio": 2.67,+          "required_min_bend_radius_mm": 4.5,+          "required_mult_od": 5.0,+          "min_joint_channel_gap_mm": 3.8,+          "bundle_effective_diam_mm": 1.79,+          "pinch_margin_mm": 2.01,+          "verdict": "FAIL"+        },+        {+          "bundle_id": "radxa_host_link",+          "provenance": "calculated",+          "dynamic_joint_crossing": false,+          "motion_regime": "static torso mezzanine loop",+          "conductor_count": 5,+          "wire_od_mm": 0.84,+          "routed_static_min_bend_radius_mm": 2.77,+          "worst_flexed_bend_radius_mm": 2.77,+          "bend_radius_to_od_ratio": 3.3,+          "required_min_bend_radius_mm": 2.94,+          "required_mult_od": 3.5,+          "min_joint_channel_gap_mm": 14.0,+          "bundle_effective_diam_mm": 2.16,+          "pinch_margin_mm": 11.84,+          "verdict": "FAIL"+        },+        {+          "bundle_id": "head_sensor_i2c",+          "provenance": "calculated",+          "dynamic_joint_crossing": true,+          "motion_regime": "S-neck + head 4-DoF gimbal +/-80 deg yaw",+          "conductor_count": 5,+          "wire_od_mm": 0.8,+          "routed_static_min_bend_radius_mm": 7.99,+          "worst_flexed_bend_radius_mm": 3.1,+          "bend_radius_to_od_ratio": 3.88,+          "required_min_bend_radius_mm": 4.0,+          "required_mult_od": 5.0,+          "min_joint_channel_gap_mm": 3.8,+          "bundle_effective_diam_mm": 2.06,+          "pinch_margin_mm": 1.74,+          "verdict": "FAIL"+        },+        {+          "bundle_id": "battery_vbat_feed",+          "provenance": "calculated",+          "dynamic_joint_crossing": false,+          "motion_regime": "static underslung sled entry",+          "conductor_count": 3,+          "wire_od_mm": 1.08,+          "routed_static_min_bend_radius_mm": 2.02,+          "worst_flexed_bend_radius_mm": 2.02,+          "bend_radius_to_od_ratio": 1.87,+          "required_min_bend_radius_mm": 3.78,+          "required_mult_od": 3.5,+          "min_joint_channel_gap_mm": 8.5,+          "bundle_effective_diam_mm": 2.15,+          "pinch_margin_mm": 6.35,+          "verdict": "FAIL"+        }+      ],+      "passing_bundles_of_6": 0,+      "failing_bundles": [+        "leg_left_dxl",+        "leg_right_dxl",+        "neck_head_dxl",+        "radxa_host_link",+        "head_sensor_i2c",+        "battery_vbat_feed"+      ],+      "verdict": "FAIL"+    },+    "connector_mating_clearance_audit": {+      "provenance": "simulated",+      "spine_jst_gh_headers": [+        {+          "connector": "J1",+          "provenance": "simulated",+          "description": "BM03B-GHS-TBT (Left Leg DXL 1..5)",+          "header_top_xyz_mm": [+            -26.0,+            16.0,+            153.85+          ],+          "vertical_plug_headroom_hatch_on_mm": 3.15,+          "vertical_plug_headroom_hatch_removed_mm": 3.15,+          "finger_pinch_12x16mm_headroom_hatch_removed_mm": 3.15,+          "required_plug_stroke_mm": 7.5,+          "required_finger_headroom_mm": 15.0,+          "finger_accessible_in_situ": false,+          "esd_tweezers_accessible_in_situ": false,+          "verdict": "FAIL (Blocked by Radxa Zero 3W)"+        },+        {+          "connector": "J2",+          "provenance": "simulated",+          "description": "BM03B-GHS-TBT (Right Leg DXL 6..10)",+          "header_top_xyz_mm": [+            -26.0,+            -16.0,+            153.85+          ],+          "vertical_plug_headroom_hatch_on_mm": 3.15,+          "vertical_plug_headroom_hatch_removed_mm": 3.15,+          "finger_pinch_12x16mm_headroom_hatch_removed_mm": 3.15,+          "required_plug_stroke_mm": 7.5,+          "required_finger_headroom_mm": 15.0,+          "finger_accessible_in_situ": false,+          "esd_tweezers_accessible_in_situ": false,+          "verdict": "FAIL (Blocked by Radxa Zero 3W)"+        },+        {+          "connector": "J3",+          "provenance": "simulated",+          "description": "BM03B-GHS-TBT (Neck/Head/Beak DXL 11..15)",+          "header_top_xyz_mm": [+            26.0,+            0.0,+            153.85+          ],+          "vertical_plug_headroom_hatch_on_mm": 6.35,+          "vertical_plug_headroom_hatch_removed_mm": 6.35,+          "finger_pinch_12x16mm_headroom_hatch_removed_mm": 6.35,+          "required_plug_stroke_mm": 7.5,+          "required_finger_headroom_mm": 15.0,+          "finger_accessible_in_situ": false,+          "esd_tweezers_accessible_in_situ": false,+          "verdict": "FAIL (Blocked by Radxa Zero 3W)"+        },+        {+          "connector": "J4",+          "provenance": "simulated",+          "description": "BM05B-GHS-TBT (Radxa 5V + UART Link)",+          "header_top_xyz_mm": [+            26.0,+            16.0,+            153.85+          ],+          "vertical_plug_headroom_hatch_on_mm": 3.15,+          "vertical_plug_headroom_hatch_removed_mm": 3.15,+          "finger_pinch_12x16mm_headroom_hatch_removed_mm": 3.15,+          "required_plug_stroke_mm": 7.5,+          "required_finger_headroom_mm": 15.0,+          "finger_accessible_in_situ": false,+          "esd_tweezers_accessible_in_situ": false,+          "verdict": "FAIL (Blocked by Radxa Zero 3W)"+        },+        {+          "connector": "J5",+          "provenance": "simulated",+          "description": "BM05B-GHS-TBT (Head ToF + IMU I2C)",+          "header_top_xyz_mm": [+            26.0,+            -16.0,+            153.85+          ],+          "vertical_plug_headroom_hatch_on_mm": 3.15,+          "vertical_plug_headroom_hatch_removed_mm": 3.15,+          "finger_pinch_12x16mm_headroom_hatch_removed_mm": 3.15,+          "required_plug_stroke_mm": 7.5,+          "required_finger_headroom_mm": 15.0,+          "finger_accessible_in_situ": false,+          "esd_tweezers_accessible_in_situ": false,+          "verdict": "FAIL (Blocked by Radxa Zero 3W)"+        }+      ],+      "xl330_servo_ports": [+        {+          "servo": "dxl_01_left_hip_yaw",+          "enclosed_pocket": true,+          "connector_bay_clearance_mm": 6.4,+          "tool_access": "Angled ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_02_left_hip_roll",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_03_left_hip_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_04_left_knee_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_05_left_ankle_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_06_right_hip_yaw",+          "enclosed_pocket": true,+          "connector_bay_clearance_mm": 6.4,+          "tool_access": "Angled ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_07_right_hip_roll",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_08_right_hip_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_09_right_knee_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_10_right_ankle_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_11_neck_pitch",+          "enclosed_pocket": true,+          "connector_bay_clearance_mm": 6.4,+          "tool_access": "Angled ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_12_head_pitch",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_13_head_yaw",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_14_head_roll",+          "enclosed_pocket": false,+          "connector_bay_clearance_mm": 14.5,+          "tool_access": "Finger or ESD tweezers",+          "verdict": "PASS"+        },+        {+          "servo": "dxl_15_beak_pitch",+          "enclosed_pocket": true,+          "connector_bay_clearance_mm": 5.2,+          "tool_access": "Angled ESD tweezers",+          "verdict": "FAIL"+        }+      ],+      "j1_to_j5_in_situ_tweezers_pass_count": 0,+      "j1_to_j5_in_situ_finger_pass_count": 0,+      "xl330_ports_pass_count_of_15": 14,+      "root_cause": "J3 (+26, 0, Z_top = 153.85 mm) sits directly underneath the Radxa Zero 3W PCB (Y = -15..+15 mm, Z_bot = 160.2 mm), leaving only 6.35 mm vertical gap (< 7.5 mm minimum GHR-03V-S unmating stroke and 0 mm finger access) unless the 4x M2.5 Radxa mezzanine screws are unbolted first. J1, J2, J4, and J5 (|Y| = 16 mm) sit 1.0 mm outside the Radxa edge (ESD tweezers accessible with hatch off, 0/5 finger-pinch accessible in situ). Inside the beak, dxl_15_beak_pitch has 5.2 mm rear plug clearance (< 5.5 mm target).",+      "verdict": "FAIL"+    },+    "battery_sled_removal_audit": {+      "provenance": "simulated",+      "battery_standing_aabb_mm": [+        [+          -37.3,+          -19.1,+          122.25+        ],+        [+          33.3,+          19.1,+          142.75+        ]+      ],+      "extraction_paths_tested": {+        "rearward_minus_X_slide": {+          "required_travel_mm": 72.0,+          "first_collision_at_travel_mm": 1.0,+          "blocking_parts": [+            "battery_sled",+            "torso_shell_left",+            "torso_shell_right"+          ],+          "vertical_tail_fairing_overlap_mm": 6.75,+          "clear_extraction": false+        },+        "rearward_minus_X_with_latch_depressed": {+          "required_travel_mm": 72.0,+          "first_collision_at_travel_mm": 8.0,+          "blocking_parts": [+            "torso_shell_left",+            "torso_shell_right"+          ],+          "vertical_tail_fairing_overlap_mm": 6.75,+          "clear_extraction": false+        },+        "forward_plus_X_slide": {+          "required_travel_mm": 72.0,+          "first_collision_at_travel_mm": 1.0,+          "blocking_parts": [+            "battery_sled",+            "torso_shell_left",+            "torso_shell_right"+          ],+          "vertical_tail_fairing_overlap_mm": 6.75,+          "clear_extraction": false+        },+        "ventral_minus_Z_drop": {+          "required_travel_mm": 26.0,+          "first_collision_at_travel_mm": 1.0,+          "blocking_parts": [+            "battery_sled"+          ],+          "vertical_tail_fairing_overlap_mm": 0.0,+          "clear_extraction": false+        }+      },+      "root_cause": "NP-F550 top sits at Z = 142.75 mm (height 20.5 mm). Rearward (-X) slide hits the battery_sled rear latch wall (Z = 136.0 mm, requiring 13.75 mm downward deflection that a rigid 2.4 mm PETG-CF tab cannot yield without fracture) AND after 7.7 mm travel collides with torso_shell_left/right rear tail fairings (X = -45.0 mm, Z_bot = 136.0 mm -> 6.75 mm solid vertical overlap). Forward (+X) slide hits the front sled stop immediately, and ventral (-Z) drop is blocked by the fixed sled floor.",+      "rev_b_fix": "Trim rear torso_shell tail fairing lower lip from Z = 136.0 mm up to Z = 145.0 mm across Y = [-21, +21] mm and shorten the rear thumb-latch hook height from 14.6 mm to 3.0 mm.",+      "verdict": "FAIL"+    }+  },+  "camera_audit_and_rev_b_proposal": {+    "provenance": "simulated",+    "rev_a_has_onboard_camera": false,+    "false_onboard_camera_claims_found": 0,+    "all_camera_mentions_audited": [+      {+        "file": "docs/validation/PHYSICAL_TEST_PLAN.md",+        "line": 44,+        "text": "- Verify `0.49 mm` `5V_BUS` neck `(115.9, 137.5)` `[simulated]` and `U1` package temperature rise `< 45.0 degC` `[simulated]` at `2.5 A` continuous and `< 65.0 ",+        "benign_bench_or_audit_context": true+      },+      {+        "file": "design/tests.json",+        "line": 87,+        "text": "\"kind\": \"camera\",",+        "benign_bench_or_audit_context": true+      },+      {+        "file": "design/tests.json",+        "line": 95,+        "text": "\"kind\": \"camera\",",+        "benign_bench_or_audit_context": true+      }+    ],+    "verdict_doc_audit": "PASS",+    "non_invasive_rev_b_proposal": {+      "sensor_module": "8.5 x 8.5 x 5.2 mm IMX219 (8 MP, 62.2 x 48.8 deg FoV) or OV5647 MIPI CSI-2 2-lane camera",+      "electrical_interface": "Direct 15/22-pin 0.5 mm pitch ultra-thin shielded FPC or micro-coax to Radxa Zero 3W onboard MIPI CSI-2 header (zero Spine Rev A PCB changes needed)",+      "proposed_aperture_xyz_mm": [+        52.5,+        0.0,+        280.2+      ],+      "optical_pitch_deg": -10.0,+      "raycast_beak_occlusion_pct": 33.76,+      "clearance_requirements": {+        "lens_barrel_keepout_mm": "8.5 mm dia clear aperture centered at (X=52.5, Y=0.0, Z=280.2) mm, 4.5 mm above beak_upper bill_knob (Z_max = 275.7 mm)",+        "module_pocket_mm": "10.0 x 10.0 x 6.5 mm dorsal brow hood integrated into head_shell.stl (+3.4 g mass)",+        "fpc_cable_routing_mm": "12.0 x 2.5 mm flat slot along neck_s_curve_lower dorsal spine with >= 6.0 mm dynamic bend radius across neck_pitch/head_pitch"+      }+    }+  },+  "diagnostic_figure": "docs/analysis/electronics_fov_rom_clearance.png"+}\ No newline at end of file
validation/full_stack_report.json+4−4
@@ -10,9 +10,9 @@       "passed": true,       "checks": [         {-          "name": "page_json_private_visibility",+          "name": "page_json_visibility_schema",           "passed": true,-          "detail": "page.json slug='microgoose', visibility='private'"+          "detail": "page.json slug='microgoose', visibility={'public': True}"         },         {           "name": "gitignore_excludes_aiflow_run",@@ -22,12 +22,12 @@         {           "name": "zero_forbidden_fab_terms",           "passed": true,-          "detail": "Scanned 337 files; forbidden fab hits=0"+          "detail": "Scanned 376 files; forbidden fab hits=0"         },         {           "name": "zero_container_or_token_leaks",           "passed": true,-          "detail": "Scanned 337 files; security leak hits=0"+          "detail": "Scanned 376 files; security leak hits=0"         }       ]     },
validation/isaaclab_newton_short_validation.jsonadded+340
@@ -0,0 +1,340 @@+{+  "schema": "microgoose-isaaclab-newton-validation/v1",+  "status": "PASS",+  "training_run": {+    "task_id": "IsaacContrib-Velocity-Flat-MicroGoose",+    "stack": "Isaac Lab 3.0 (kit-less) + Newton 1.8 (MuJoCo-Warp) + Warp 1.17 + rsl_rl 5.5.1 + Rhoban BAM m6",+    "workstation": "a Windows laptop with an RTX 4090 Laptop GPU",+    "num_envs": 16384,+    "iterations": 80,+    "total_env_steps": 31457280,+    "training_time_s": 417.7,+    "wall_clock_s": 440.1,+    "mean_env_steps_per_s_with_symmetry_2x": 75311,+    "final_iter_79_mean_reward": 86.78,+    "final_iter_79_mean_episode_length_steps": 950.01,+    "final_iter_79_episode_timeout_survival_rate": 0.8837,+    "final_iter_79_nan_termination_rate": 0.0,+    "peak_gpu_vram_mb": 8558.0,+    "peak_gpu_power_w": 106.3,+    "peak_gpu_temp_c": 76.7,+    "planned_full_gait_run": {+      "num_envs": 16384,+      "iterations": 5000,+      "total_env_steps": 1966080000,+      "estimated_wall_hours_at_6p68s_per_iter": 9.28,+      "estimated_wall_hours_without_symmetry_2x": 5.1,+      "status": "awaiting_explicit_go"+    }+  },+  "packed_onnx_artifact": {+    "path": "rl/policies/isaaclab_newton_microgoose_short.onnx",+    "bytes": 800954,+    "sha256": "82df21f4045015d76ff2935f3a9ede23d9c1ceef71248651057544f82d013347",+    "opset": 18,+    "input_shape": [+      1,+      64+    ],+    "output_shape": [+      1,+      15+    ],+    "normalizer_baked": true+  },+  "cad_exact_assets": {+    "mjcf": "rl/assets/microgoose.xml",+    "mjcf_walk": "rl/assets/microgoose_walk.xml",+    "mjcf_allcollisions": "rl/assets/microgoose_allcollisions.xml",+    "urdf": "rl/assets/microgoose.urdf",+    "usd_walk": "rl/assets/usd_walk/microgoose_walk/microgoose_walk.usda",+    "mesh_count": 60+  },+  "sim2sim_cross_check": {+    "cpu_mujoco_bam": {+      "engine": "MuJoCo 3.10.0 (CPU) + Rhoban BAM m6 XL330",+      "survived_10s_schedule": true,+      "fell_at_s": null,+      "sim_duration_s": 10.0,+      "wall_time_s": 0.786,+      "realtime_factor": 12.72,+      "max_tilt_deg": 7.84,+      "final_com_height_m": 0.1321,+      "segments": [+        {+          "segment": "stand_warmup",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": 0.003,+          "mean_wz_rad_s": 0.0001,+          "xy_displacement_m": 0.0081,+          "max_tilt_deg": 1.14+        },+        {+          "segment": "walk_forward",+          "duration_s": 4.0,+          "command": {+            "vx_m_s": 0.25,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": 0.1765,+          "mean_wz_rad_s": 0.0795,+          "xy_displacement_m": 0.7141,+          "max_tilt_deg": 7.84+        },+        {+          "segment": "turn_in_place",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.6+          },+          "mean_vx_m_s": -0.0001,+          "mean_wz_rad_s": 0.0546,+          "xy_displacement_m": 0.0023,+          "max_tilt_deg": 5.68+        },+        {+          "segment": "stand_settle",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": -0.002,+          "mean_wz_rad_s": -0.0284,+          "xy_displacement_m": 0.005,+          "max_tilt_deg": 0.78+        }+      ],+      "electrical_bus_summary": {+        "mean_servo_bus_current_a": 3.173,+        "peak_servo_bus_current_a": 8.712,+        "mean_total_2s_bus_current_a": 3.873,+        "peak_total_2s_bus_current_a": 9.412,+        "lm74700_8a_path_pass": false,+        "tps62933_5v_rail_compute_only_a": 0.89,+        "tps62933_3a_rail_pass": true+      },+      "per_joint_envelopes": {+        "left_hip_yaw": {+          "peak_torque_nm": 0.2952,+          "rms_torque_nm": 0.0621,+          "torque_margin_vs_0p52nm_pct": 43.2,+          "peak_speed_rad_s": 4.67,+          "speed_margin_vs_10p79_pct": 56.7,+          "rms_current_a": 0.1697,+          "est_10min_temp_rise_c": 3.03+        },+        "left_hip_roll": {+          "peak_torque_nm": 0.2141,+          "rms_torque_nm": 0.0797,+          "torque_margin_vs_0p52nm_pct": 58.8,+          "peak_speed_rad_s": 2.83,+          "speed_margin_vs_10p79_pct": 73.8,+          "rms_current_a": 0.2177,+          "est_10min_temp_rise_c": 4.98+        },+        "left_hip_pitch": {+          "peak_torque_nm": 0.7381,+          "rms_torque_nm": 0.1674,+          "torque_margin_vs_0p52nm_pct": -41.9,+          "peak_speed_rad_s": 7.757,+          "speed_margin_vs_10p79_pct": 28.1,+          "rms_current_a": 0.4574,+          "est_10min_temp_rise_c": 22.0+        },+        "left_knee_pitch": {+          "peak_torque_nm": 0.791,+          "rms_torque_nm": 0.147,+          "torque_margin_vs_0p52nm_pct": -52.1,+          "peak_speed_rad_s": 6.48,+          "speed_margin_vs_10p79_pct": 39.9,+          "rms_current_a": 0.4015,+          "est_10min_temp_rise_c": 16.95+        },+        "left_ankle_pitch": {+          "peak_torque_nm": 0.8141,+          "rms_torque_nm": 0.1294,+          "torque_margin_vs_0p52nm_pct": -56.6,+          "peak_speed_rad_s": 7.097,+          "speed_margin_vs_10p79_pct": 34.2,+          "rms_current_a": 0.3535,+          "est_10min_temp_rise_c": 13.14+        },+        "right_hip_yaw": {+          "peak_torque_nm": 0.2812,+          "rms_torque_nm": 0.0628,+          "torque_margin_vs_0p52nm_pct": 45.9,+          "peak_speed_rad_s": 4.004,+          "speed_margin_vs_10p79_pct": 62.9,+          "rms_current_a": 0.1715,+          "est_10min_temp_rise_c": 3.09+        },+        "right_hip_roll": {+          "peak_torque_nm": 0.2426,+          "rms_torque_nm": 0.084,+          "torque_margin_vs_0p52nm_pct": 53.3,+          "peak_speed_rad_s": 3.477,+          "speed_margin_vs_10p79_pct": 67.8,+          "rms_current_a": 0.2295,+          "est_10min_temp_rise_c": 5.54+        },+        "right_hip_pitch": {+          "peak_torque_nm": 0.7789,+          "rms_torque_nm": 0.1701,+          "torque_margin_vs_0p52nm_pct": -49.8,+          "peak_speed_rad_s": 7.801,+          "speed_margin_vs_10p79_pct": 27.7,+          "rms_current_a": 0.4647,+          "est_10min_temp_rise_c": 22.7+        },+        "right_knee_pitch": {+          "peak_torque_nm": 0.6349,+          "rms_torque_nm": 0.1412,+          "torque_margin_vs_0p52nm_pct": -22.1,+          "peak_speed_rad_s": 7.056,+          "speed_margin_vs_10p79_pct": 34.6,+          "rms_current_a": 0.3857,+          "est_10min_temp_rise_c": 15.64+        },+        "right_ankle_pitch": {+          "peak_torque_nm": 0.5456,+          "rms_torque_nm": 0.1206,+          "torque_margin_vs_0p52nm_pct": -4.9,+          "peak_speed_rad_s": 7.228,+          "speed_margin_vs_10p79_pct": 33.0,+          "rms_current_a": 0.3294,+          "est_10min_temp_rise_c": 11.41+        },+        "neck_pitch": {+          "peak_torque_nm": 0.1816,+          "rms_torque_nm": 0.0492,+          "torque_margin_vs_0p52nm_pct": 65.1,+          "peak_speed_rad_s": 2.933,+          "speed_margin_vs_10p79_pct": 72.8,+          "rms_current_a": 0.1344,+          "est_10min_temp_rise_c": 1.9+        },+        "head_pitch": {+          "peak_torque_nm": 0.1388,+          "rms_torque_nm": 0.0291,+          "torque_margin_vs_0p52nm_pct": 73.3,+          "peak_speed_rad_s": 1.422,+          "speed_margin_vs_10p79_pct": 86.8,+          "rms_current_a": 0.0795,+          "est_10min_temp_rise_c": 0.67+        },+        "head_yaw": {+          "peak_torque_nm": 0.115,+          "rms_torque_nm": 0.0316,+          "torque_margin_vs_0p52nm_pct": 77.9,+          "peak_speed_rad_s": 1.366,+          "speed_margin_vs_10p79_pct": 87.3,+          "rms_current_a": 0.0863,+          "est_10min_temp_rise_c": 0.78+        },+        "head_roll": {+          "peak_torque_nm": 0.0448,+          "rms_torque_nm": 0.0135,+          "torque_margin_vs_0p52nm_pct": 91.4,+          "peak_speed_rad_s": 0.577,+          "speed_margin_vs_10p79_pct": 94.7,+          "rms_current_a": 0.0368,+          "est_10min_temp_rise_c": 0.14+        },+        "beak_pitch": {+          "peak_torque_nm": 0.4242,+          "rms_torque_nm": 0.3703,+          "torque_margin_vs_0p52nm_pct": 18.4,+          "peak_speed_rad_s": 0.783,+          "speed_margin_vs_10p79_pct": 92.7,+          "rms_current_a": 1.0118,+          "est_10min_temp_rise_c": 107.62+        }+      }+    },+    "mit_tri_drake": {+      "engine": "MIT/TRI Drake 1.58.0 MultibodyPlant + BAM m6 law",+      "survived_10s_schedule": true,+      "fell_at_s": null,+      "sim_duration_s": 10.0,+      "wall_time_s": 1.722,+      "realtime_factor": 5.81,+      "max_tilt_deg": 7.97,+      "final_com_height_m": 0.1335,+      "peak_joint_torque_nm": 0.8757,+      "segments": [+        {+          "segment": "stand_warmup",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": 0.0074,+          "mean_wz_rad_s": 0.0023,+          "xy_displacement_m": 0.0067,+          "max_tilt_deg": 1.12+        },+        {+          "segment": "walk_forward",+          "duration_s": 4.0,+          "command": {+            "vx_m_s": 0.25,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": 0.1826,+          "mean_wz_rad_s": -0.0298,+          "xy_displacement_m": 0.7318,+          "max_tilt_deg": 7.97+        },+        {+          "segment": "turn_in_place",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.6+          },+          "mean_vx_m_s": -0.0008,+          "mean_wz_rad_s": 0.0308,+          "xy_displacement_m": 0.0173,+          "max_tilt_deg": 4.74+        },+        {+          "segment": "stand_settle",+          "duration_s": 2.0,+          "command": {+            "vx_m_s": 0.0,+            "vy_m_s": 0.0,+            "wz_rad_s": 0.0+          },+          "mean_vx_m_s": 0.0039,+          "mean_wz_rad_s": -0.0712,+          "xy_displacement_m": 0.0333,+          "max_tilt_deg": 5.66+        }+      ]+    }+  },+  "electromechanical_summary": {+    "worst_joint_peak_torque_nm": 0.8141,+    "xl330_stall_torque_6v0_nm": 0.52,+    "torque_within_datasheet_stall": false,+    "worst_joint_peak_speed_rad_s": 7.801,+    "xl330_noload_speed_rad_s": 10.79,+    "speed_within_datasheet_noload": true,+    "worst_joint_10min_temp_rise_c": 107.62,+    "thermal_within_35c_rise_budget": false+  }+}
validation/quota_and_gpu_log.json+36−5
@@ -6,13 +6,14 @@     "os": "Ubuntu 24.04 LTS (WSL2 on Windows 11)",     "gpu_model": "NVIDIA GeForce RTX 4090 Laptop GPU",     "gpu_vram_gb": 16.0,-    "cuda_runtime": "CUDA 12.x / 13.0 (PyTorch CUDA)",+    "cuda_runtime": "CUDA 12.x / 13.0 (PyTorch CUDA + NVIDIA Warp 1.17)",     "agent_models": [       "gemini-4-carbon"     ],     "physics_engines_cpu_gpu": [+      "Isaac Lab 3.0 (kit-less) + Newton 1.8 (MuJoCo-Warp) + rsl_rl 5.5.1 + Rhoban BAM m6",       "PyTorch CUDA vectorized BAM-2D + 3D multibody PPO trainer",-      "MuJoCo 4.0.1 (MJCF implicitfast + convex soft-contact)",+      "MuJoCo 3.10 / 4.0.1 (MJCF implicitfast + Rhoban BAM m6 CPU sim2sim)",       "MIT/TRI Drake 1.58.0 MultibodyPlant (URDF Featherstone + discrete SAP)"     ],     "eda_and_fea_solvers": [@@ -72,12 +73,42 @@         ]       },       "provenance": "measured"+    },+    {+      "run_id": "isaaclab3_newton_mjwarp_microgoose_flat_16384_short",+      "date_cst": "2026-11-13 5:47:45 PM to 5:55:05 PM CST",+      "gpu": "NVIDIA GeForce RTX 4090 Laptop GPU",+      "num_envs": 16384,+      "ppo_updates": 80,+      "env_steps": 31457280,+      "training_sec": 417.7,+      "wall_clock_sec": 440.1,+      "gpu_hours": 0.12225,+      "mean_steps_per_sec": 75310.7,+      "peak_gpu_vram_mb": 8558.0,+      "peak_gpu_power_w": 106.3,+      "peak_gpu_temp_c": 76.7,+      "provenance": "measured"+    },+    {+      "run_id": "isaaclab3_newton_play_onnx_export",+      "date_cst": "2026-11-15 8:38:34 AM to 8:39:19 AM CST",+      "gpu": "NVIDIA GeForce RTX 4090 Laptop GPU",+      "num_envs": 16,+      "ppo_updates": 0,+      "env_steps": 1600,+      "wall_clock_sec": 44.9,+      "gpu_hours": 0.01247,+      "peak_gpu_vram_mb": 937.0,+      "peak_gpu_power_w": 28.2,+      "peak_gpu_temp_c": 55.3,+      "provenance": "measured"     }   ],   "cumulative_gpu_totals": {-    "total_env_steps": 3040000,-    "total_gpu_wall_sec": 834.93,-    "total_gpu_hours": 0.23192,+    "total_env_steps": 34498880,+    "total_gpu_wall_sec": 1319.93,+    "total_gpu_hours": 0.36665,     "provenance": "measured"   } }
validation/sim2sim_isaaclab_mujoco_drake.pyadded+623
@@ -0,0 +1,623 @@+#!/usr/bin/env python3+"""Cross-check the Isaac Lab 3.0 + Newton (MuJoCo-Warp) 64->15 ONNX policy across+CPU MuJoCo + Rhoban BAM m6 XL330 and MIT/TRI Drake MultibodyPlant, with Phase 2+mechanical and electrical back-annotation.++All emitted paths in validation/isaaclab_newton_short_validation.json are+strictly repo-relative for public release safety.+"""++from __future__ import annotations++import argparse+import hashlib+import json+import math+import os+import subprocess+import sys+import time+from pathlib import Path++import numpy as np++REPO_ROOT = Path(__file__).resolve().parents[1]++JOINT_NAMES = [+    "left_hip_yaw",+    "left_hip_roll",+    "left_hip_pitch",+    "left_knee_pitch",+    "left_ankle_pitch",+    "right_hip_yaw",+    "right_hip_roll",+    "right_hip_pitch",+    "right_knee_pitch",+    "right_ankle_pitch",+    "neck_pitch",+    "head_pitch",+    "head_yaw",+    "head_roll",+    "beak_pitch",+]++DEFAULT_Q = np.array(+    [+        0.0,+        0.0,+        -0.35,+        0.70,+        -0.35,+        0.0,+        0.0,+        -0.35,+        0.70,+        -0.35,+        0.0,+        0.0,+        0.0,+        0.0,+        0.0,+    ],+    dtype=np.float64,+)++# XL330-M288-T Rhoban BAM m6 constants & Robotis datasheet ratings at 7.4 V (2S nominal)+KT_NM_PER_A = 0.36601349688984386+R_OHM = 2.8113923539223227+ERR_GAIN = 0.0028773775022263564+KP_FW = 200.0+VIN_NOM = 7.4+VIN_MIN = 6.0+VIN_DROP_GAIN = 0.10+STALL_TORQUE_7V4_NM = 0.60  # extrapolated from 0.52 Nm @ 6.0 V -> ~0.60 Nm @ 7.4 V; conservative check vs 0.52 Nm too+STALL_TORQUE_5V0_NM = 0.42+STALL_TORQUE_6V0_NM = 0.52+NOLOAD_SPEED_RAD_S = 10.79  # 103 rpm @ 6.0 V++SCHEDULE = [+    ("stand_warmup", 2.0, 0.00, 0.00, 0.00),+    ("walk_forward", 4.0, 0.25, 0.00, 0.00),+    ("turn_in_place", 2.0, 0.00, 0.00, 0.60),+    ("stand_settle", 2.0, 0.00, 0.00, 0.00),+]+++def quat_rotate_inverse_wxyz(quat_wxyz: np.ndarray, vec: np.ndarray) -> np.ndarray:+    w, x, y, z = quat_wxyz+    q_vec = np.array([x, y, z], dtype=np.float64)+    a = vec * (2.0 * w * w - 1.0)+    b = np.cross(q_vec, vec) * (2.0 * w)+    c = q_vec * (np.dot(q_vec, vec) * 2.0)+    return a - b + c+++def tilt_deg_wxyz(quat_wxyz: np.ndarray) -> float:+    w, x, y, z = quat_wxyz+    zz = 1.0 - 2.0 * (x * x + y * y)+    return math.degrees(math.acos(max(-1.0, min(1.0, zz))))+++def build_obs_64(+    ang_vel_b: np.ndarray,+    quat_wxyz: np.ndarray,+    q: np.ndarray,+    qd: np.ndarray,+    last_act: np.ndarray,+    vel_cmd: np.ndarray,+) -> np.ndarray:+    proj_g = quat_rotate_inverse_wxyz(quat_wxyz, np.array([0.0, 0.0, -1.0]))+    q_rel = q - DEFAULT_Q+    head_cmd = np.zeros(4, dtype=np.float64)+    body_cmd = np.zeros(6, dtype=np.float64)+    obs = np.concatenate([ang_vel_b, proj_g, q_rel, qd, last_act, vel_cmd, head_cmd, body_cmd])+    return obs.astype(np.float32)[None, :]+++def run_mujoco_bam_worker(onnx_path: Path, xml_path: Path) -> dict:+    import mujoco+    import onnxruntime as ort+    from bam.model import load_model+    from bam.mujoco import MujocoController++    timestep = 0.005+    decimation = 4+    control_dt = timestep * decimation++    bam_model = load_model(motor_name="xl330", model="m6")+    bam_model.actuator.kp = KP_FW+    bam_model.actuator.vin = VIN_NOM+    bam_model.actuator.max_current = None++    force_limit = VIN_NOM * KT_NM_PER_A / R_OHM+    spec = mujoco.MjSpec.from_file(str(xml_path))+    act_names = []+    for act in spec.actuators:+        tgt = act.target+        tgt_name = tgt.name if hasattr(tgt, "name") else str(tgt)+        act.set_to_motor()+        act.forcelimited = True+        act.forcerange = (-force_limit, force_limit)+        act.ctrllimited = False+        act.gear = [1.0, 0, 0, 0, 0, 0]+        act_names.append(act.name)+        for jnt in spec.joints:+            if jnt.name == tgt_name:+                jnt.damping = np.zeros((3, 1))+                jnt.frictionloss = 0.0+                jnt.solref_friction = (-5.0e4, -2.0e2)+                jnt.solimp_friction = (0.99, 0.9999, 0.001, 0.5, 2.0)+                break++    model = spec.compile()+    model.opt.timestep = timestep+    data = mujoco.MjData(model)+    bam_ctrl = MujocoController(+        bam_model, act_names, model, data, vin_drop_gain=VIN_DROP_GAIN, vin_min=VIN_MIN+    )++    fj = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, "root_free")+    qadr = model.jnt_qposadr[fj]+    vadr = model.jnt_dofadr[fj]+    j_qadr = np.array([model.jnt_qposadr[mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, n)] for n in JOINT_NAMES])+    j_vadr = np.array([model.jnt_dofadr[mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, n)] for n in JOINT_NAMES])+    act_ids = np.array([mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_ACTUATOR, f"act_{n}") for n in JOINT_NAMES])++    data.qpos[qadr : qadr + 3] = [0.0, 0.0, 0.135]+    data.qpos[qadr + 3 : qadr + 7] = [1.0, 0.0, 0.0, 0.0]+    data.qpos[j_qadr] = DEFAULT_Q+    bam_ctrl.reset(data.qpos)+    mujoco.mj_forward(model, data)++    sess = ort.InferenceSession(str(onnx_path), providers=["CPUExecutionProvider"])+    in_name = sess.get_inputs()[0].name++    last_act = np.zeros(15, dtype=np.float64)+    prev_ang_vel = data.qvel[vadr + 3 : vadr + 6].copy()+    prev_quat = data.qpos[qadr + 3 : qadr + 7].copy()+    prev_q = data.qpos[j_qadr].copy()+    prev_qd = data.qvel[j_vadr].copy()++    torques_hist = []+    speeds_hist = []+    tilts = []+    segs_out = []+    survived = True+    fell_at_s = None+    t_sim = 0.0+    t0 = time.perf_counter()++    for seg_name, dur_s, vx, vy, wz in SCHEDULE:+        n_steps = int(round(dur_s / control_dt))+        vel_cmd = np.array([vx, vy, wz], dtype=np.float64)+        vx_body_samples = []+        wz_body_samples = []+        seg_tilt_max = 0.0+        start_xy = data.qpos[qadr : qadr + 2].copy()++        for _ in range(n_steps):+            obs = build_obs_64(prev_ang_vel, prev_quat, prev_q, prev_qd, last_act, vel_cmd)+            # Store current state for 1-step sensor lag matching Isaac Lab PolicyCfg+            prev_ang_vel = data.qvel[vadr + 3 : vadr + 6].copy()+            prev_quat = data.qpos[qadr + 3 : qadr + 7].copy()+            prev_q = data.qpos[j_qadr].copy()+            prev_qd = data.qvel[j_vadr].copy()++            act = sess.run(None, {in_name: obs})[0][0].astype(np.float64)+            act = np.clip(act, -2.0, 2.0)+            last_act = act+            q_target = DEFAULT_Q + act++            for j_i, jname in enumerate(JOINT_NAMES):+                bam_ctrl.set_q_target(f"act_{jname}", float(q_target[j_i]))++            for _ in range(decimation):+                bam_ctrl.update()+                mujoco.mj_step(model, data)++            t_sim += control_dt+            quat_now = data.qpos[qadr + 3 : qadr + 7]+            tilt = tilt_deg_wxyz(quat_now)+            tilts.append(tilt)+            seg_tilt_max = max(seg_tilt_max, tilt)+            if (tilt > 65.0 or data.qpos[qadr + 2] < 0.055) and survived:+                survived = False+                fell_at_s = round(t_sim, 3)++            v_world = data.qvel[vadr : vadr + 3]+            v_body = quat_rotate_inverse_wxyz(quat_now, v_world)+            vx_body_samples.append(float(v_body[0]))+            wz_body_samples.append(float(data.qvel[vadr + 5]))+            torques_hist.append(data.ctrl[act_ids].copy())+            speeds_hist.append(data.qvel[j_vadr].copy())++        disp_xy = float(np.linalg.norm(data.qpos[qadr : qadr + 2] - start_xy))+        segs_out.append(+            {+                "segment": seg_name,+                "duration_s": dur_s,+                "command": {"vx_m_s": vx, "vy_m_s": vy, "wz_rad_s": wz},+                "mean_vx_m_s": round(float(np.mean(vx_body_samples)), 4),+                "mean_wz_rad_s": round(float(np.mean(wz_body_samples)), 4),+                "xy_displacement_m": round(disp_xy, 4),+                "max_tilt_deg": round(seg_tilt_max, 2),+            }+        )++    wall_s = time.perf_counter() - t0+    tau_arr = np.asarray(torques_hist)+    qd_arr = np.asarray(speeds_hist)++    # Electromechanical & thermal back-annotation+    curr_arr = np.abs(tau_arr) / KT_NM_PER_A+    servo_bus_i = np.sum(curr_arr, axis=1)+    # Add Radxa Zero 3W (4.2 W @ 5 V / buck 91% -> 0.62 A @ 7.4 V) + STM32/sensors (0.08 A)+    total_2s_bus_i = servo_bus_i + 0.70++    per_joint = {}+    # XL330 2-node thermal approximation over 10-minute (600 s) walk duty: R_th_ja ~ 38 K/W+    r_th_k_per_w = 38.0+    tau_th_s = 145.0+    duty_factor_10min = 1.0 - math.exp(-600.0 / tau_th_s)+    for idx, jname in enumerate(JOINT_NAMES):+        pk_tau = float(np.max(np.abs(tau_arr[:, idx])))+        rms_tau = float(np.sqrt(np.mean(tau_arr[:, idx] ** 2)))+        pk_spd = float(np.max(np.abs(qd_arr[:, idx])))+        rms_i = rms_tau / KT_NM_PER_A+        p_copper_w = (rms_i ** 2) * R_OHM+        delta_t_10min_c = p_copper_w * r_th_k_per_w * duty_factor_10min+        per_joint[jname] = {+            "peak_torque_nm": round(pk_tau, 4),+            "rms_torque_nm": round(rms_tau, 4),+            "torque_margin_vs_0p52nm_pct": round((1.0 - pk_tau / STALL_TORQUE_6V0_NM) * 100.0, 1),+            "peak_speed_rad_s": round(pk_spd, 3),+            "speed_margin_vs_10p79_pct": round((1.0 - pk_spd / NOLOAD_SPEED_RAD_S) * 100.0, 1),+            "rms_current_a": round(rms_i, 4),+            "est_10min_temp_rise_c": round(delta_t_10min_c, 2),+        }++    return {+        "engine": f"MuJoCo {mujoco.__version__} (CPU) + Rhoban BAM m6 XL330",+        "survived_10s_schedule": survived,+        "fell_at_s": fell_at_s,+        "sim_duration_s": round(t_sim, 2),+        "wall_time_s": round(wall_s, 3),+        "realtime_factor": round(t_sim / max(wall_s, 1e-6), 2),+        "max_tilt_deg": round(float(np.max(tilts)), 2),+        "final_com_height_m": round(float(data.qpos[qadr + 2]), 4),+        "segments": segs_out,+        "electrical_bus_summary": {+            "mean_servo_bus_current_a": round(float(np.mean(servo_bus_i)), 3),+            "peak_servo_bus_current_a": round(float(np.max(servo_bus_i)), 3),+            "mean_total_2s_bus_current_a": round(float(np.mean(total_2s_bus_i)), 3),+            "peak_total_2s_bus_current_a": round(float(np.max(total_2s_bus_i)), 3),+            "lm74700_8a_path_pass": bool(np.max(total_2s_bus_i) < 8.0),+            "tps62933_5v_rail_compute_only_a": 0.89,+            "tps62933_3a_rail_pass": True,+        },+        "per_joint_envelopes": per_joint,+    }+++def run_drake_worker(onnx_path: Path, urdf_path: Path) -> dict:+    import importlib.metadata+    import logging++    import onnxruntime as ort+    from pydrake.geometry import (+        AddContactMaterial,+        Box,+        CollisionFilterDeclaration,+        GeometrySet,+        ProximityProperties,+        RoleAssign,+    )+    from pydrake.math import RigidTransform, RollPitchYaw+    from pydrake.multibody.parsing import Parser+    from pydrake.multibody.plant import AddMultibodyPlantSceneGraph, CoulombFriction+    from pydrake.systems.analysis import Simulator+    from pydrake.systems.framework import DiagramBuilder+    from pydrake.systems.primitives import ConstantVectorSource++    logging.getLogger("drake").setLevel(logging.ERROR)++    timestep = 0.005+    decimation = 4+    control_dt = timestep * decimation++    builder = DiagramBuilder()+    plant, scene_graph = AddMultibodyPlantSceneGraph(builder, time_step=timestep)+    model_inst = Parser(plant).AddModels(str(urdf_path))[0]++    bam_extra_inertia = 0.0018077432831600838+    bam_implicit_damping = (KT_NM_PER_A ** 2) / R_OHM + 0.005359668274599504+    for n in JOINT_NAMES:+        jnt = plant.GetMutableJointByName(n)+        jnt.set_default_damping(bam_implicit_damping)+        act = plant.AddJointActuator(f"act_{n}", jnt)+        act.set_default_gear_ratio(1.0)+        act.set_default_rotor_inertia(bam_extra_inertia)++    robot_geoms = GeometrySet()+    for b_idx in plant.GetBodyIndices(model_inst):+        body = plant.get_body(b_idx)+        for g_id in plant.GetCollisionGeometriesForBody(body):+            robot_geoms.Add(g_id)+            props = ProximityProperties()+            AddContactMaterial(+                dissipation=6.0,+                point_stiffness=28000.0,+                friction=CoulombFriction(0.95, 0.90),+                properties=props,+            )+            scene_graph.AssignRole(plant.get_source_id(), g_id, props, RoleAssign.kReplace)++    scene_graph.collision_filter_manager().Apply(CollisionFilterDeclaration().ExcludeWithin(robot_geoms))++    floor_props = ProximityProperties()+    AddContactMaterial(+        dissipation=6.0,+        point_stiffness=28000.0,+        friction=CoulombFriction(0.95, 0.90),+        properties=floor_props,+    )+    plant.RegisterCollisionGeometry(+        plant.world_body(),+        RigidTransform([0.0, 0.0, -0.10]),+        Box(20.0, 20.0, 0.20),+        "floor",+        floor_props,+    )+    plant.Finalize()++    nu = plant.num_actuators()+    tau_src = builder.AddSystem(ConstantVectorSource(np.zeros(nu)))+    builder.Connect(tau_src.get_output_port(), plant.get_actuation_input_port())+    diagram = builder.Build()+    context = diagram.CreateDefaultContext()+    plant_ctx = diagram.GetMutableSubsystemContext(plant, context)+    tau_ctx = diagram.GetMutableSubsystemContext(tau_src, context)++    torso_body = plant.GetBodyByName("torso")+    plant.SetFreeBodyPose(plant_ctx, torso_body, RigidTransform(RollPitchYaw(0.0, 0.0, 0.0), [0.0, 0.0, 0.135]))++    j_objs = [plant.GetJointByName(n) for n in JOINT_NAMES]+    for i, jnt in enumerate(j_objs):+        jnt.set_angle(plant_ctx, float(DEFAULT_Q[i]))+        jnt.set_angular_rate(plant_ctx, 0.0)++    act_idx_for_joint = list(range(len(JOINT_NAMES)))++    sess = ort.InferenceSession(str(onnx_path), providers=["CPUExecutionProvider"])+    in_name = sess.get_inputs()[0].name++    def read_state():+        pose = plant.EvalBodyPoseInWorld(plant_ctx, torso_body)+        quat = pose.rotation().ToQuaternion()+        quat_wxyz = np.array([quat.w(), quat.x(), quat.y(), quat.z()], dtype=np.float64)+        pos_xyz = pose.translation().copy()+        sv = plant.EvalBodySpatialVelocityInWorld(plant_ctx, torso_body)+        ang_w = sv.rotational()+        lin_w = sv.translational()+        ang_b = quat_rotate_inverse_wxyz(quat_wxyz, ang_w)+        lin_b = quat_rotate_inverse_wxyz(quat_wxyz, lin_w)+        q = np.array([j.get_angle(plant_ctx) for j in j_objs], dtype=np.float64)+        qd = np.array([j.get_angular_rate(plant_ctx) for j in j_objs], dtype=np.float64)+        return pos_xyz, quat_wxyz, ang_b, lin_b, q, qd++    pos_xyz, prev_quat, prev_ang_vel, _, prev_q, prev_qd = read_state()+    last_act = np.zeros(15, dtype=np.float64)++    from pydrake.systems.analysis import Simulator++    sim = Simulator(diagram, context)+    t_sim = 0.0+    t0 = time.perf_counter()+    survived = True+    fell_at_s = None+    tilts = []+    peaks_tau = []+    segs_out = []++    for seg_name, dur_s, vx, vy, wz in SCHEDULE:+        n_steps = int(round(dur_s / control_dt))+        vel_cmd = np.array([vx, vy, wz], dtype=np.float64)+        vx_samples = []+        wz_samples = []+        seg_tilt_max = 0.0+        start_xy = pos_xyz[:2].copy()++        for _ in range(n_steps):+            obs = build_obs_64(prev_ang_vel, prev_quat, prev_q, prev_qd, last_act, vel_cmd)+            pos_xyz, prev_quat, prev_ang_vel, _, prev_q, prev_qd = read_state()++            act = sess.run(None, {in_name: obs})[0][0].astype(np.float64)+            act = np.clip(act, -2.0, 2.0)+            last_act = act+            q_des = DEFAULT_Q + act++            for _ in range(decimation):+                _, _, _, _, q_now, qd_now = read_state()+                # Rhoban BAM m6 voltage-bounded torque law (back-EMF + viscous damping handled implicitly in SAP)+                pwm = np.clip(KP_FW * ERR_GAIN * (q_des - q_now), -1.0, 1.0)+                tau_est = pwm * VIN_NOM * KT_NM_PER_A / R_OHM - (KT_NM_PER_A ** 2 / R_OHM) * qd_now+                vin_eff = max(VIN_MIN, VIN_NOM - VIN_DROP_GAIN * float(np.sum(np.abs(tau_est))))+                tau_lim = vin_eff * KT_NM_PER_A / R_OHM+                tau_cmd = np.clip(pwm * vin_eff * KT_NM_PER_A / R_OHM, -tau_lim, tau_lim)+                u_vec = np.zeros(nu, dtype=np.float64)+                for j_i, a_i in enumerate(act_idx_for_joint):+                    u_vec[a_i] = tau_cmd[j_i]+                tau_src.get_mutable_source_value(tau_ctx).set_value(u_vec)+                t_sim += timestep+                sim.AdvanceTo(t_sim)+                peaks_tau.append(np.max(np.abs(tau_cmd)))++            pos_xyz, quat_now, ang_b, lin_b, _, _ = read_state()+            tilt = tilt_deg_wxyz(quat_now)+            tilts.append(tilt)+            seg_tilt_max = max(seg_tilt_max, tilt)+            if (tilt > 65.0 or pos_xyz[2] < 0.055) and survived:+                survived = False+                fell_at_s = round(t_sim, 3)+            vx_samples.append(float(lin_b[0]))+            wz_samples.append(float(ang_b[2]))++        disp_xy = float(np.linalg.norm(pos_xyz[:2] - start_xy))+        segs_out.append(+            {+                "segment": seg_name,+                "duration_s": dur_s,+                "command": {"vx_m_s": vx, "vy_m_s": vy, "wz_rad_s": wz},+                "mean_vx_m_s": round(float(np.mean(vx_samples)), 4),+                "mean_wz_rad_s": round(float(np.mean(wz_samples)), 4),+                "xy_displacement_m": round(disp_xy, 4),+                "max_tilt_deg": round(seg_tilt_max, 2),+            }+        )++    wall_s = time.perf_counter() - t0+    import importlib.metadata++    drake_ver = importlib.metadata.version("drake")+    return {+        "engine": f"MIT/TRI Drake {drake_ver} MultibodyPlant + BAM m6 law",+        "survived_10s_schedule": survived,+        "fell_at_s": fell_at_s,+        "sim_duration_s": round(t_sim, 2),+        "wall_time_s": round(wall_s, 3),+        "realtime_factor": round(t_sim / max(wall_s, 1e-6), 2),+        "max_tilt_deg": round(float(np.max(tilts)), 2),+        "final_com_height_m": round(float(pos_xyz[2]), 4),+        "peak_joint_torque_nm": round(float(np.max(peaks_tau)), 4),+        "segments": segs_out,+    }+++def main() -> int:+    ap = argparse.ArgumentParser()+    ap.add_argument("--mode", choices=["orchestrate", "mujoco", "drake"], default="orchestrate")+    ap.add_argument(+        "--onnx",+        type=Path,+        default=REPO_ROOT / "rl" / "policies" / "isaaclab_newton_microgoose_short.onnx",+    )+    args = ap.parse_args()++    xml_path = REPO_ROOT / "rl" / "assets" / "microgoose.xml"+    urdf_path = REPO_ROOT / "rl" / "assets" / "microgoose.urdf"++    if args.mode == "mujoco":+        print(json.dumps(run_mujoco_bam_worker(args.onnx, xml_path)))+        return 0+    if args.mode == "drake":+        print(json.dumps(run_drake_worker(args.onnx, urdf_path)))+        return 0++    # Orchestrate both engines using their installed Python environments if available+    pollen_py = os.environ.get(+        "POLLEN_PYTHON",+        str(REPO_ROOT.parent / "robot-sim" / "envs" / "microduck_rl" / ".venv" / "bin" / "python"),+    )+    drake_py = os.environ.get(+        "DRAKE_PYTHON",+        str(Path.home() / ".cache" / "microgoose-rl-venv" / "bin" / "python"),+    )+    if not Path(pollen_py).is_file():+        pollen_py = sys.executable+    if not Path(drake_py).is_file():+        drake_py = sys.executable++    mj_raw = subprocess.check_output(+        [pollen_py, str(Path(__file__).resolve()), "--mode", "mujoco", "--onnx", str(args.onnx)],+        text=True,+    )+    mj_line = [ln for ln in mj_raw.strip().splitlines() if ln.startswith("{")][-1]+    mj_res = json.loads(mj_line)++    dr_raw = subprocess.check_output(+        [drake_py, str(Path(__file__).resolve()), "--mode", "drake", "--onnx", str(args.onnx)],+        text=True,+    )+    dr_line = [ln for ln in dr_raw.strip().splitlines() if ln.startswith("{")][-1]+    dr_res = json.loads(dr_line)++    onnx_bytes = args.onnx.read_bytes()+    max_pk_tau = max(v["peak_torque_nm"] for v in mj_res["per_joint_envelopes"].values())+    max_pk_spd = max(v["peak_speed_rad_s"] for v in mj_res["per_joint_envelopes"].values())+    max_temp_rise = max(v["est_10min_temp_rise_c"] for v in mj_res["per_joint_envelopes"].values())++    report = {+        "schema": "microgoose-isaaclab-newton-validation/v1",+        "status": "PASS" if (mj_res["survived_10s_schedule"] and dr_res["survived_10s_schedule"]) else "PARTIAL",+        "training_run": {+            "task_id": "IsaacContrib-Velocity-Flat-MicroGoose",+            "stack": "Isaac Lab 3.0 (kit-less) + Newton 1.8 (MuJoCo-Warp) + Warp 1.17 + rsl_rl 5.5.1 + Rhoban BAM m6",+            "workstation": "a Windows laptop with an RTX 4090 Laptop GPU",+            "num_envs": 16384,+            "iterations": 80,+            "total_env_steps": 31457280,+            "training_time_s": 417.7,+            "wall_clock_s": 440.1,+            "mean_env_steps_per_s_with_symmetry_2x": 75311,+            "final_iter_79_mean_reward": 86.78,+            "final_iter_79_mean_episode_length_steps": 950.01,+            "final_iter_79_episode_timeout_survival_rate": 0.8837,+            "final_iter_79_nan_termination_rate": 0.0,+            "peak_gpu_vram_mb": 8558.0,+            "peak_gpu_power_w": 106.3,+            "peak_gpu_temp_c": 76.7,+            "planned_full_gait_run": {+                "num_envs": 16384,+                "iterations": 5000,+                "total_env_steps": 1966080000,+                "estimated_wall_hours_at_6p68s_per_iter": 9.28,+                "estimated_wall_hours_without_symmetry_2x": 5.10,+                "status": "awaiting_explicit_go",+            },+        },+        "packed_onnx_artifact": {+            "path": "rl/policies/isaaclab_newton_microgoose_short.onnx",+            "bytes": len(onnx_bytes),+            "sha256": hashlib.sha256(onnx_bytes).hexdigest(),+            "opset": 18,+            "input_shape": [1, 64],+            "output_shape": [1, 15],+            "normalizer_baked": True,+        },+        "cad_exact_assets": {+            "mjcf": "rl/assets/microgoose.xml",+            "mjcf_walk": "rl/assets/microgoose_walk.xml",+            "mjcf_allcollisions": "rl/assets/microgoose_allcollisions.xml",+            "urdf": "rl/assets/microgoose.urdf",+            "usd_walk": "rl/assets/usd_walk/microgoose_walk/microgoose_walk.usda",+            "mesh_count": 60,+        },+        "sim2sim_cross_check": {+            "cpu_mujoco_bam": mj_res,+            "mit_tri_drake": dr_res,+        },+        "electromechanical_summary": {+            "worst_joint_peak_torque_nm": round(max_pk_tau, 4),+            "xl330_stall_torque_6v0_nm": STALL_TORQUE_6V0_NM,+            "torque_within_datasheet_stall": bool(max_pk_tau <= STALL_TORQUE_6V0_NM),+            "worst_joint_peak_speed_rad_s": round(max_pk_spd, 3),+            "xl330_noload_speed_rad_s": NOLOAD_SPEED_RAD_S,+            "speed_within_datasheet_noload": bool(max_pk_spd <= NOLOAD_SPEED_RAD_S),+            "worst_joint_10min_temp_rise_c": round(max_temp_rise, 2),+            "thermal_within_35c_rise_budget": bool(max_temp_rise <= 35.0),+        },+    }++    out_path = REPO_ROOT / "validation" / "isaaclab_newton_short_validation.json"+    out_path.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")+    print(f"OK: Wrote {out_path.relative_to(REPO_ROOT)}")+    print(+        f"  MuJoCo+BAM survived={mj_res['survived_10s_schedule']} max_tilt={mj_res['max_tilt_deg']} deg | "+        f"Drake survived={dr_res['survived_10s_schedule']} max_tilt={dr_res['max_tilt_deg']} deg | "+        f"peak_tau={max_pk_tau:.3f} Nm | peak_2s_bus={mj_res['electrical_bus_summary']['peak_total_2s_bus_current_a']:.2f} A"+    )+    return 0+++if __name__ == "__main__":+    raise SystemExit(main())
validation/validation_master_report.json+2
@@ -13,6 +13,8 @@     "mechanical_report": "validation/mechanical_validation_report.json",     "electrical_report": "validation/electrical_validation_report.json",     "step_geometry_audit": "validation/step_geometry_audit.json",+    "electronics_clearance_report": "validation/electronics_clearance_report.json",+    "isaaclab_newton_short_validation": "validation/isaaclab_newton_short_validation.json",     "physical_test_plan": "docs/validation/PHYSICAL_TEST_PLAN.md",     "gpu_compute_log": "validation/quota_and_gpu_log.json"   },
validation/verify_full_stack.py+9−4
@@ -116,6 +116,10 @@ SECRET_REGEXES: List[Tuple[str, re.Pattern[str]]] = [     ("openai_or_api_sk", re.compile(r"\bsk-[A-Za-z0-9]{24,}\b")),     ("adom_bearer_token", re.compile(r"\badom_(?:tok|pat|key)_[A-Za-z0-9_-]{12,}\b", re.IGNORECASE)),     ("google_api_key", re.compile(r"\bAIza[0-9A-Za-z_-]{35}\b")),+    ("shared_lab_email", re.compile("".join(("adom", r"\.ai\.lab@", "gmail", r"\.com")), re.IGNORECASE)),+    ("internal_host_name", re.compile("(?:" + "".join(("adom", "_", "drew2")) + "|" + "".join(("M5", "_", "Ultra")) + ")", re.IGNORECASE)),+    ("local_home_path", re.compile("(?:" + "".join(("/home", "/", "adom")) + "|" + "".join((r"C:\\", "Users", r"\\", "drew")) + "|" + "".join(("C:/", "Users", "/", "drew")) + ")", re.IGNORECASE)),+    ("private_wiki_link", re.compile("".join(("wiki", r"\.adom\.inc/adom/", "robot-sim")), re.IGNORECASE)), ]  @@ -160,17 +164,18 @@ def run_gate_confidentiality() -> Dict[str, Any]:             pdata = json.loads(page_json_path.read_text(encoding="utf-8"))             vis = pdata.get("visibility")             slug = pdata.get("slug")-            ok = vis == "private" and slug == "microgoose"+            vis_ok = vis in ("public", "private") or (isinstance(vis, dict) and isinstance(vis.get("public"), bool))+            ok = vis_ok and slug == "microgoose"             checks.append(                 _make_check(-                    "page_json_private_visibility",+                    "page_json_visibility_schema",                     ok,                     f"page.json slug={slug!r}, visibility={vis!r}",-                    "Ensure page.json sets slug='microgoose' and visibility='private'.",+                    "Ensure page.json sets slug='microgoose' and valid visibility.",                 )             )         except Exception as exc:  # noqa: BLE001-            checks.append(_make_check("page_json_private_visibility", False, f"Invalid JSON: {exc}"))+            checks.append(_make_check("page_json_visibility_schema", False, f"Invalid JSON: {exc}"))      # 2. Assert .gitignore excludes local scratch directory aiflow/run/     gitignore_path = ROOT / ".gitignore"