Skip to content

ariadne: coph-cars, CoPH driving the cars template (T4, demo 2b, exploratory) - #193

Merged
transfix merged 2 commits into
mainfrom
feat/coph-cars
Nov 19, 2026
Merged

transfix merged 2 commits into
mainfrom
feat/coph-cars

Conversation

@transfix

Copy link
Copy Markdown
Contributor

T4 of libcvc's docs/roadmap/NAV-COPH-ROADMAP.md (demo 2b, §3.3): python -m grl_snam.ariadne coph-cars. Each car of libcvc's cars template (pycvc_gl.cars) carries one grl_snam.coph learner in the demos' profile. Exploratory (§8): this first report leads with the allocation residual and the ledger, and makes no navigation claim.

First measurements (3 paired seeds, 4 RoboRacers at s = 1, 21 m flat square)

Full reports: docs/coph-cars/ (REPORT-random.md, REPORT-convoy.md, the summaries, and a README with the command lines and environment). These are local runs on Windows: cvcpkg Python 3.11 with torch 2.8 (CPU), and pycvc / pycvc_gl from a libcvc Release build at f3cecaf2.

Allocation and ledger (per unit mass, CoPH's frame, summed over 12 cars):

layout arm allocation residual work u_used . dq unallocated work e . dq heat kinetic change ledger residual
random off 0.224 8.313 0.018 16.165 1.891 9.743
random coph 0.224 8.314 0.018 16.166 1.890 9.742
random raw 0.224 8.315 0.018 16.165 1.891 9.741
convoy off 0.272 8.139 0.017 16.570 1.774 10.205
convoy coph 0.272 8.148 0.018 16.590 1.772 10.214
convoy raw 0.253 8.136 0.018 16.610 1.772 10.246
  • About a quarter of CoPH's force is not taken. The cars run at about 0.5 m/s, the allocation's speed floor, where a RoboRacer's lateral capacity is small. Because e is mostly across the motion, its work is small.
  • The ledger does not close on a car.
    • Heat is booked by CoPH's plant at the learner's damping, so the residual is about 1e-15 on CoPH's own plant (a test pins this).
    • On the cars, the residual exceeds the work.
    • The damping fit ends at its lower bound, 0.15, in all 12 cars of every arm. The cars dissipate less than the least damping CoPH's plant allows.

Outcomes:

layout arm arrived mean arrival mean path cars touching excess risk mean / max bytes per car packets (receiver's verdict)
random off 12/12 27.1 s 13.5 m 0 0.000 / 0.000 0 none
random coph 12/12 27.1 s 13.5 m 0 0.001 / 0.005 1.10 MB 70 eligible, 984 unsupported
random raw 12/12 27.1 s 13.5 m 0 0.002 / 0.011 1.31 MB 95 eligible, 959 unsupported
convoy off 12/12 30.4 s 14.4 m 0 0.051 / 0.353 0 none
convoy coph 12/12 30.3 s 14.4 m 0 0.038 / 0.249 1.35 MB 688 eligible, 596 unsupported
convoy raw 12/12 30.3 s 14.4 m 0 0.003 / 0.016 1.60 MB 868 eligible, 410 unsupported
  • The arms are indistinguishable. Risk costs run 5-68 per car. In the convoy only 2 of 12 seed-car pairs differ by more than 0.03: raw readings cut 0.24 and 0.35, and CoPH cut 0.25 in one of them. That is under 1 % of the cost, with the same arrivals and paths. Three seeds measure nothing more.
  • The field fit is right; the routing is what limits the cars.
    • The learner's r tracks the material plane: within 0.015 at 26 of 27 points in a one-car check. The exception was just after a stage advance.
    • Yet the cars drive through the patches, with pi_risk at about 1.005.
    • The profile routes only through sensed footprints (a 1.25 m disc), so it cannot plan around a patch about 2 m across.
  • Most packets are refused. A packet is refused (unsupported) unless one of its anchors lies in the receiver's kept stages. In the demos, refused geometry and fields still reach the maze learner's route store; a car's world has no surveyed network for one.

coph-cars in the template's window

The template's window: four RoboRacers on its (Humvee-sized) flat square, their predicted paths, the coefficient plots, and car 0's V in the Rasters panel.

What lands

  • grl_snam/ariadne/coph_cars.py.

    • The controller, CophCars. It is the template's controller(s, p) and cost().
    • Scale (D4). Froude scaling with one CoPH frame for all cars, so a packet's anchors mean the same place to every receiver.
    • Clocks (D6). CoPH steps every round(0.12 sqrt(s) / tick) ticks (2 at s = 1) and holds u in between.
    • Allocation (D5). Every tick the held u goes through grl_snam.coph.allocation. The learner's Transition carries the mean u_used over the held step, and e is booked as unallocated work.
    • World adapter (§3.3.3):
      • obstacles from pycvc.nav_visible_obstacles within the scaled sensor radius;
      • risk readings at CoPH's 21 sensor points from the risk plane (pycvc.nav_material_build) of a seeded material layer, with one patch across each car's line;
      • a local goal 30 m along the line (D12).
    • The learners.
      • CarLearner: stages follow the car along either axis (the demos' learner's rule), with the profile's own footprint routing.
      • RawCarLearner: the hazard demo's raw-readings export.
    • Panels. The coeffs are pi_risk, pi_barrier, damping and version, then the ledger columns, all logged. cost() draws the chosen car's V (ctl.view 0) or r (1).
    • The template's predicted paths. pycvc_gl.cars.rollout calls the controller on imagined states. Those calls get the held u allocated and teach the learners nothing.
    • --arms [off coph raw]. Headless over paired seeds on the template's script API (Cars), random or --layout convoy. It writes summary.json and REPORT.md, and --logs keeps the template's logs.
  • tests/test_ariadne_coph_cars.py (22 tests). Most run on a stand-in CarsState and a kinematic bicycle, so they need torch but not pycvc_gl. They check:

    • scaling and the tick count;
    • the held u and the per-tick allocation;
    • that the learner sees u_used;
    • the ledger closing on CoPH's own plant;
    • potential_grid against model.potential;
    • spatial stage advances;
    • that rollouts leave the learners alone;
    • the summary's excess risk.

    Four tests need the template: an episode and its log, the template's own rollout, the arms' report, and the without-the-template message.

  • The port's README section and its registry entry.

Where the spec met the template

  • A template controller sees no world grid. CarsState.world is the world's kind. Inside pycvc_gl.cars.run (the window), obstacles therefore come from the cars' ray hits. The arms run on the script API, where the controller holds the World and uses nav_visible_obstacles as specified.
  • The template's flat square is a Humvee's, flat_world(4.84), 194 m across, whatever the vehicle. The arms build a RoboRacer-sized one (D3).
  • The template's arrival radius is at least 3 m. The arms use 1.5 car lengths (0.8 m).
  • The template's worlds carry no material layer. The adapter lays seeded patches and reads nav_material_build's r~. A fog belief would hold the same values where seen, and CoPH reads only within its sensor radius.
  • No surveyed network on a car's world. Packets help only where stages overlap (above), and routing cannot leave the sensed footprints. Both are properties of the profile without the maze learner's route store, not of this port. They are the first thing to settle before a navigation question can be asked of 2b.
  • The tick is 0.06 s (pycvc.SIM_TICK), not 0.05 s. At s = 1 that makes CoPH's 0.12 s exactly two ticks.

Checks

  • Locally: tests/test_ariadne_coph_cars.py 22/22 and tests/test_ariadne_ports.py pass. black 26.5.1 and ruff are clean.
  • Not run: Humvees on Austin at s ≈ 25 come after this, as D3 orders.

Merge is left to Joe.

libcvc's NAV-COPH-ROADMAP.md §3.3: one grl_snam.coph learner per car of libcvc's cars template
(pycvc_gl.cars), in the demos' profile.

- Froude scaling with one CoPH frame for all cars; CoPH steps every 0.12 sqrt(s) s (two ticks at
  s = 1) and holds its force (D4, D6).
- The held force is allocated every tick with grl_snam.coph.allocation; the learner observes the
  mean force the car took, and the rest is booked as the unallocated work (D5).
- World adapter: obstacles from pycvc.nav_visible_obstacles within the scaled sensor radius; risk
  readings from the risk plane (pycvc.nav_material_build) of a seeded material layer, one patch
  across each car's line; a local goal 30 m along the line (D12).
- CarLearner: stages follow the car along either axis (the demos' learner's rule), with the
  profile's own footprint routing. RawCarLearner sends raw readings, as the hazard demo's raw arm.
- Panels: coeffs pi_risk, pi_barrier, damping, version, then the ledger; cost() draws V or r.
  The template's predicted paths (rollout) get the held force and teach the learners nothing.
- --arms: off, coph and raw, headless over paired seeds on the template's script API, on a
  RoboRacer-sized flat square (random or convoy layout); summary.json and REPORT.md lead with the
  allocation residual and the ledger.

Where the template does not fit the spec: a template controller sees no world grid (the window
uses ray hits as obstacles), and the template's flat square is a Humvee's.
Three paired seeds, four RoboRacers at s = 1, random and convoy layouts: the two REPORT.md files
and summaries the arms wrote, the template window's picture, and a README with the command lines,
the environment and what the numbers show (allocation residual 0.22-0.27; the ledger does not
close on a car, damping at its 0.15 floor in every car; the arms differ by under 1 % of risk cost).
@transfix
transfix merged commit 24caf90 into main Nov 19, 2026
5 of 8 checks passed
transfix added a commit that referenced this pull request Nov 20, 2026
…-deps (2.2.1) (#197)

ci.yml and publish-cvcpkg.yml installed the dependency closure with
transfix/libcvc-deps' cvcpkg-install action, which pip-installs the
libcvc-deps tree it checks out: cvcpkg 2.2.1, frozen since the repo was
archived on 2026-09-16.

While libcvc 4.0.1 was half-published, CI here got pycvc 4.0.0 beside
libcvc 4.0.1 and pycvc-gl 4.0.1 beside cvcgl 4.0.0 (#193). The published
libcvc rows now pin their own release (transfix/libcvc#1377 plus a
backfill of the 1,116 rows already on cvcpkg.org). But 2.2.1's resolver
checks a candidate only against the pins of packages already picked, so a
resolver simulation on the live catalog still mixes releases in two
half-published states. cvcpkg 2.5.1 and later check both ways
(cy-pca/cvcpkg#251) and resolve all twelve to one release.

Both now use cy-pca/cvcpkg's copy of the same action at cvcpkg-v2.5.15,
told to check out and pip-install cy-pca/cvcpkg at that tag. The
checkout still lands in _libcvc-deps, so ruff's --exclude stands.
publish-cvcpkg.yml's separate 'cvcpkg[publish]' installs are unchanged.
transfix added a commit to transfix/volrover that referenced this pull request Nov 20, 2026
…ed libcvc-deps (#53)

The Windows lane installed cvc-requirements.yaml with transfix/libcvc-deps'
cvcpkg-install action, which pip-installs that repo's tree (cvcpkg 2.2.1,
frozen since it was archived on 2026-09-16). It then force-reinstalled all
of libcvc-deps from git so its bundled recipes could build GLEW from source.

Now the action is cy-pca/cvcpkg's copy at cvcpkg-v2.5.15, told to check out
and pip-install cy-pca/cvcpkg at that tag, as publish-cvcpkg.yml already
does. The reinstall and the GLEW source fallback are gone: GLEW is in
cvc-requirements.yaml and has a windows/x86_64 release/shared bundle on the
catalog (2.2.0+cvc.2). In their place, one step fails at once if the
action's install failed (it reports that as an empty path), and checks that
GL/glew.h is in the prefix.

2.2.1's resolver also checks only one direction, so it can mix releases of
a package family that is half-published (CVC-Lab/GRL-SNAM#193); 2.5.1 and
later check both (cy-pca/cvcpkg#251).

Co-authored-by: Joe Rivera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant