Skip to content

cvcGL: nav_stats state-tree publisher (base + formation) — Track 3b-1 - #425

Merged
transfix merged 1 commit into
masterfrom
feat/nav-stats-publish
Sep 26, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/nav-stats-publish

Conversation

@transfix

@transfix transfix commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Track 3b-1 — the base half of the state-tree bridge. inc/cvc/gl/nav_stats_publish.{h,cpp}: publish_nav_stats() bridges a base cvc::nav::episode_nav_stats snapshot into the scene's cvc::state tree under <prefix>.nav_stats.* via the scene's cvc::gl::state_publisher (value lane, coalesced, off the render path) — so realtime ImGui / the cvcGL UI DSL read stats from state paths.

Layout

  • .meta.{alive, scene_id, checkpoint, seed, n_vehicles, tick, dt_s, complete}
  • .episode.{arrived, success, makespan_s, mean_ttg_s, penetration_pct, total_veh_contacts, min_sep_m, mean_path_ratio, mean_turn_total_rad, total_fuel}
  • .coverage.{explored/visible/believed_free/phantom_frac}
  • per-convoy .formation.<id>.{followers, slot_error_mean_m, form_arrival} — form_arrival = all followers in-slot and anchor arrived (the base scorecard's form_mission convention, per convoy)
  • compact .veh.<i>.{...} live tier (strided by per_vehicle_every)

Keyed by the SceneGraph prefix, so concurrent sims under distinct prefixes never collide. This is the base half; an extension layer's application-specific sub-record (3b-3) and the belief/fog raster handles (data lane, 3b-2) publish separately.

Test

New cvcgl_nav_stats_publish round-trips the whole layout (publish → flush → value<T>()), incl. the per-convoy formation aggregate + the coalesced last-value. libcvc CI builds cvcGL and runs it. Verified locally: cvcgl_nav_stats_publish: OK.

Next: 3b-2 (raster handles for realtime viz — VolumeNode path + a sim_world::plane_version accessor) and 3b-3 (downstream extension-layer publisher + app wiring + a per-sim nav_stats.sims registry).

Add inc/cvc/gl/nav_stats_publish.{h,cpp}: publish_nav_stats() bridges a base
cvc::nav::episode_nav_stats snapshot into the scene's cvc::state tree under
<prefix>.nav_stats.* via the scene's cvc::gl::state_publisher (value lane,
coalesced, off the render path), for realtime ImGui / the cvcGL UI DSL (SPEC 1,
CVC-DBG/cvcdbg docs/stats-statetree-and-training.md).

Layout: .meta.{alive,scene_id,checkpoint,seed,n_vehicles,tick,dt_s,complete},
.episode.{arrived,success,makespan_s,mean_ttg_s,penetration_pct,total_veh_contacts,
min_sep_m,mean_path_ratio,mean_turn_total_rad,total_fuel}, .coverage.{explored/
visible/believed_free/phantom_frac}, per-convoy .formation.<id>.{followers,
slot_error_mean_m,form_arrival} (form_arrival = all followers in-slot AND anchor
arrived — the base scorecard's form_mission convention, per convoy), and a compact
.veh.<i>.{...} live tier (strided by per_vehicle_every). Keyed by the SceneGraph
prefix so concurrent sims never collide. This is the BASE half; the cvc::dbg RF
sub-record and the belief/fog RASTER handles (data() lane) publish separately.

New cvcgl_nav_stats_publish test round-trips the layout through publish -> flush ->
value<T>() reads (meta/episode/coverage/per-veh/per-convoy + the coalesced last
value). libcvc CI builds cvcGL + runs it.
@transfix
transfix force-pushed the feat/nav-stats-publish branch from 0a66b01 to 95c352d Compare September 26, 2026 02:59
@transfix
transfix merged commit 74459f5 into master Sep 26, 2026
17 of 18 checks passed
@transfix
transfix deleted the feat/nav-stats-publish branch September 26, 2026 04:27
transfix added a commit that referenced this pull request Sep 26, 2026
…b-3 PRs open (#427)

Reflect actual state: Track 1 (a-d) MERGED (#421-#424), Track 2 MERGED (GRL-SNAM#96),
Track 3a MERGED (cvcdbg#128/#129), Track 3b-1 MERGED (#425). Track 3b-2 (raster bridge,
#426) + Track 3b-3 (RF publisher + demo3 wiring, cvcdbg#130) PRs open in CI. Document the
3b split (3b-1 base/formation, 3b-2 version-gated volume rasters, 3b-3 RF+demo) and the
Track-4 reserved RF fields (composite_score / cvar_jam_loss / worst_jam_loss).
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