Repository navigation
Ariadne OW7a-c: the gym in a local holon with people; the traffic world hosting them; cars brake for people - #1535
Merged
Merged
Conversation
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.
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.
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.
OW7a, OW7b and OW7c (ARIADNE_WORLDS.md §18.2, "Local is the same", and OW7's second part).
WorldGymruns 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.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
WorldGym::local_holon).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.set_world_external).gym_options::holon(on by default) turns this off: the world runs on the gym's own clock, as before, with no people.gym_options::people,gym_person).people,person_x,person_y,person_z,person_vx,person_vy).WorldVehicles::set_people,entity_info::person_contact).avatar_world::body_of).hit_person, which also counts ascollided, so the default reward charges it.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.people,person_*andhit_person.cvc://worlds/traffic.arias arisrv composes it: the server document at the room's 120 Hz, the server holon running its world, the runtime stepping it no more.cvc::nav::sim_world::set_people,people_brake;WorldVehicles::set_brake_for_people).WorldVehicleshands each fleet the holon's avatars as people, with the movers. It's on by default.Tests
AriadneWorldGym.TheGymsWorldRunsInALocalServerHolonAsOnItsOwnClock: two agents, one steered and one on nav@1, toward a wall, for two episodes with a reset in between.AriadneWorldGym.PeopleAreInTheGymsWorld:hit_personandcollided, no obstacle; carries them off, 35 m in 7 sholonofftest_pycvc_gym.py(pycvc_gym) gains the same from Python: the car hits the person (not an obstacle) and shoves them, the walker walks, andholon=Falsehas no people. It ran locally: I built pycvc on this machine for it (without the VTK bridge).ServerDocumentTest.TheTrafficWorldHostsPeopleWalkingAmongItsCars, run with braking and without:AriadneWorldGymandAriadneWorldWorkertests 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
Not verified
traffic.ariand arigl clients walking still needs a host with it.