Skip to content

Examples: retire the C++ GL nav demos (nav_city_swarm, nav_city_drive, nav_fog_ghost, nav_finale) - #1568

Merged
transfix merged 3 commits into
masterfrom
chore/retire-cpp-nav-demos
Nov 27, 2026
Merged

transfix merged 3 commits into
masterfrom
chore/retire-cpp-nav-demos

Conversation

@transfix

Copy link
Copy Markdown
Owner

Retires the old non-Ariadne nav demos: the four C++ programs that drew the cvc::nav swarm through cvcGL by hand (nav_city_swarm, nav_city_drive, nav_fog_ghost, nav_finale), with their nav_common and its test.

Why. Each loaded and fitted its vehicle model its own way, through nav_common's load_vehicle_template. So none of them could draw the Humvee in parts that vehicle-humvee 1.0.0+cvc.5 now ships, whose wheels roll and steer. Ariadne has one vehicle look, and the rendered nav demos are already Ariadne documents and hosts:

What goes and what changes:

  • examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test. The wasm gallery builds nav_scrub as its only nav program. Its bundle preload (the Austin scene and the shared Humvee) stays. The trained-weights preload (CVC_WASM_NAV_WEIGHTS) goes, since only the swarm and the drive read it.
  • The gallery: demos.json drops the three pages, and the two thumbnails go.
  • Workflows:
    • deploy-pages, publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting the four.
    • The gallery's WebGL-shim check reads nav_scrub.js instead of nav_city_drive.js.
    • grl-snam-weights is no longer installed for the browser build.
  • Recipes:
    • libcvc-examples ships the cvcGL scene demos, the documents and the three headless nav CLIs. nav_swarm_demo, nav_train_demo and nav_material_demo load no models and stay; nav_train_demo is the CoefMLP trainer.
    • libcvc-examples-web drops grl-snam-weights.
  • Docs and comments: examples/nav/NAV_DEMOS.md now covers the documents and the CLIs. Other docs and comments that pointed at the programs now say they are retired. The roadmaps are left as history.

Order with #1547. This should merge after #1547, which adds the fleet swarm to the gallery and marks nav_city_swarm/nav_city_drive "card": false. The two conflict only in examples/web/demos.json. When #1547 is in, I'll rebase and make the three old addresses redirects to nav_fleet_swarm_ari, as terrain_lab redirects to its document, so outside links keep working.

Not in this PR:

  • The Ariadne swarm nodes (src/cvcGL/ariadne/swarm_nodes.cpp), nav_scrub.cpp and pycvc_gl's VehicleModel still load or pick the Humvee model their own way. Moving them onto the shared vehicle look is the parted-Humvee default-look PR, a separate change in progress.

Checked:

  • A fresh native configure (MSVC, Ninja, examples, cvcGL and arigl on) succeeds. Its nav targets are nav_abi_smoke, nav_compute, nav_convoy, nav_scrub and the three CLIs.
  • clang-format 18.1.8 is clean on the C++ I touched.
  • The wasm branch of the CMake isn't exercised by PR CI. Its gallery is built by deploy-pages (master) and publish-cvcgl-wasm (tags), so its first real run is the next push to master.

@transfix
transfix force-pushed the chore/retire-cpp-nav-demos branch from 21cd944 to ca39f1b Compare November 27, 2026 05:10
@transfix
transfix enabled auto-merge (squash) November 27, 2026 06:12
transfix added a commit that referenced this pull request Nov 27, 2026
… nav_swarm arena with a stale map

