Skip to content

pycvc AriApp: grid and world_geometry read the scene's world wherever it runs - #1391

Merged
transfix merged 1 commit into
masterfrom
fix/ari-app-running-world
Nov 20, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/ari-app-running-world

Conversation

@transfix

Copy link
Copy Markdown
Owner

GRL-SNAM's Ariadne ports now drive in their document's world node, which SceneWorld runs (CVC-Lab/GRL-SNAM#196, ARIADNE_WORLDS section 18). Two things in pycvc still made them build that world again beside SceneWorld. This PR closes both, in bindings/pycvc/pycvc_ariadne.i only. SceneWorld, cars.py, the gym, sim_tick and the holon are untouched.

What changes

  • AriApp.grid reads the world wherever it runs.
    • It read AppRuntime::scene_world(), which is null when a renderer's adapter runs the scene's world. So an AriApp attached to a drawn host (ari_app_attach: a window, offscreen, ariglx-web) returned None, although the world ran and published scene.world.grid.*.
    • It now reads running_world(), as WorldEntities already does.
  • AriApp.world_geometry(node) is SceneWorld::world_geometry on that world: a generated world's colliders, or a dataset's world.
    • It returns a pycvc.world_geometry that shares its arrays, as data_world's does.
    • A host whose own physics is not in the scene's world can collide with it, instead of generating the world again in Python. Today that means pycvc_gl.cars's plants, as GRL-SNAM's ports use them.
    • It keeps working when GB2 (docs(ARIADNE_WORLDS): a generated world is a bundle (section 18.8, Q17) #1380) makes generated worlds datasets.
  • docs/ARIADNE.md names both.

Tests

Built locally on master e81ce8e (4.0.2), Release, with Jolt and pycvc_gl. Both test files pass:

  • test_pycvc_ariadne.py (50 checks): headless, world_geometry("land") is the generated world's colliders, and nav_world_grid over them equals AriApp.grid. A body-only node and a missing node give None.
  • test_pycvc_gl_ariadne_host.py, RENDER_OK 24. Its offscreen child, new here, runs a drawn generated world:
    • through ari_app_attach, grid("land") and world_geometry("land") are not None;
    • the grid equals a headless AriApp's on the same document, and the grid made from the colliders is the same;
    • after switching to the flat world, its grid is the walled square.

On 4.0.0 the same offscreen grid() call returns None (measured before the change).

Who uses it

A GRL-SNAM follow-up uses both when the installed pycvc has AriApp.world_geometry and falls back on 4.0.x. With this PR its tests pass against this build, including "a generated world is not generated again in Python" and an offscreen host that makes nothing beside SceneWorld.

Coordinated on dev.tx.wtf ws:libcvc (#104, #106, claim #111). Merge waits on Joe's OK.

… it runs

AriApp.grid read AppRuntime::scene_world(), which is null when a renderer's adapter runs the
scene's world, so an AriApp attached to a drawn host (ari_app_attach: a window, offscreen, ariglx-web)
got None although the world ran and published scene.world.grid.*. It now reads running_world(), as
WorldEntities does.

AriApp.world_geometry(node) is SceneWorld::world_geometry on that world: a generated world's
colliders, a dataset's world, as a pycvc.world_geometry sharing its arrays (as data_world's). A host
whose own physics is not in the scene's world (pycvc_gl.cars' plants, GRL-SNAM's ports) collides
with it instead of generating the world again in Python.

Tests: test_pycvc_ariadne checks world_geometry headless (its grid is SceneWorld's); the GL host
test's offscreen child checks grid and world_geometry through ari_app_attach on a drawn generated
world, against a headless AriApp on the same document, and a flat world's grid after a switch.
@transfix
transfix merged commit ca5f69b into master Nov 20, 2026
29 checks passed
@transfix
transfix deleted the fix/ari-app-running-world branch November 20, 2026 20:06
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Nov 20, 2026
…cvc#1391), and a page takes its world in a frame (#198)

On a pycvc whose AriApp has world_geometry (transfix/libcvc#1391), AriApp reads the scene's world
wherever it runs: a generated world's colliders and terrain height come from SceneWorld
(scene_geometry), so nothing is generated again in Python, and a drawn host's grid is SceneWorld's
(AriApp.grid through ari_app_attach). On 4.0.x the fallbacks stay.

A generated world's record is its settings and the stats its node publishes (world.stats.*), the
same on every libcvc and in every host. In a page, whose frames run after the port's program
returns, the scrub view takes its world in the first frame SceneWorld has it (when_ready).


The generator's edge is passed by name, as #199 has it: libcvc 4.0.2 seeds world.edge as its index.
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