Repository navigation
Ariadne: entity intents, so a document, a server or a host steers a world vehicle - #1233
Merged
Merged
Conversation
…orld vehicle
A world entity takes an intent from outside its navigator: a wanted steer and
acceleration that replaces or blends with its controller's command, an external
planar force on its drive (cvc::nav::ext_force), or both. The new external
controller is driven by its intent alone.
- Keys entities.<id>.intent.{mode,steer,accel,weight} and .force.{x,y,steer},
read at each navigator tick; world: vehicles: intents: names a second table
(a relay's published namespace) read by id or name.
- WorldVehicles::set_intent / clear_intent / intent, callable from any thread.
- sim_world::override_command takes a blend weight on a plant.
- pycvc.WorldEntities (AriApp.entities(), pycvc.world_entities over a GL
host's runtime capsule, pycvc.ari.Host.entities): list, spawn, despawn and
set intents. AppRuntime::running_world finds an adapter's world too.
- entities.<id>.command.{steer,accel,by} publish what the plant took.
transfix
enabled auto-merge (squash)
November 14, 2026 19:32
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
Master's #1233 (entity intents) conflicts with this branch's plants, where each plant has its own group and navigator, not one sim. Intents now run per group: the drive's external force is each group's, sampled by its navigator's own agent indices. apply_intents overrides each entity's command on its group's sim and sets or clears each group's ext_force. An external entity's hold reads its speed from pose(), which every plant has. before_step reads and applies the intents, then a gym's one-tick command takes over (command.by "gym"), then each group steps. entity_info keeps this branch's fields and adds master's command_steer, command_accel and intent; the entity keeps both sides' members. ARIADNE.md and the header say each plant's drive has its own force-steering switch.
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
Master's #1217 keeps nothing per thread in state_exec: a native's context (call_args::context()) carries its group, registry and stream, async_host::call and begin_external take it, and the pool drops in_pump_all() and the one-argument run_on_host. - async_host.h: begin_external takes the context, as on master, and keeps this branch's note that a call is finished through the host it was made on. - script_engine.cpp: the sliced form finds the calling program's group from the call's context (exec_group::current(ctx)), else group 0, and reads its data step from the context. - ariadne.cpp: file-pick opens its picker through run_on_host for the group its verbs were bound for (the env's, as its host is), and inline in group 0 and the init lane. - exec_pool: in_pump_all() is back, for the host-thread calls' debug assertion and ScriptLane::run's refusal, read from the pool's calls (their callers' and pumpers' thread ids) under its mutex rather than from thread-locals. - ariadne_runtime_test: the init lane's cycles test no longer compares against the calling thread's own registry, which master removed; it is AriadneInit.RunsAScriptThatLeavesCycles. - ci.yml: the sanitizer's required list names the test by its new name. - STATE_EXEC_THREADED.md: B29-B31 and the file-pick and sliced-call notes name the context-based calls.
This was referenced Nov 15, 2026
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.
A world entity can now be steered from outside its navigator. Until now
WorldVehicles::before_steplet onlynav@1command a vehicle, and no document, script, server or C++ caller could add a command or a force. This is the generic hook for that (ARIADNE_WORLDS.md §14, the new L2a row).What an entity takes
entity_intent(world_vehicles.h) holds a command, a force, or both, and keeps them until they are changed:replace: a steer (rad, + left) and an acceleration (m/s²) in place of the controller's.blend:weightof the intent and1 - weightof the controller's.off: the controller's alone.cvc::nav::ext_forceadds one, with or without the steering bias.externalcontroller: an entity driven by its intent alone. With no intent it brakes to a stop and holds.Where intents come from
Its keys:
entities.<id>.intent.{mode,steer,accel,weight}andentities.<id>.force.{x,y,steer}.replace.A second table:
world: vehicles: intents: <path>, read by id or by name.server: publish: [drive]), the relay replicates it, and its program writes(state-set "drive.lead.intent.accel" "2").C++:
WorldVehicles::set_intent,clear_intentandintent, callable from any thread. They are guarded by a mutex and applied at the next tick.Python:
pycvc.WorldEntitiesdoeslist(),spawn(...),despawn(id),set_intent(id, steer=, accel=, mode=, weight=, force=(fx, fy)),intent(id)andclear_intent(id). Three ways to get one:AriApp.entities();pycvc.world_entities(app, capsule), over a GL host's runtime (pycvc_gl.AriRuntime.app_runtime_capsule());pycvc.ari.Host.entities.AppRuntime::running_world()finds the world whether the runtime runs it itself or its adapter does (newSceneAdapter::scene_world()), so it works on ariglx too.What the plant took is published as
entities.<id>.command.{steer,accel,by}.In nav
sim_world::override_command(i, steer, accel, weight = 1).Tests
Built and run locally (Linux Release, GCC 13, Jolt):
ariadne_scene_world_test: 30/30, five of them new.intents:andexternal.set_intentfrom another thread while the world steps.ServerDocumentthat publishesdrivesteers an entity by name.nav_terrain_test: 13/13, withAnOverrideCommandBlendsWithTheDrivesOnAPlant.cvcgl_ariadne_physics,test_vehicle_intents_headless_and_drawn: a run scripted on the keys reaches the samestate_hashheadless (SceneWorldon its clock) and drawn (realize_scene+tick_scene, asarigl --offscreensteps it). It covers an external entity, a nav@1 one with a force and then a blend.pycvc_world_entities(new): 33 checks.pycvc_ariadne,pycvc_nav_override,pycvc_ari,nav_route_follower_test,nav_yield_test,ariadne_server_document_test.Not checked locally:
ariadne_runtime_testdoesn't compile on master since #1203. #1225 fixes it, so the lanes that build it fail here until that lands.Docs
The other half of this work, every plant in a scene world (
kinematic,dynamic,dynamic4wbesidejolt), follows as its own PR.