Repository navigation
demos: pace the sim off the world clock; gate the lab demo on vrhost - #79
Merged
Merged
Conversation
The austin-freedrive and austin-learned live demos stepped the navigator a fixed 3 times per drawn frame, so the drive advanced with the frame rate — ~10x real time at 60 fps and faster on a quicker display. Add a SimPacer (the Python twin of the native cvc::nav demos' fixed-timestep accumulator in nav_common.h): accumulate wall time and run a whole number of fixed sim ticks per frame, so one nav.step()/nav-substep == meta["dt"] of sim time and the drive runs in real time on any display rate. SIM_SPEED (default 1.0) tunes the pace without re-coupling to the frame rate. The lab demo builds its scene through VolRover3's live host (vrhost) and has no standalone path, so 'grl-snam demo lab' (standalone by default) died with an opaque ImportError. Flag it REQUIRES_VOLROVER3 and have 'grl-snam demo' stop with a clear message pointing at --volrover3 when vrhost isn't importable.
transfix
added a commit
that referenced
this pull request
Sep 16, 2026
Republish the per-interpreter columns so cvcpkg users pick up GRL-SNAM #79: the austin_freedrive/austin_learned live demos now pace the sim off the world clock (SimPacer) instead of the frame rate, and 'grl-snam demo lab' shows a clear --volrover3 message when vrhost is absent. source.type is vendored, so a repack from this tree ships the new code; the publish workflow's next-revision computes cvc.5 (cvc.4 is the highest published).
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.
Two live-demo fixes
1. Sim runs off the world clock, not the frame rate
austin-freedriveandaustin-learnedstepped the navigator a fixed 3 times per drawn frame, so the drive advanced with the display rate — roughly 10× real time at 60 fps, and faster the quicker the window drew. The native cvc::nav demos avoid this with a fixed-timestep accumulator (SimPacerinlibcvc/.../nav_common.h).This adds the Python twin,
SimPacer, todemos/_common.py: accumulate wall seconds and run a whole number of fixedsim_dtticks per frame. Onenav.step()(freedrive) /_nav_step()(learned) advancesmeta["dt"]seconds of sim time, so ticking at that wall rate is real time on any display rate. A stall is capped (8 ticks) so a hitch drops time instead of fast-forwarding.SIM_SPEED(default1.0= real time) tunes the pace without ever re-coupling to the frame rate.tests/test_sim_pacer.py): 30/60/144/1000 fps all yield the same ticks/sec ≈ real time; speed scales the rate; a stall caps.austin-patrol/austin-plannerdon't have this loop (planner'srange(9000)is one-time planning), so they're untouched.2.
grl-snam demo labexplains it needs VolRover3The lab demo's
setup()/step()build the scene through VolRover3's live host (vrhost) — there's no standalone window path for the animated job — sogrl-snam demo lab(standalone by default) died with an opaqueImportErrordeep in setup. Now the module is flaggedREQUIRES_VOLROVER3andgrl-snam demostops with:The static
grl-snam lab-democommand still runs standalone unchanged.Verified
SimPacermath + stall cap (unit tests, 4/4).grl-snam demo lab→ the message above (vrhost absent);grl-snam demo austin-freedriveis not gated.tests/test_cli.pystill green.