Repository navigation
scrub page: 30 fps, the Humvee's model, the pause, how far apart the runs drive, real tables, a legend - #206
Merged
Merged
Conversation
…y drive, real tables Joe's four problems on the Pages scrub page, and his two asks: - Jerky: each frame rewrote six tables (set_table rewrites a whole subtree) and every sixth frame removed and re-added both trails. Now the tables follow the play head at most every 0.2 s while it plays, writing only the cells that changed (live.set_rows), and each run's whole path is drawn once per checkpoint. Python per frame natively: 25.6 -> ~1.5 ms. The 41-row table moves to its own window (Checkpoints; Table opens it): walking its ~410 cells costs 12-15 ms a frame in wasm. - No Humvees: the page orbited the whole city, and drew boxes (pycvc_gl finds Humvee.glb only in a prefix or Austin's bundle). The page ships vehicle-humvee's glTF where pycvc_gl looks (main.py makes the page that prefix), credited in THIRD_PARTY_NOTICES.md, and opens on the follow camera. Checkpoint k's car is opaque, step 0's see-through. - No pause: Paused, Step, Restart and Speed are in the Episode window. - The scrub does nothing: on the default set every checkpoint drives within 0.45 m of step 0. apart_m (the farthest k's car gets from step 0's) is a metric, a table column and two lines in the Scrub window, which say when the two drive as one. Most apart picks the checkpoint farthest from step 0; --at far opens on it; --data-set / --plant pick the run --view opens on. The page opens on the set whose checkpoints part most (fixed/retrain, whose pick is step 0 on every seed), at its farthest checkpoint. - Tables: one grid per table whose cells are its columns (header, rule, values), auto widths, borders, so the columns are the table's (Ariadne 4.0.0 has no table widget, and repeat: made every row its own table). - Windows have no fixed size: each fits what it shows, as far as the view's edge.
…lay get it too) Joe asked what the blue and orange cubes over the car mean. live.ghost_legend writes a line per arm in use, in its colour slot's colour (stats_panels.ari's text rows, one per slot c0..c7): '<colour> cube: <arm name> (<note>)', then 'see-through/solid car, <colour> path'; and what cubes stacked over one car (the runs at the same spot) and the yellow post (the goal) mean. update_ghosts writes it when it changes; the scrubber notes step 0 as untrained and k as the checkpoint picked.
…s prefix has it (CI's does)
# Conflicts: # pages/README.md
transfix
added a commit
to transfix/grl-snam-demos
that referenced
this pull request
Nov 24, 2026
The scrub page's cars are boxes on the site: pycvc_gl finds the Humvee's glTF only in an install prefix or Austin's bundle. CVC-Lab/GRL-SNAM#206 ships it with the page from --python's prefix (share/cvc-scenes/shared/Humvee.glb, CC BY 4.0, credited in the page's THIRD_PARTY_NOTICES.md); this installs vehicle-humvee into the deploy closure. Harmless before #206 lands.
# Conflicts: # pages/README.md
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
… into fix/scrub-world-fingerprint
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.
Joe tried the scrub page (transfix.github.io/grl-snam-demos/scrub/) on 2026-11-23 and found four problems: no Humvees, jerky movement, no pause, and a scrub that seemed to do nothing. He also asked for real table columns and for windows that fit their content. This fixes all six, and adds the legend for the cubes over the cars that Joe asked for afterwards. The site needs one more line, in transfix/grl-snam-demos#3 (installs
vehicle-humvee); without it the page's cars stay boxes.Jerky: 10 → 30 fps
The page was measured in headless Chrome 152 on the GPU (ANGLE GL, GTX 1650, 1600×900). Both builds use the same 30 runs, deployed today with libcvc 4.0.0, and measure 15 s of playback each, back to back:
Two causes, found with cProfile over 300 offscreen frames natively (25.6 ms of Python a frame):
update_ghostsremoved and re-added both trails (add_path25 ms,removeGraphics12.5 ms, each twice), about 75 ms natively and far more in wasm. A replay knows the whole path up front. The view now draws each run's whole path once per checkpoint, after the pick holds still for 0.25 s, so dragging the slider draws none.st["tracks"] = Nonetellsupdate_ghoststo skip its running tracks; live and replay are unchanged.set_tablesix times, 1.3 ms each, becauseset_treeremoves the subtree and rewrites every cell. Now the tables follow the play head at most every 0.2 s while it plays, and at once for a new checkpoint, run or arm.live.set_rowsalso writes only the cells that changed.After both: about 1.5 ms of Python a frame. The rest is the Ariadne walk. The 41-row checkpoint table (about 410 text cells) cost 12–15 ms a frame in wasm on its own (31 vs 20 fps), and the row-major layout costs the same. So the table moved to its own Checkpoints window. The page opens with it closed; Table in Scrub opens it.
No Humvees
Humvee.glbonly in an install prefix or in Austin's bundle, and cvcpkg.org sends no CORS for github.io.assemble.pynow shipsvehicle-humvee's glTF (0.6 MB, CC BY 4.0) atshare/cvc-scenes/shared/Humvee.glb, adds its credit (from the glTF's ownasset.extras: "Low Poly Humvee FREE" by MadTrollStudio) to the page's THIRD_PARTY_NOTICES.md, andmain.pypointsCVC_PREFIXat the page.--vehicle-modelnames the file; the default is that path in--python's prefix. pages.yml installs the package.scrub: the cars are the Humvee's model), and the smoke checks that line whenever the page ships the model.No pause
The Episode window now has Paused, Step, Restart and Speed. Scrub → Paused and the Simulation window are still there.
The scrub does nothing
The slider works. Dragging it in the page steps the checkpoint through 29 → 2 continuously, with no fight from the snapped write-back. But on the set the page opened on, every checkpoint drives like step 0:
apart_mis new: the farthest checkpoint k's car gets from step 0's at the same tick. It is in the report and the Metric combo, and in the table as apart (m). Reports without it are measured from the run logs when a checkpoint is shown.--at faropens there, and--data-set/--plantpick the run--viewopens on.assemble.open_settakes the medianapart_mper set and prints each one: on the Humvee that is retrain 0.1 m, world-units 1.0 m, fixed/retrain 9.3 m. fixed/retrain's pick is step 0 on every seed, so the page opens at its farthest checkpoint (--at far): seed 0 at step 2800, 80.9 m from step 0. That one is a dry-basin drive the README already describes (186 ticks "penetrating" libcvc 4.0.0's mislabelled water).Per set, measured on today's deploy (median; each seed's farthest):
A legend for the cubes
Joe asked what the blue and orange cubes over the car mean. They are the per-arm tags
live.draw_ghostsdraws, stacked so both show when the cars overlap. The Stats window now ends with a legend headed "in the scene":_arms.SLOTS), with the arm's real name: "blue cube: step 0 (untrained) / see-through car, blue path" and "orange cube: step 2800 (the checkpoint picked) / solid car, orange path";live.ghost_legendbuilds it from the arms' names and slots, andupdate_ghostswrites it whenever it changes. The legend sits in stats_panels.ari, solive --armsandreplayshow it too, with their own arm names.Real tables, and windows that fit
col_widthsis an ImGui table, butrepeat:emits a whole group per instance, so every row was its own one-row table and the header another, lined up only by fixed pixel widths.autowidths fit each column to its widest cell, and the grid has borders.size:. Each fits what it shows, as far as the view's edge, withmin:widths where a chart needs room. Stats and Episode are placed past the view's right and bottom edges, so the view moves them in to its corners. live.ari and replay.ari still set their own sizes.Checked
apartand its texts,ghost_legend,first_run,set_rows,open_set,model_credit, Most apart in the view,--view --data-set --plant --at far, and assemble shipping the model.pages/smoke.mjspasses 5/5 under SwiftShader, including the new cars check. In the page by CDP: Table opens Checkpoints, Paused pauses, Next and Most apart step, the Scrub drag scrubs, and the Set combo switches.scenario.worldas{settings, stats}instead of one flat dict, and the check compares the two as text. The generator settings are identical. Reports deployed with the page's own code match exactly, and the site deploys its runs with the same code, so the site never shows this.Not in this PR
LIBCVC_REF: v4.0.0is set here and in grl-snam-demos, and the page must run the deploy's libcvc because it rebuilds the generated world itself. libcvc is at v4.0.6, and the catalog has 4.0.6 of libcvc, cvcgl, pycvc-cp312 and pycvc-gl-cp312. Moving the pin brings world: the generated world's water is at water_level_m, and a road's bank is dry transfix/libcvc#1374 (the phantom deep water) and means rebuilding ariglx-web, redeploying the 30 runs and re-measuring the README's numbers. arigl-web: a download that breaks off is fetched again past the cache, and a failure names the file transfix/libcvc#1505, the download retry, is still open, so no release has it yet.setUseSingleColorthe Humvee model renders dark brown in most light (orange in some), so the tags carry the colour.