Skip to content

Ariadne OW7a-c: the gym in a local holon with people; the traffic world hosting them; cars brake for people - #1535

Merged
transfix merged 3 commits into
masterfrom
feat/one-world-ow7a
Nov 25, 2026
Merged

transfix merged 3 commits into
masterfrom
feat/one-world-ow7a

Conversation

@transfix

@transfix transfix commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

OW7a, OW7b and OW7c (ARIADNE_WORLDS.md §18.2, "Local is the same", and OW7's second part).

  • WorldGym runs its world in a server-role holon of its own, as a relay runs its world, and people can be in the gym beside the cars, from C++ and from Python.
  • A car's contact with a person now counts as a person's, not an obstacle's.
  • A new test runs the relay's traffic world with people walking among its cars, composed as arisrv composes it but without the transport. It found that the cars didn't brake for people in their lane, so now they do (OW7c, Joe: "Yes, add braking").

OW7's first part (#1475) did this for a drawn host on a worker thread. This does it for the headless gym, and through it for GymCars (pycvc_gl.cars) and the GRL-SNAM hosts on it.

What changed

  • The gym's world in a local server-role holon (WorldGym::local_holon).
    • Physics on, at the world's rate (holon_config_at), with a lockstep clock: each step advances it one physics step at a time, and the world takes the steps the gym's own clock gave it.
    • The runtime no longer steps the world (set_world_external).
    • A reset lets the holon go while the restart replaces the physics world, then attaches it again at tick 0. The holon's avatars live in that world, so it can't stay attached across the restart.
    • gym_options::holon (on by default) turns this off: the world runs on the gym's own clock, as before, with no people.
  • People in the gym (gym_options::people, gym_person).
    • Avatars put into the world at each reset, standing or walking at a pace along a heading, as bodies beside the cars.
    • The holon drives them and hands them to the navigators to steer around (OW4).
    • The observation has their feet and velocity (people, person_x, person_y, person_z, person_vx, person_vy).
  • A person hit is a person's (WorldVehicles::set_people, entity_info::person_contact).
    • The holon tells the vehicles which bodies are its avatars, with the movers it already hands them.
    • A chassis's contact with one is a person's, not an obstacle's, on a relay as in the gym (avatar_world::body_of).
    • The gym reports hit_person, which also counts as collided, so the default reward charges it.
  • From Python (pycvc_gym.i, cars.py).
    • pycvc.WorldGym(..., people=[{"x", "y", "yaw", "walk"}], holon=True). Both are keyword arguments added at the end, so existing calls are unchanged.
    • GymCars(..., people=...) passes them through.
    • The observation dict has people, person_* and hit_person.
  • The relay hosting the traffic world with people among its cars (a new test).
    • cvc://worlds/traffic.ari as arisrv composes it: the server document at the room's 120 Hz, the server holon running its world, the runtime stepping it no more.
    • Six people walk the streets for a minute among its 18 cars on nav@1.
  • Cars brake for people (OW7c; cvc::nav::sim_world::set_people, people_brake; WorldVehicles::set_brake_for_people).
    • A new navigator stage after the drive: an agent brakes for a person in its lane within its stopping distance, keeping the drive's steering.
    • Its lane is its half-width plus the person's radius, widened by how far a person walking at up to 1.5 m/s gets while it stops (a 0.3 s reaction, then its braking). Its front is a wheelbase plus its half-width ahead of its rear axle.
    • It brakes as hard as stopping 1 m short needs, up to its braking: on a plant it caps the plant's command; on the kinematic arm it re-runs the tick from its start at the drive's turn. It holds the stop while the person is there.
    • A vehicle a participant or a gym commands is its commander's to brake (an override), as is a parked one.
    • WorldVehicles hands each fleet the holon's avatars as people, with the movers. It's on by default.
    • Off, or with no people, the navigator is byte-unchanged, so fleets without people and the trained policies' runs are unaffected.

Tests

  • New AriadneWorldGym.TheGymsWorldRunsInALocalServerHolonAsOnItsOwnClock: two agents, one steered and one on nav@1, toward a wall, for two episodes with a reset in between.
    • Every body's state at the end of each episode is the same, to the bit, in the holon or on the gym's own clock.
    • A second run in the holon gives the same states again.
    • The world's saved state differs only by the avatars' material, which the holon adds to the world.
  • New AriadneWorldGym.PeopleAreInTheGymsWorld:
Case Result
A car commanded straight at a person standing 15 m ahead hit_person and collided, no obstacle; carries them off, 35 m in 7 s
A car on nav@1 to a goal past a person at least 2.9 m from them (centre to feet), touches no one, reaches its goal
A person walking at 1.2 m/s covers 8.3 m in 7 s
holon off no people
  • test_pycvc_gym.py (pycvc_gym) gains the same from Python: the car hits the person (not an obstacle) and shoves them, the walker walks, and holon=False has no people. It ran locally: I built pycvc on this machine for it (without the VTK bridge).
  • New ServerDocumentTest.TheTrafficWorldHostsPeopleWalkingAmongItsCars, run with braking and without:
Six people walk the traffic world for a minute Braking Steering only (before)
Cars that drove over 10 m 18 of 18 18 of 18
Car-person contact while the car moved over 1 m/s 0 25 tick-frames
Fastest car at a contact 0.12 m/s 9.0 m/s
Closest a car came (centre to feet) 1.44 m 0.50 m
Distance walked, median 63 m 76.5 m
  • With braking, the contacts left are people walking into a car stopped for them. The test's people walk straight on whatever is in the way, and one stood against a stopped car most of the minute (15.8 m walked).
  • All 23 AriadneWorldGym and AriadneWorldWorker tests pass. These suites pass locally too: scene world, holon, holon sync, server document, world dataset, pose stream, room AOI relay, room avatar, room scene, world rules, fast lane (4 skipped). cvcgl_ariadne_physics passes. arigl builds.

Not done yet

  • People don't step around cars. The test's walkers are scripted to walk straight. A player walks around a stopped car, but a scripted walker stands against it.

Not verified

  • Not run live. arisrv needs gRPC, which this Windows build lacks, so arisrv with traffic.ari and arigl clients walking still needs a host with it.

Local is the same (ARIADNE_WORLDS.md §18.2): WorldGym runs its world in
a server-role holon of its own, as a relay runs its world. Physics on,
at the world's rate, its clock lockstep: each step advances it one
physics step at a time, and the runtime steps the world no more. A
reset lets the holon go while the restart replaces the physics world,
then attaches it again at tick 0. In the holon or on the gym's own
clock (gym_options::holon off), every body's state is the same at the
end of two episodes, to the bit. GymCars and the GRL-SNAM hosts run on
the holon through it.

People: gym_options::people puts avatars in the world at each reset,
standing or walking, which the holon drives and hands to the
navigators to steer around. The observation has their feet and
velocity (pycvc's dict too). A car commanded at a standing person
touches them and carries them off; a car on nav@1 to a goal past a
person keeps clear (2.9 m, centre to feet) and gets there.
…raffic world hosting people

A person hit is a person's: the holon tells the vehicles which bodies are
its avatars (WorldVehicles::set_people, with the movers), so a chassis's
contact with one is a person's (entity_info::person_contact), not an
obstacle's, on a relay as in the gym. The gym's hit_person counts as a
collision.

From Python: pycvc.WorldGym(..., people=[...], holon=True), and
GymCars(..., people=...) through it; the observation dict has people,
person_* and hit_person (test_pycvc_gym.py, run locally).

OW7b: the relay hosting cvc://worlds/traffic.ari with six people walking
its streets among its 18 cars, composed as arisrv composes it without
the transport. All cars drive, every person walks their street. Found
and measured, not held: the navigators only steer around a person and
do not brake for one in their lane, so a truck at 9 m/s runs into a
person crossing ahead. Not run live: arisrv needs gRPC, which this
build lacks.
@transfix transfix changed the title Ariadne OW7a: the gym in a local server-role holon, with people Ariadne OW7a/b: the gym in a local server-role holon with people; the traffic world hosting them Nov 25, 2026
The navigator brakes for a person in its lane (sim_world::set_people,
people_brake), after the drive, keeping the drive's steering. Its lane is
its half-width and the person's radius, widened by how far a person at
up to 1.5 m/s gets while it stops; it brakes as hard as stopping 1 m
short needs, up to its braking (a plant's, or the kinematic arm's a_max,
the tick run again from its start at the drive's turn), and holds the
stop. An override's vehicle (a participant's, a gym's) and a parked one
are not braked. WorldVehicles hands each fleet the holon's avatars as
people (set_brake_for_people, on by default). Off or without people the
navigator is byte-unchanged.

Traffic world, six people for a minute: no car touches a person while
moving (fastest at a touch 0.12 m/s, closest 1.44 m), where steering
alone ran into one at 9 m/s; all 18 cars still drive. The OW4 test gains
a braking-only case (it stops short) and its control turns both off.
@transfix transfix changed the title Ariadne OW7a/b: the gym in a local server-role holon with people; the traffic world hosting them Ariadne OW7a-c: the gym in a local holon with people; the traffic world hosting them; cars brake for people Nov 25, 2026
@transfix
transfix merged commit ae48249 into master Nov 25, 2026
30 of 31 checks passed
@transfix
transfix deleted the feat/one-world-ow7a branch November 25, 2026 19:12
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