Spaces:
Sleeping
Sleeping
Commit History
-
Phase-2 hardening sweep: parametric robots, URL CSVs, schema aliases
Implements all 14 improvements proposed in the post-mortem of the dissertation_8cable CSV failure log: #1 Register dissertation_8cable in the canonical build_robot() factory. The directive geometry moved from scripts/run_simulation.py into src/cdpr/robots/dissertation.py and is now reachable through the same public API as the catalog robots. Replay / PPO / SAC no longer crash on CSVs produced by --preset dissertation-circle. #2 Persist the full robot description (anchors, attachments, mass, inertia, tension bounds) in manifest.json under a new "robot_spec" block. A manifest-aware helper, robot_from_manifest_or_catalog, rebuilds any robot from this block --- catalog OR custom JSON OR inline override. Phase-2 workflows now work on any run_simulation.py output regardless of geometry source. #3 Cable-indexed column filter requires a numeric suffix. ``Layer`` no longer crashes the loader with int('ayer'). Same fix in train_from_csv, compare_…bdbf666 -
Physics-correct circular tracking: closed-loop PD + bounded tensions
The previous Phase-1 runs were producing tensions of 1289 N and 11778 N under nominally 5-500 N constraints. Two distinct defects were masquerading as one symptom: 1. `simulate()` was being called with ``controller=None``, which in the simulator means *ignore the reference trajectory and just hold the initial pose*. The reference was being constructed but never tracked. The QP was then asked to balance gravity at the start pose only. 2. The catalog robot's tension limits (IPAnema = 20-2000 N, CoGiRo = 50-20000 N) were what the QP enforced --- not the directive's 5-500 N spec. The 1289 N number was lawful under the catalog's bounds, just not the directive's. Fixes (scripts/run_simulation.py): * New CLI flags: ``--controller {none,pd,ct}``, ``--kp-pos``, ``--kp-rot``, ``--kd-pos``, ``--kd-rot``, ``--t-min``, ``--t-max``, ``--preset dissertation-circle``. Default controller is now PD. * New ``--robot dissertation_8cable`` factory builds the directive's exact…48653ae -
Unified Phase-1 + Phase-2 workflow with dual web/PowerShell parity
This commit fulfils the unified recovery directive: Phase-1 defined- trajectory simulation and Phase-2 CSV-driven training are now first- class on both the PowerShell terminal and the Streamlit web interface, with the CLI as the guaranteed scientific fallback while the deployed Streamlit Cloud worker remains intermittently flaky. Phase-1 (scripts/run_simulation.py): * 13 publication-grade figures per run (was 6) --- position, velocity, angular_velocity, acceleration, cable_tensions, cable_lengths, cable_stretch, tracking_error, rms_error_evolution, condition_number, trajectory_xy/_xz/_yz, scene_3d. Each plot wrapped in try/except so a single failure never drops the others; matplotlib figures are explicitly closed after savefig to bound worker memory. Phase-2 (scripts/train_from_csv.py + scripts/compare_models.py): * Five workflows on the CSVs Phase-1 emits: replay (analytic re-sim), mlp + pinn (supervised inverse-dynamics fit, z-scored I/O so loss curves are interpretab…310e4a9 -
Add PowerShell CLI escape hatch + Streamlit diagnostic fallback
The deployed Streamlit Cloud worker keeps blanking on every interaction even after the GUI was reconciled with the real SimulationRequest / TrajectorySpec contract --- the issue is now almost certainly in Streamlit Cloud's runtime, not in the Python script. Render, Cloudflare Pages, Supabase, and GitHub Actions are all green; only the Streamlit worker is unreliable. This commit lands two escape hatches plus one diagnostic toggle so the user is not blocked by the Cloud-side flakiness: scripts/run_simulation.py PowerShell-friendly local driver: python scripts/run_simulation.py --robot ipanema_class --kind circle produces every plot the Streamlit GUI would have shown, plus a timeseries CSV and a manifest with the git hash, into ./out/<robot>-<kind>-<timestamp>/. Each plot is wrapped in its own try/except so a single render failure does not drop the others. scripts/call_render.ps1 PowerShell wrapper around the live FastAPI on Render: .\scripts\call_render.…6045fb3