feat: checkpoint contact-cycle evaluation and RootXY PPO progress

Consolidate next-stage docs, archive superseded narratives, and preserve frozen document inputs. Retain invalid P2 pairs, partial RootXY training, failed attempts and nonselectable checkpoints as explicit limitations.

Include supervised evaluation/training, desktop GPU admission, bounded evidence and atomic-publication monitor repairs with CPU regressions. Ignore local dotenv configuration.

Validation: 1403 passed, 6 skipped for contact-cycle and related contracts/CLI tests. Full-suite legacy ABI and registration tests require Python 3.12/Torch 2.10/pxr; no runtime checks relaxed. No new physical run or accepted skill.
This commit is contained in:
2026-10-15 14:18:17 +08:00
parent 093ab883be
commit 9fe9d27865
147 changed files with 29796 additions and 862 deletions
+28
View File
@@ -3,6 +3,7 @@
import argparse
import json
import math
import os
import shutil
import subprocess
@@ -74,6 +75,14 @@ def evaluate(env, args, policy, inputs):
original_loads, original_update = s.apply_loads, env.scene.update
frames = 0
shots, actions, memory = [], [], []
arrows = None
if args.force_arrows:
from standing_force_visualizer import DisturbanceForceArrows
arrows = DisturbanceForceArrows(args.force_arrow_scale)
print(
f"Orange arrows: actual world disturbance force, {args.force_arrow_scale:g} m/N; no torque/guide/reaction"
)
def apply_loads():
s.last_guide[:] = s.guidance()
@@ -87,6 +96,8 @@ def evaluate(env, args, policy, inputs):
body_ids=s.payload_ids,
is_global=True,
)
if arrows is not None and frames % env.cfg.decimation == 0:
arrows.update(s) # display only, after applying this control step's actual load
def observe(dt):
nonlocal frames
@@ -135,6 +146,8 @@ def evaluate(env, args, policy, inputs):
print(f"{args.mode} {i + 1}/{steps}", flush=True)
finally:
s.apply_loads, env.scene.update = original_loads, original_update
if arrows is not None:
arrows.close()
cpu = {k: v[:frames].cpu() for k, v in trace.items()}
torch.save(cpu, args.output / "physics_trace.pt")
if shots:
@@ -176,6 +189,11 @@ def evaluate(env, args, policy, inputs):
passed=all(result["gates"].values()),
mode=args.mode,
controller=args.controller,
visualization={
"force_arrows": args.force_arrows,
"force_arrow_scale_m_per_N": args.force_arrow_scale,
"source": "actual applied disturbance force in world frame; excludes torque, guide, reaction",
},
input_hash=meta["input_hash"],
metadata=meta,
accepted_skill=False,
@@ -194,8 +212,16 @@ def main():
parser.add_argument("--mode", choices=("holdout", "full", "stability", "exploratory"), required=True)
parser.add_argument("--controller", choices=("policy", "hold"), default="policy")
parser.add_argument("--output", type=Path, required=True)
parser.add_argument(
"--force-arrows", action="store_true", help="Draw actual disturbance force in Kit (visual only)"
)
parser.add_argument(
"--force-arrow-scale", type=float, default=0.03, help="Arrow length per newton, m/N (default: 0.03)"
)
add_launcher_args(parser)
args = parser.parse_args()
if not math.isfinite(args.force_arrow_scale) or args.force_arrow_scale <= 0:
parser.error("--force-arrow-scale must be finite and positive")
args.output.mkdir(parents=True, exist_ok=False)
write_json(args.output / "result.json", {"passed": False, "status": "running", "accepted_skill": False})
app = AppLauncher(args).app
@@ -221,6 +247,8 @@ def main():
"scripts/runtime_common.py",
"scripts/supervise_sim.py",
]
if args.force_arrows:
source_paths.append("scripts/standing_force_visualizer.py")
training_identity = json.loads((args.package / "binding.json").read_text())["training_identity"]
for path, digest in training_identity["sources"].items():
if sha256(path) != digest: