Repository navigation
Ariadne: grl-snam ariadne cars runs libcvc's multi-car template, with GRL-SNAM's policy as a baseline - #155
Merged
Merged
Conversation
…tic or Jolt physics grl-snam ariadne cars runs N Ackermann cars that a controller of the user's own drives: controller(s, p) at the top of a copyable cars.py gets every car's state (pose, speed, wheel angle, goal, range rays, collisions, limits) as numpy arrays each tick and returns (steer, accel) per car, bypassing the navigator. --copy DIR writes cars.py and cars.ari to edit. The document's sliders feed the controller's parameters (ctl.*), New goals / Reset call back into Python, and the panels show a row per car and two plots. --headless --frames N --log run.npz|csv runs without GL and records every tick's states and commands. grl_snam.cars is the library under it: plants kinematic (nav's bicycle), jolt (roboracer, humvee, or a comma list cycled over the cars) and dynamic; worlds flat, blocks (scaled to the cars) and austin. With a pycvc that has nav_sim_world_override (transfix/libcvc#1031) every plant runs in libcvc's sim_world with the command in its navigator's place; with an older pycvc, kinematic runs the same bicycle in numpy and jolt drives physics_world.drive (no reverse). navigator=True runs libcvc's navigator as a baseline. The README, the quickstart and PLANTS.md link the Ariadne ports and the template; grl_snam/ariadne/README.md gains a 'Write your own multi-car controller' section: the state, the panels, why the plant is the host's choice and not the document's, what kinematic vs Jolt means for a controller (steering rate, the driver model, tire slip, measured), and batch runs. tests/test_cars.py: 23 tests (3 need the override binding and skip without it; none needs torch).
…s data store --world austin drew the city with load_geometry_bundle, which paints the terrain one colour, so the aerial image never showed. cars.ari now has the city node live.ari has (source: data city, shown only on the Austin world), and cars.py loads Austin into the data store at data.city: an installed bundle when there is one, else scene-austin-south-small from cvcpkg.org, downloaded once and cached. The terrain is drawn with satellite.png draped, and grl_snam.cars builds its occupancy and terrain from the same loaded objects (austin_world(city=...)), so the bundle is read once. A headless test runs the port on Austin when a bundle is installed.
…ator baseline The template moved to libcvc as pycvc_gl.cars (transfix/libcvc#1035, on #1031's bindings): general rather than GRL-SNAM specific, with the plant and the navigator's settings in the document's state tree, Austin from the data: block by default, the terrain generator as an alternative, rasters and coefficient panels, and the same run headless. GRL-SNAM keeps a thin entry: grl-snam ariadne cars runs it (or --copy), and --grl-policy gives libcvc's navigator the published grl-snam-weights policy, exported to .cvcnav and run in its trained frame (--nav-scale). With a pycvc_gl before 3.7.12 the entry says what to install. grl_snam/cars.py and the template copy are gone. The README, the quickstart, PLANTS.md and grl_snam/ariadne/README.md link to libcvc's docs/CARS.md. tests/test_ariadne_cars.py: 5 tests (the entry, its message without the template, a headless run, --copy, the navigator on GRL-SNAM's policy).
This was referenced Nov 7, 2026
Merged
Merged
transfix
added a commit
that referenced
this pull request
Nov 7, 2026
* release: 0.3.0 95 commits since v0.2.1 (PRs #66 to #158), with new features, so the pre-1.0 minor version goes up. The main changes: - Ariadne hosts: GRL-SNAM's demos run as Python hosts of Ariadne documents (#147, #149, #153). `grl-snam ariadne cars` runs libcvc's multi-car template (#155), and fleet and live take its settings, worlds, plants, panels and log (#157). These need pycvc-gl 3.7.12. - Vehicle plants: capture, the demos, the fog-of-war stories and training run on kinematic, dynamic and Jolt plants (#119, #130, #143, #145, #154). - Torch twins of libcvc, held to its goldens: the material rollout (#118), terrain (#120), dyn_bike and dyn4 (#121, #123, #134-#136), the external force (#122, #124), the material trainer (#125), belief material (#128, #129, #131), U_nav (#133), and the port-Hamiltonian form, its energy books, wheel spin and compliant contact (#138, #139, #146). - The vehicle-plant port-Hamiltonian whitepaper (#137 to #158). - Training and evaluation: the base scorecard and selection (#82-#98), `grl-snam coef-train` (#102), the learned lam head and .cvcnav v2 (#94, #105), and the 2026-10 audit fixes (#113). - Data: grl-snam-weights, plus the Austin scene and Humvee as runtime dependencies, so `grl-snam demo` runs from a bare install (#72-#77). - The research core moves under grl_snam/ (#103). The world clock is shared with libcvc's (#116, #117). The version lives in pyproject.toml. The three cvcpkg columns mirror it in upstream_version and in the package.files dist-info path. cvc_revision goes back to 1 for the new upstream version. The publish job asks the server for the next revision in any case. * material_train_native: pass semi_implicit=False explicitly (libcvc #981) libcvc #981 (in 3.7.12) changed nav_material_trainer_create's ms_semi_implicit default from 0 to 1. MaterialTrainer left the L_multi sampling args out for the legacy single start, so on pycvc-gl 3.7.12 semi_implicit=False quietly ran semi-implicit Euler. #159's CI was the first run on 3.7.12, and four tests failed on cp311, cp312 and cp313: - test_sampled_multi_start_args: "semi_implicit did not reach the rollout", because the default and semi_implicit=True were now the same rollout; - test_live_native_trainer_agrees[legacy] and [legacy+ext], and test_live_native_trainer_agrees_on_the_belief_net[surrogate]: the explicit torch trainer and the native one differed by 1.3e-3 to 1.5e-3 (tolerance 1e-5). Now a binding that takes the args always gets them, so the integrator is the one asked for on any pycvc. An older binding still gets the legacy start through the old signature. GRL-SNAM's default stays explicit Euler. tests/test_material_train_native_args.py checks both bindings. Its new case fails without this change.
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.
Why
The lab's researchers want to test their own multi-car controllers on Ackermann cars in the 3-D sim, in Python. Joe asked for that to be general, not GRL-SNAM-specific. So the template lives in libcvc, as
pycvc_gl.cars:docs/CARS.md.GRL-SNAM gets a thin entry to it, and its trained policy as one optional baseline.
What
The entry:
grl-snam ariadne cars(orpython -m grl_snam.ariadne cars) runs libcvc's template, and--copy DIRwrites it out to edit. Every flag is the template's:--vehicle(kinematic,humvee,roboracer,dynamic[:presets]);--world(data, the Austin default;generated;flat);--uriand--set key=value;--controller navigator;--headless --frames N --log run.npz.With a pycvc_gl before 3.7.12, the entry says what to install and exits 2.
--grl-policy: libcvc's navigator (GRL-SNAM's navigator, in C++) drives with the publishedgrl-snam-weightspolicy. It is exported to.cvcnavand run in its trained frame (1 unit = 300 m, through the template's--nav-scale).Removed: the first cut's
grl_snam/cars.pyand the template copy undergrl_snam/ariadne/template/. They now live in libcvc.Docs: the README (links, a CLI row, a short Ariadne section with the cvcpkg install line), the quickstart, PLANTS.md and
grl_snam/ariadne/README.mddescribe the ports and the entry, and link to libcvc'sdocs/CARS.mdfor the template's guide.Tests
tests/test_ariadne_cars.pyhas 5 tests:--copy;Results:
GRL_SNAM_PREFIXpointing at grl-snam-weights: 5 pass.tests/test_ariadne_ports.pystill passes.Order
Merge after transfix/libcvc#1031 and #1035, and a libcvc release that carries them (pycvc-gl 3.7.12). Then a GRL-SNAM release puts the entry in
grl-snam-cp31X. Until then, the entry tells you to update pycvc-gl.