Repository navigation
Ariadne OW5p: the room's avatars in the car a client drives, and the room in a dynamic plant's car - #1511
Merged
Conversation
…7 quanta ARIADNE_WORLDS.md section 18.1 (owner, 2026-11-19: "7 quanta"). Every host runs the holon's 1/120 s quantum, physics a step a quantum, and the navigator's tick is 7 quanta (0.0583 s), the nearest whole tick to the 0.06 s the shipped policies were trained at. - sim_tick.h: kSimQuantum 1/120 s, kSimTickQuanta 7, kSimTick from them; adopt_sim_clock puts a fresh clock on the catch-up even at the quantum. - pycvc: SIM_TICK_QUANTA; cars.py's fallbacks; the gym, swarm and sim_thread defaults follow kSimTick. - NavPlantConvergence.PoliciesHoldTheirReachAtTheSimulationTick (CVC_NAV_TICK_AB=1): the shipped and default policies on Jolt RoboRacers at 0.06 s, the simulation tick and 0.05 s over 24 s.
The plant host's own default stays 0.01 s, where navigators at the trainers' 0.06 s run; the cars template and the scene swarm, which tick cvc::kSimTick, give their plant_host a 1/120 s world. The nav lab's retarget lands on the first tick at or past 3 s.
0.01 s for a tick of whole 0.01 s steps (every score so far), the simulation quantum for one of whole quanta (cvc::kSimTick), else the step nearest 0.01 s that divides it.
ARIADNE_WORLDS.md section 18.2. holon::attach_world(SceneWorld *) moves the avatars into a server document's physics world, beside its bodies and vehicles, and steps that world on the holon's clock: SceneWorld::follow gains per-step hooks, the avatars driven just before each step and read after it. A car shoves an avatar; the avatar takes some of its momentum. - avatar_world over a shared world it does not own: its owner steps it and owns its gravity, air and statics; release() and move_to() (a world its owner replaced). - AppRuntime::set_world_external: the runtime stops stepping a world a holon runs. - arisrv attaches the server document's world to the room's holon. - AriadneOneWorld tests: a Humvee driven into a standing avatar carries it down the road and ends behind the same run without it; attach refuses a client, a holon without physics and a world on another step; avatars stand on the scene's own bodies; detach puts them back.
ARIADNE_WORLDS.md section 18.4. WorldVehicles::set_movers: other things in the world the navigators steer around while avoid is on, as foreign agents to each fleet's separation. A holon running the world sets them to its avatars before each step, and clears them when it leaves. A car on nav@1 swings 3.1 m past a person standing in its lane and drives on; without avoiding it carries them 34 m (AriadneOneWorld).
ARIADNE_WORLDS.md section 18.4. holon::entities() lists every mover in the holon's world: each participant's person and the attached world's entities, with kind, controller, driver, owner and policy. holon::set_driver(pid, entity) puts a participant in a world vehicle: its person leaves the world (feet and reserve kept), its intent's new drive axes (avatar_intent::steer, accel; intent.steer/accel on the wire) replace the vehicle's command each frame, and its state and display pose are the vehicle's. Getting out puts the person at a clear point beside the vehicle and gives the vehicle back to its controller. WorldVehicles::set_driver / driver; the room's entities carry driver.
# Conflicts: # docs/roadmap/ARIADNE_WORLDS.md # src/cvc/tests/ariadne_scene_world_test.cpp
…bcvc into feat/one-world-avoid # Conflicts: # src/cvc/ariadne/world_vehicles.cpp # src/cvc/tests/ariadne_scene_world_test.cpp
…bcvc into feat/one-world-entities # Conflicts: # src/cvc/ariadne/world_vehicles.cpp # src/cvc/tests/ariadne_scene_world_test.cpp
…g in by asking avatar_intent's drive axes are now shares of the vehicle's envelope: steer of its lock, throttle [-1, 1] (negative is reverse), brake [0, 1]; the server scales them by the driven vehicle's max_steer/max_accel/max_decel (holon::drive_command). The brake stops the vehicle and never backs it up; reverse brakes a car still rolling forward, then backs it up; a boat has no brake and reverses on its propeller astern. On the wire: intent.throttle, intent.brake, intent.jump (intent.accel is gone). The walker jumps (avatar_intent::jump) at its controller's jump_speed (4 m/s by default) when something is under its feet, paying the jump from its reserve. Getting in is asked for in the room: participants.<pid>.drive = "<seq>:<entity>", answered by server_pump in drive_status and driving (relay-owned). holon::get_in holds it to the world's rules: the archetype's drivable: and reach: (3 m from its chassis box). room-drive / room-driving verbs; room entities carry drivable, reach, controls. controls.h: control schemes walk, car and boat with their own bindings (Space jumps a walker, brakes a car; E held 0.4 s gets in and out), and a resolver with steering ramps and hold-to-fire.
… camera; docs arigl's room controls come from the scheme of what we control: walking (avatar.keys, plus Space to jump, V for mouse look, E held to get in), or the car's or boat's scheme while the relay says we drive (controls.<scheme>.<action>; all of them in the Controls window). The nearest drivable vehicle in reach (drive_target, the one ahead first) gets a prompt over it, "E Drive <name>", whose ring fills as E is held; a refusal is shown for a moment. Driving, client_pump plays our own pose out from the relay's samples instead of predicting it, room_view hides every driver's marker (set_riders), and the camera swings behind the moving vehicle. traffic.ari's trucks are drivable. ARIADNE_WORLDS 18.6 describes the schemes, the shares, the jump and the ask; OW6 is started.
A control binding's pad inputs are read now: buttons by position (A, B, X, Y, LB, RB, ...), the triggers LT and RT, and stick halves (LeftY-, LeftX+). Each has a deadzone; an action is its keys' value or its gamepad's, the larger, and only a key's steering ramps. Defaults: walk on the left stick (as fast as pushed), look around on the right, jump A, get in and out on X held; driving, the left stick steers, RT is the throttle and LT the brake, LB a car's reverse (a boat's is LT). cvcGL's SdlGamepad reads the first gamepad SDL finds. arigl feeds it to the resolver, faces where the camera looks while the gamepad is in use, turns the camera with the right stick, and names the pad's button in the get-in prompt. room_view gains intent_from_axes for the analog walk.
A KeyBinding can name its gamepad inputs and where they live (pad, pad_path). The Controls window shows them in a column of their own with a Change button: the next gamepad input pressed becomes the new binding. Keys are ignored while it waits, and Escape keeps the old one. Runtime::post_pad_press takes the newly pressed gamepad inputs. SdlGamepad::pressed() lists them each frame (a button gone down, a trigger or stick half past half way). arigl's input pump now owns the gamepad: it posts the presses to the runtime and hands the gamepad to the room's controls, except while the window waits for a button. Each avatar and vehicle action lists its gamepad default, seeded at <viewer>.pad.<scheme>.<action>.
world: avatars: archetypes: entries may name one of the world's vehicle archetypes (vehicle: rover). This is §5k phase 3 for vehicles. - Choice: a participant picks an archetype under the existing avatar choice subtree (participants.<pid>.avatar.archetype, beside color and accessory); until it picks, it has the first. - Server: server_pump rules on the choice (holon::set_archetype) and answers in the relay-owned archetype_status. For a vehicle it spawns it where the person stands and seats the participant for good: no getting out or into another, and the vehicle goes when the participant leaves or picks a person again. - Rules: world_rules::avatar() is now the first person archetype; find_avatar is new. - Room: the archetypes section carries vehicle, and room entities carry avatar (whose body it is). drive_target skips such vehicles, and arigl shows its owner no get-out prompt. - Verbs: room-archetypes, room-set-archetype, room-archetype. The baseline conference document gains a Body combo beside Colour and Wear. - traffic.ari offers a rover body.
Walking under mouse look, arigl puts the camera at the walker's eyes (0.92 of its body's height, 5 cm behind them) and hides its own avatar, so W walks where you look. The orbit distance comes back when mouse look ends. The Controls window gains "Mouse look in first person" (MouseControls::first_person, arigl's camera settings.first_person, seeded on). Turning it off gives back the over-the-shoulder view. Driving keeps the chase camera.
A client's holon now holds each vehicle it shows as a kinematic box of its chassis's size where its playout shows it (holon::hold_entity, on avatar_world's new obstacles), carried on along its velocity through the frame's steps. The walk it predicts stops at a parked car and is pushed by a moving one, as on the relay, instead of walking through and snapping back. client_pump takes the entity_playout and holds every entity except the one the participant drives or is; arigl pumps the entities first. ARIADNE_WORLDS.md section 18.5: OW5a as built, OW5b and OW5c still to come.
…/one-world-drive # Conflicts: # docs/roadmap/ARIADNE_WORLDS.md # inc/cvc/ariadne/avatar_sim.h # inc/cvc/ariadne/holon.h # src/cvc/ariadne/holon.cpp # src/cvc/ariadne/holon_sync.cpp # src/cvc/tests/ariadne_scene_world_test.cpp
…/one-world-ow5j # Conflicts: # src/cvc/CMakeLists.txt
OW5m: a vehicle's attitude in its pose
OW5l: a sea's waves under a predicted boat
A jolt or boat model's world holds each peer on foot as a frictionless box of the avatar body's size and mass where the client shows it, so the predicted car knocks it aside and is slowed by it as the relay's is. A peer aboard a vehicle the room shows is not held (holon::set_aboard, from client_pump). Every box with a mass is frictionless, and one the car knocks off where it is shown is left to the model's world until the shown pose catches up, instead of being put back where it stood a playout's delay ago and hit again every step.
Knocked loose, an avatar's box in a jolt or boat model is pushed back toward the velocity it is shown at with up to the policy's force_max each step, and kept upright, as the relay's walker does with the avatar.
OW5o: the room's vehicles in the car a client drives
OW5n: a vehicle's spin and steering in its pose
A dynamic or dynamic4w model given statics or room for the room's boxes puts its plant's chassis box in a world of its own with them, as the relay's is in its world: what it hits goes back into the model, and the world is saved with the model's state for the holon's replay. Touching the ground is not a hit: avatar_static::ground marks it as the relay's world does (SceneWorld::ground_bodies, a generated world's terrain, the room scene's plane). A model made without a world has no room, so the first vehicle or avatar held makes it again with one.
On the relay's clock: the water's sea keyframes, the storms' front (wind.front) and a new storm-wind peak were timed on the app's world clock, which nothing drives once a holon runs the document's world on its own clock (holon::attach_world). On the relay a storm never grew the sea. SceneWorld::sync(clock) times them on the clock the world steps on; follow() passes its own. Published: the relay puts each water node's last sea keyframe in room_world_on (seas: the old and new keyframes' winds, the crossfade, the count and the tick its field goes in after), since a sea lags its wind and a client that came later cannot grow the same one. Followed: a client's replica makes the same sea from it (WaterRuntime::follow_sea, SceneWaterSeaClock::follow) and hands the holon the new water with that tick (world_replica::water_revision, water_from_tick; holon::set_water). A boat's model keeps its water by tick and floats each step on the water of the tick it ends on; a saved state carries the water it was saved on, since a world restores only onto that sea. A water node's new field no longer rebuilds the replica's statics (before, a document with water rebuilt them every frame). Tests: the storm lake on a holon's clock takes the same keyframes as on the app's, to the bit; the relay's launch on a storm-grown sea is within 0.5 mm of the client's model following the relay's sea, 2.5 mm on its document's; the replica follows the room's seas; a boat's model takes the water at its tick and replays onto the water before it.
…n sea The air on the hull: the replica's air (the scene's wind with the storms' fronts, a flow field) goes to the boat's model with the water, on the same timeline, so the storm wind blows on its hull as on the relay's. The client's air is the relay's to the bit. The relay's storms: room_world_on gains `weathers`, each weather node's live events and storm-wind peak with the tick it went in after. The replica's weather takes them at once (WeatherFriction::follow, SceneWorld::follow_weather) and makes its air again, which the holon takes as new water after that tick. The drawn sea: a water node shows another host's sea through two keys, water.sea (a keyframe in place of its own lag) and water.clock (the time it is drawn at), which the drawn node and WaterRuntime both read and seed empty. arigl writes them each frame after client_pump (show_relay_seas) for the water nodes of the relay's document its own document has, with the relay's time as the holon counts it, and the weather nodes' events and peak, so it draws the relay's sea at the relay's time under the relay's storms. Tests: the client's air matches the relay's at every point checked; the replica follows the relay's storms and makes its air again; show_relay_seas writes into a document of the same nodes only; a drawn water node follows water.sea at the next frame.
One key under the scene's state prefix, shown_clock (new shown_clock.h), is the time the scene is drawn at. Every drawn node whose look moves with time reads it in place of the app's world clock and seeds it empty: the water's waves, the weather node's storms, rain and lightning, the cloud sky, the forest's and a generated world's foliage's sway, and a wave_sea. It replaces the per-node water.clock and weather.clock keys. show_relay_seas writes it each frame with the relay's time as the holon counts it, and the sun: lighting.key_azimuth and lighting.key_elevation from the relay's key light in the room's scene env. Nothing moves the sun with time (no day cycle), so a sun the relay's document moves is followed. The fetch map is the last keyframe's: the relay's sea now rebuilds it when the open fetch moves too, as a client following the keyframe does. A sea followed from each of its keyframes is the grown sea's at every one. Tests: a sea followed from its 33 keyframes is the grown one's (the last differed before the fetch fix); show_relay_seas writes the shown clock and the relay's sun; a drawn storm is drawn at the shown time. Checked by hand with arigl snapshot: the same shown time draws the same image twice, another time another, on a lake and on lsystem_forest.ari.
A kinematic vehicle turns through its tick: the relay's kinematic box goes on a line between the bicycle's boxes at a navigator tick's ends, yaw included, so the pose's yaw rate is the tick's, and kinematic_vehicle_at now turns the box at it through the rest of the tick and starts the next tick at the relay's heading. Placed from samples every 4 ticks while turning: 2.3 mm off at a sample, 4.4 mm without the yaw rate. A jolt vehicle's wheels at the relay's steering: world::set_vehicle_steer puts a vehicle's steering actuator at an angle (clamped to its lock), and a jolt model placed from a sample that carries the relay's steering puts it there. Joining the relay's jolt Humvee mid-turn: 0.31 mrad of heading and 1.26 of attitude off at worst, 2.75 and 4.7 with straight wheels. A vehicle turned or sped up in place is placed again: the holon now re-places a predicted vehicle when its heading or velocity is off the sample by more than holon_config::reconcile_yaw_tol or reconcile_speed_tol, not only its place. Roadmap: the day-night cycle (FLEETS_AND_NIGHT_ROADMAP.md NL5) gains Joe's requirements: set against the system clock as an option, and a connected client on the server's time; D6 partly settled.
Ariadne OW5r: a sample corrects all of a vehicle's motion
Ariadne OW5q: a sea the relay's storms grow; clients follow it and draw the relay's world at its time
…running when the timeout comes On a loaded Debug runner (#1511's package-linux libcvc-debug, three tries), loading the document took over a second, so a 1 s timeout came before the test 'waits' started and the message named no test. 3 s leaves the load room; the message still names the test.
…/one-world-ow5p # Conflicts: # src/cvc/ariadne/scene_world.cpp # src/cvcGL/test/cvcgl_ariadne_physics.cpp
…/one-world-ow5p # Conflicts: # src/ari/ari_test_command_test.cpp
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.
OW5's sixteenth slice (ARIADNE_WORLDS.md §18.5). The car a client drives now meets the room's other avatars in its prediction, as the relay's car does: it knocks them aside and is slowed by them. A car on the dynamic and dynamic4w plants now meets the room too: walls, the room's vehicles and its avatars. Before, those models touched nothing. Stacked on #1469 (OW5n and OW5o have merged into it).
What changed
holon::held_obstacles). Each peer on foot that the walker's world holds becomes a box of the avatar body's size and mass (0.5 × 0.5 × 1.7 m, 70 kg), upright over its feet where the client shows it.client_pumpmarks those from the room's entities (holon::set_aboard).holon::set_mass.vehicle_obstacle). An avatar's box is frictionless on the relay too (avatar_world's material). A vehicle shoved along its heading rolls on its wheels; it doesn't drag like a box.dynamic_vehicle_model::hold_obstacles). Each step puts the box back where it is shown, and the client shows it a playout's delay behind the relay, so right after a knock it is still shown where it stood. Put back there, the car would hit it again every step.vehicle_obstacle::walk_force, the policy'sforce_max). Each step it is pushed back toward the velocity it is shown at, with up to that force, and kept upright, as the relay's walker does with the avatar.dynamic_vehicle_model::meets_world).options.physicson dyn_bike_plant and dyn_4w_plant).dynamic_vehicle::world) for the holon's replay.avatar_static::ground), so driving on it isn't a hit. It is set as the relay's world has it:world_replicamarks the bodies inSceneWorld::ground_bodies(new: the world on's ground) and a generated world's terrain.room_staticsmarks the room scene's plane.avatar_world::ground_bodieshands those bodies to the plant.Tests
AriadneOneWorld.AClientsCarMeetsTheRoomsAvatars: the relay's driver runs down a standing participant, and the client's jolt model gets samples every 4 ticks through the pose stream. "Off at a sample" is how far the model's car is from the relay's.AriadneOneWorld.AClientsDynamicCarMeetsTheRoom: the same ram, with the relay's car on the dynamic and the dynamic4w plants.HolonVehicleTest.TheJoltCarWeDriveMeetsTheRoomsAvatars: the car a holon predicts at full throttle passes a peer standing 15 m ahead. It ends 0.17 m short of where it gets with no one there, and exactly there when the peer is aboard. No rebuild was needed.HolonVehicleTest.TheJoltCarWeDriveMeetsTheRoomsVehiclesnow runs on jolt, dynamic and dynamic4w. On each, the car stops at a held vehicle (x −29.67) and drives through without it. A dynamic model built before anything was held is rebuilt once with room.HolonSyncTest.TheClientPumpTellsTheAvatarsOnFootFromThoseAboard:client_pumpholds a walking peer, not one driving a room vehicle, and holds the latter once it gets out.Not done yet
Not verified