Repository navigation
pycvc AriApp: grid and world_geometry read the scene's world wherever it runs - #1391
Merged
Merged
Conversation
… 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
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.
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.
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.ionly. SceneWorld, cars.py, the gym, sim_tick and the holon are untouched.What changes
AriApp.gridreads the world wherever it runs.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 publishedscene.world.grid.*.running_world(), asWorldEntitiesalready does.AriApp.world_geometry(node)isSceneWorld::world_geometryon that world: a generated world's colliders, or a dataset's world.pycvc.world_geometrythat shares its arrays, asdata_world's does.pycvc_gl.cars's plants, as GRL-SNAM's ports use them.docs/ARIADNE.mdnames 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, andnav_world_gridover them equalsAriApp.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:ari_app_attach,grid("land")andworld_geometry("land")are not None;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_geometryand 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.