Repository navigation
OW6a: driving from a client — control schemes, brake and reverse apart, the jump, getting in by asking - #1415
Merged
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.
…/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
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.
Section 18.6 of ARIADNE_WORLDS, first phase (keyboard and mouse). Stacked on #1387 (OW3); moves onto master after it.
Control schemes per kind (
inc/cvc/ariadne/controls.h): walk, car and boat, each with its own bindings, so a car's keys are not a person's.Getting in switches to the vehicle's scheme (the archetype's
controls:, else by plant), getting out back to walking. arigl lists all three in the Controls window (walk stays at<viewer>.avatar.keys.*; vehicles at<viewer>.controls.<scheme>.*).Drive axes as shares.
avatar_intentnow carriessteer[-1, 1],throttle[-1, 1] (negative is reverse),brake[0, 1] andjump;intent.accelis gone from the wire. The server scales them by the driven vehicle's ownmax_steer/max_accel/max_decel(holon::drive_command):The jump. The walker jumps at its controller's
jump_speed(4 m/s, about 0.8 m) while held and standing on something; the reserve pays for it.Getting in by asking. The client writes
participants.<pid>.drive = "<seq>:<entity>"(request_drive,room-drive).server_pumpanswers once indrive_statusand publishesdriving; both are relay-owned inroom_write_gate.holon::get_inenforces the archetype'sdrivable: trueandreach:(3 m from the chassis box). Room entities carrydrivable,reachandcontrols.arigl
drive_target, ahead first): "E Drive truck", with a ring filling as E is held; refusals are shown briefly.traffic.ari's trucks are drivable.Tests
ControlSchemes.EachSchemeHasItsOwnBindingsHolonSyncTest: the drive axes and jump on the wire, an ask answered once, our pose played out while driving, the drive target.HolonPhysicsTest.AnAvatarJumpsFromTheFloorAndNotInTheAir: peak 0.80 m, three landings in 3 s.AriadneOneWorld.TheDriveAxesAreSharesOfTheVehiclesEnvelopeAriadneOneWorld.ACarBrakesToAStopAndOnlyReverseBacksItUp: braked 5.76 to 0.01 m/s and held; reverse -6.65 m/s.AriadneOneWorld.GettingInIsAskedForInTheRoomAndRuledOnRoomWriteGate: driving and drive_status are the relay's.Locally on Windows Release, the related suites pass.
cvcgl_ari_goldenfails on its orthoslicer frame, the known Intel Arc failure.cvcgl_ariadne_swarmfailed under -j8 and passed solo.Not checked: driving in a live arigl + arisrv session (prompt, scheme switch, chase camera direction). That is the next thing to try:
arisrv --doc cvc://worlds/traffic.ari, then join with arigl, walk to a truck and hold E.Next: OW6b (gamepads, desktop and web), OW6c (avatars that are vehicles, first-person walk).