Repository navigation
nav_stats: drive telemetry base stats (Track 1d) — completes Track 1 - #424
Merged
Merged
Conversation
Capture the deep drive.cpp telemetry drive_step otherwise discards, additive /
off-by-default, and reduce it per vehicle in the collector.
Drive kernel (drive.{h,cpp}, material.h):
- new drive_telemetry {alpha,beta,gamma,lam_soft, mu,mrisk, ext_fx/fy, steer,
curvature, clearance, binding}.
- rollout_impl gains an optional `drive_telemetry* tel`; write-only temporaries
capture the values it already computes and the terminal `if (tel)` write runs
AFTER o/th/sp/minclr are stored, so a null tel is byte-identical on every path
(plain / material / ext). clearance + binding are the per-tick MIN over
substeps (barrier active any substep); steer/mu/mrisk are the last substep.
- drive_step / _material / _ext gain a trailing `tel` and route straight to
rollout_impl, leaving the public bicycle_rollout* (training) API untouched.
Stats (nav_stats.{h,cpp}):
- stdlib-only drive_sample POD (nav_stats.h stays free of drive.h); caller maps
drive_telemetry -> drive_sample (ext_mag = std::hypot). nav_samplers.drive feed.
- veh_nav_stats.{drive_steps, alpha/beta/gamma_mean, mu_mean/mu_min,
mrisk_mean/max, ext_force_mean, steer_abs_mean/max, binding_steps}; collector
accumulates in step(), finalizes means in finish().
- nav_scorecard.{mean_alpha/beta/gamma/mu/mrisk/ext_force} over drive-carrying
runs. JSON emit for all (mu_min via num_sentinel).
Byte-identity pinned by DriveTelemetry.NullTelIsByteIdentical* on the plain,
material and ext paths (the rollout gradient/parity tests are unmoved too). New
DriveTelemetryReduction case pins the collector math against hand-computed values.
The 5 original corpus cases stay byte-identical. Contract (last-substep vs
per-tick-min, ext-magnitude collapse, drive_sample<->drive_telemetry lockstep,
int64 widths) hardened per an adversarial review. Roadmap: Track 1 complete.
9/9 nav_stats_test + 27 nav_material_test pass.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track 1d — the final Track-1 sub-PR (follows #421/#422/#423). Captures the deep
drive.cpptelemetrydrive_stepotherwise discards (mu/mrisk/ext_force/CoefMLPα,β,γ+lam/steer/binding) and reduces it per vehicle. Additive / off-by-default.Drive kernel (
drive.{h,cpp},material.h)drive_telemetrystruct.rollout_implgains an optionaldrive_telemetry* tel. Write-only temporaries capture values the kernel already computes; the terminalif (tel)write runs aftero/th/sp/minclrare stored, so a nulltelis byte-identical on every path (plain / material / ext).clearance+bindingare the per-tick min over substeps (barrier active any substep);steer/mu/mriskare the last substep.drive_step/_material/_extgain a trailingteland route straight torollout_impl, leaving the publicbicycle_rollout*(training) API untouched.Stats (
nav_stats.{h,cpp})drive_samplePOD →nav_stats.hstays free ofdrive.h; the caller mapsdrive_telemetry → drive_sample(ext_mag = std::hypot).nav_samplers.drivefeed.veh_nav_stats.{drive_steps, alpha/beta/gamma_mean, mu_mean/mu_min, mrisk_mean/max, ext_force_mean, steer_abs_mean/max, binding_steps};nav_scorecard.{mean_alpha/beta/gamma/mu/mrisk/ext_force}. JSON emit (mu_minvianum_sentinel).Byte-identity (the load-bearing invariant)
Pinned by
DriveTelemetry.NullTelIsByteIdenticalAndPopulates(plain) andNullTelByteIdenticalOnMaterialAndExtPaths(material + ext). The existing rollout gradient/parity tests are unmoved (they'd break if telemetry perturbed the rollout numerics). 42 rollout/material/train tests pass.Review
4-lens adversarial review (byte-identity / correctness / serialization+parity / portability+API): no blockers or majors — byte-identity holds by construction, the reroute is arg-for-arg identical to the old wrappers, reductions verified against hand-computed values. Fixes applied:
binding/clearancenow use the per-tickminclr(was last-substep — undercounted mid-tick engagement fornsub>1),std::hypotnamed in the contract,drive_telemetry↔drive_samplelockstep noted, and the byte-identity test extended to the material + ext paths.Test
Completes Track 1 (libcvc
cvc::navbase). Next: Track 2 (grl-snam Python parity twin) and Track 3 (downstream extension layer + the state-tree raster bridge).