The C++ nav_fog_ghost (retired by #1568) as an Ariadne document that arigl runs, on a 2-D map by
default. One vehicle crosses a 200 m open field with a stale map that shows a wall across its
path; its A* route over its belief bends round the wall's end, its sensor wears the phantom away,
the route is planned again and it drives straight through where the wall stood. The ground shows
what it knows, with an LED per believed wall (red real, amber ghost); the phantom stands as a
see-through amber wall that wears away; the blue plan to the carrot against the yellow track, the
cyan route ahead, the sensor ring, the start and the GOAL; a four-beat caption at 0.5x. Scenario
dynamic: an honest map and a second vehicle crossing the path. In the gallery as
nav_fog_ghost_ari, and the old nav_fog_ghost address opens it.

The library pieces, in the nav_swarm node (scene_swarm.h, swarm_nodes.h, ARIADNE.md §5.4):
- arena: an open field in metres, walls:, and phantoms: in the vehicles' starting map only
  (swarm_city::prior, arena_swarm_city), with the phantoms key choosing it at each build;
- vehicles: listed starts and goals, each its own target;
- route: belief: an 8-connected A* route over each plane's belief, planned again on the worker
  whenever a belief flip changes some plane's map;
- range and sense_ticks (the range key too); stats time, range, ghosts, ghosts0 and replans;
  SceneSwarm::belief(), ghosts(), routes(); the frame's carrots (sim_thread::snapshot::carrot);
- the ghosts, plan, route and sensor layers; the city layer's belief: true (the LED grid) and an
  arena's walls; path up to 1024 segments; the city ground under the cells' full extent.

Tests: ariadne_scene_swarm_test (the arena's raster, the props, listed vehicles and the phantoms
key, and the whole ghost story on the worker and on the frame's thread) and cvcgl_ariadne_swarm (a
ghost section: the new layers' meshes, and the ghost wall wearing away).
@transfix
transfix force-pushed the chore/retire-cpp-nav-demos branch from ca39f1b to 830df71 Compare November 27, 2026 08:47
@transfix
transfix disabled auto-merge November 27, 2026 08:47
@transfix
transfix enabled auto-merge (squash) November 27, 2026 08:47
…, nav_fog_ghost, nav_finale)

The rendered cvc::nav demos are Ariadne documents and hosts now: nav_city_swarm.ari and
nav_city_drive.ari (the swarm and the drive as documents, faster than the programs were),
nav_scrub, nav_convoy, world_lab.ari, and the fleet swarm (#1547) in the gallery. The four C++
programs that drew the swarm through cvcGL by hand go, with their nav_common and its test. Each
loaded and fitted its vehicle model its own way (nav_common's load_vehicle_template), so none of
them could draw the Humvee in parts (vehicle-humvee 1.0.0+cvc.5) with turning wheels; Ariadne's
one vehicle look can.

- examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test gone. The wasm
  gallery builds nav_scrub as its only nav program; its bundle preload (the Austin scene and the
  shared Humvee) stays, and the trained-weights preload (CVC_WASM_NAV_WEIGHTS), which only the
  swarm and the drive read, goes.
- The gallery (demos.json) and its thumbnails lose the three pages. deploy-pages,
  publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting them; the
  gallery's WebGL-shim check reads nav_scrub.js in place of nav_city_drive.js; grl-snam-weights is
  no longer installed for the browser build (the documents fetch the policy themselves).
- libcvc-examples ships the cvcGL scene demos, the three headless nav CLIs (nav_swarm_demo,
  nav_train_demo, nav_material_demo, which load no models and stay) and the documents;
  libcvc-examples-web drops grl-snam-weights.
- NAV_DEMOS.md describes the documents and the CLIs; the docs and comments that pointed at the
  programs say they are retired.
nav_city_swarm.ari and nav_city_drive.ari named themselves ports of examples/nav/*.cpp files this change deletes, and vehicle_view.cpp's fitted_model comment named nav_common's load_vehicle_template. Each now says the program is retired; the comment names fit_vehicle_geometry, which pycvc_gl's VehicleModel calls since #1569.
#1547 put nav_fleet_swarm.ari in the gallery in place of the old nav demos, and the retired programs' addresses now open it, so the rendered demos' table lists it first.
@transfix
transfix force-pushed the chore/retire-cpp-nav-demos branch from 830df71 to 3dcb0f3 Compare November 27, 2026 19:04
@transfix
transfix disabled auto-merge November 27, 2026 19:04
@transfix
transfix enabled auto-merge (squash) November 27, 2026 19:04
@transfix
transfix merged commit 3e4a3c9 into master Nov 27, 2026
30 checks passed
@transfix
transfix deleted the chore/retire-cpp-nav-demos branch November 27, 2026 21:38
transfix added a commit that referenced this pull request Nov 28, 2026
…' retirement (#1568)

demos.json: master's order and redirects (nav_city_swarm and nav_city_drive open the fleet swarm),
with the fog ghost's card after nav_scrub and the old nav_fog_ghost address redirecting to its
document. NAV_DEMOS.md: master's page, with a row for nav_fog_ghost.ari.
transfix added a commit that referenced this pull request Nov 28, 2026
… nav_swarm arena with a stale map (#1589)

* Ariadne: the fog-of-war ghost as a document (nav_fog_ghost.ari), on a nav_swarm arena with a stale map

The C++ nav_fog_ghost (retired by #1568) as an Ariadne document that arigl runs, on a 2-D map by
default. One vehicle crosses a 200 m open field with a stale map that shows a wall across its
path; its A* route over its belief bends round the wall's end, its sensor wears the phantom away,
the route is planned again and it drives straight through where the wall stood. The ground shows
what it knows, with an LED per believed wall (red real, amber ghost); the phantom stands as a
see-through amber wall that wears away; the blue plan to the carrot against the yellow track, the
cyan route ahead, the sensor ring, the start and the GOAL; a four-beat caption at 0.5x. Scenario
dynamic: an honest map and a second vehicle crossing the path. In the gallery as
nav_fog_ghost_ari, and the old nav_fog_ghost address opens it.

The library pieces, in the nav_swarm node (scene_swarm.h, swarm_nodes.h, ARIADNE.md §5.4):
- arena: an open field in metres, walls:, and phantoms: in the vehicles' starting map only
  (swarm_city::prior, arena_swarm_city), with the phantoms key choosing it at each build;
- vehicles: listed starts and goals, each its own target;
- route: belief: an 8-connected A* route over each plane's belief, planned again on the worker
  whenever a belief flip changes some plane's map;
- range and sense_ticks (the range key too); stats time, range, ghosts, ghosts0 and replans;
  SceneSwarm::belief(), ghosts(), routes(); the frame's carrots (sim_thread::snapshot::carrot);
- the ghosts, plan, route and sensor layers; the city layer's belief: true (the LED grid) and an
  arena's walls; path up to 1024 segments; the city ground under the cells' full extent.

Tests: ariadne_scene_swarm_test (the arena's raster, the props, listed vehicles and the phantoms
key, and the whole ghost story on the worker and on the frame's thread) and cvcgl_ariadne_swarm (a
ghost section: the new layers' meshes, and the ghost wall wearing away).

* nav_fog_ghost: the ground repaints through the texture's buffer, trails sample on the navigator's frames, sense_ticks

- city layer: the fog and the lights are painted through the pixels taken before setTexture
  shares the image. The image is copy-on-write, so fog.data() after it painted a private copy
  the texture never saw, and the ground stayed as it was built (the synthetic city's fog too).
  cvcgl_ariadne_swarm reads the texture's texels back: in view lit, the cleared lights out.
- trails and path sample every `every` navigator frames, not view frames, and a jump is three
  vehicle lengths (at least 3 m): at the story's half speed the track was dots.
- nav_swarm's sense_ticks: the navigator steps between senses (4); the ghost senses every 2, as
  the C++ demo did.
- The caption's discovery beat fires once a quarter of the phantom is sensed away: the far end
  never comes within the sensor's range. stats.time to the hundredth; "1 vehicle".
- The gallery thumbnail, and the old nav_fog_ghost address as a redirect to the document.
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