Spaces:
Sleeping
Sleeping
Commit History
-
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 -
Fix CI on 3.11+3.12 and harden Streamlit against any-rerun blank
CI was failing for two unrelated reasons that the new verbose pytest log finally surfaced: * **Python 3.12 — TypeError in KelvinVoigtModel.diagnostics().** ``@dataclass(slots=True)`` replaces the original class object with a freshly constructed slotted one. The ``__class__`` cell that zero-arg ``super()`` captures at compile time still points to the pre- replacement class, but ``self`` is an instance of the post-replacement class --- so the runtime check ``isinstance(self, __class__)`` raises ``TypeError: super(type, obj): obj must be an instance or subtype of type``. Replaced with an explicit ``CableModel.diagnostics(self, ...)`` call; this is correct here because ``CableModel`` is the single base class (no diamond inheritance). * **Python 3.11 — SyntaxError in cdpr/reports/bundle.py:216.** An f-string slot contained ``r.scenario_name.replace('_', r'\_')``. PEP 701 lifted the "no backslash in f-string expression" rule only in 3.12. Hoisted the ``.replace()`` …5cc4e7f -
Streamlit lazy per-tab render + CI diagnostics
GUI (src/cdpr/interface/gui.py): - matplotlib.use("Agg", force=True) defensively in case the module is imported through a non-streamlit_app entry-point. - CDPR_GUI_FRUGAL env knob trims the default workload to 0.5 s / 5 ms so the free-tier Streamlit Cloud worker (~1 GB) does not OOM on the first Run simulation click. - Result tabs are now lazy: each tab renders its figure only after the user clicks "Render <key>", and the figure is cached in session_state for the rest of the session. Previously six matplotlib figures — including the 3D scene — were rendered on every script rerun, which silently killed the worker and left a blank page. - 3D scene is marked "heavy" with an explicit caption; its trajectory is subsampled to 200 points to bound memory. - Plot helpers import matplotlib / plots2d / scene lazily so the initial module load stays cheap. - _log() writes to stderr so the Streamlit Cloud manage-app log shows what the worker was doing right before it died. - Ever…d02aecd
-
Initial commit: cdpr Phases 1-7 + deployment scaffolding
Scientific core (Phase 1): - Pose/Twist/Wrench primitives, SE(3) algebra - Robot configuration (anchors, attachments, inertia, cable limits) - Inverse + forward kinematics, structure matrix - Tension distribution (bounded QP), wrench feasibility - Three per-cable physics: massless, linear-elastic, Irvine catenary - Rigid-body Newton-Euler dynamics, RK4 + semi-implicit integrators - Workspace analysis (WCW, WFW, voxel grid) - Parametric trajectories with retiming - Reference robot catalogue (IPAnema-class, CoGiRo-class) Visualisation + ingestion + reports (Phase 2): - 2D analytics, 3D scene with tension heatmap and singularity indicator - Animation (playback, frame stepping, live streaming) with MP4/GIF export - Workspace volume rendering - Experiment recording (CSV + JSON metadata + reproducibility manifest) - Replay engine + dataset comparison - Publication-grade reports: LaTeX figures, booktabs tables, Markdown - FastAPI service + Streamlit research console - Optional external-physi…5f38e95