Skip to content

OW6a: driving from a client — control schemes, brake and reverse apart, the jump, getting in by asking - #1415

Merged
transfix merged 20 commits into
masterfrom
feat/one-world-drive
Nov 21, 2026
Merged

transfix merged 20 commits into
masterfrom
feat/one-world-drive

Conversation

@transfix

Copy link
Copy Markdown
Owner

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.

Scheme Default keys
walk W/S forward/back, A/D strafe, Space jump, V mouse look on/off, E held 0.4 s gets in
car W throttle, S reverse, Space brake, A/D steer (ramped over 0.25 s), E held gets out
boat the car's, no brake

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_intent now carries steer [-1, 1], throttle [-1, 1] (negative is reverse), brake [0, 1] and jump; intent.accel is gone from the wire. The server scales them by the driven vehicle's own 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 its reverse is the propeller astern.

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_pump answers once in drive_status and publishes driving; both are relay-owned in room_write_gate. holon::get_in enforces the archetype's drivable: true and reach: (3 m from the chassis box). Room entities carry drivable, reach and controls.

arigl

  • A prompt over the nearest drivable vehicle in reach (drive_target, ahead first): "E Drive truck", with a ring filling as E is held; refusals are shown briefly.
  • While driving, the client plays its own pose out from the relay's samples instead of predicting it (OW5 predicts it).
  • Every driver's marker is hidden, and the camera swings behind the moving vehicle.

traffic.ari's trucks are drivable.

Tests

  • ControlSchemes.EachSchemeHasItsOwnBindings
  • HolonSyncTest: 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.TheDriveAxesAreSharesOfTheVehiclesEnvelope
  • AriadneOneWorld.ACarBrakesToAStopAndOnlyReverseBacksItUp: braked 5.76 to 0.01 m/s and held; reverse -6.65 m/s.
  • AriadneOneWorld.GettingInIsAskedForInTheRoomAndRuledOn
  • RoomWriteGate: driving and drive_status are the relay's.

Locally on Windows Release, the related suites pass. cvcgl_ari_golden fails on its orthoslicer frame, the known Intel Arc failure. cvcgl_ariadne_swarm failed 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).

…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
…40 steps

master's #1384 (fleets) wrote it at the 0.01 s step; with #1378's 1/120 s quanta 240 steps are
2.0 s, and the fleet, from rest at about 1.75 m/s^2, makes 4.35 m of the 5 m it asks for. 2.4 s
(288 steps) makes 6.1 m.
…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.
Base automatically changed from feat/one-world-entities to master November 21, 2026 12:52
…/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
@transfix
transfix merged commit e912090 into master Nov 21, 2026
30 checks passed
@transfix
transfix deleted the feat/one-world-drive branch November 21, 2026 17:45
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