Skip to content

OW5d: predict the vehicle a client drives on the dynamic plant - #1448

Merged
transfix merged 7 commits into
feat/one-world-staticsfrom
feat/one-world-dynamic
Nov 22, 2026
Merged

transfix merged 7 commits into
feat/one-world-staticsfrom
feat/one-world-dynamic

Conversation

@transfix

Copy link
Copy Markdown
Owner

OW5's fourth slice (ARIADNE_WORLDS.md §18.5): a client now predicts the vehicle it drives (or is) when that vehicle runs on the dynamic plant, as OW5b does for the kinematic plant. Until now such a vehicle was played out a round trip behind the driver's keys. Stacked on #1444.

What changed

  • The relay says how the vehicle runs. dynamic_drive (new vehicle_drive.h) carries:

    • the vehicle: its archetype's preset plus mass, top speed, acceleration, braking and steering lock, which make the same vehicle_desc through vehicle_desc_of;
    • the navigator's hold on a command: the fleet's steering lock, the top speed and the braking a tick's acceleration is held to, from sim_world::plant_plan_of, in SI;
    • the steps per navigator tick and the clock phase it ticks on.

    WorldVehicles::dynamics fills it, and the room's entities carry it as room_entity::dynamics (keys entities.e<id>.dynamics.*).

  • dynamic_vehicle_model (new vehicle_dynamics.h) is a dyn_bike_plant with that one vehicle and no world, stepped one substep per physics step.

    • At a navigator tick it applies the sim's override arm (the lock, then the speed hold, in the sim's floats) before giving the command to the plant.
    • The chassis box goes where each substep starts and moves one step at the model's velocity, as the relay's world moves the body.
    • at() rebuilds the model from a pose-stream sample. The stream carries no yaw rate, steering angle or driver state, so those come from what was predicted for that tick.
  • dyn_bike_plant::save / restore (dyn_bike_saved: the model's state, the wheels, the driver, the held command), plus rear_axle(i). The holon logs the vehicle by tick and replays from a sample with these.

  • holon::predict_vehicle(pid, dynamic_drive) and predicted_vehicle(pid, dynamic_vehicle&) work as the kinematic versions do:

    • within reconcile_tol of the prediction for the sample's tick, nothing changes;
    • otherwise it restarts from the sample and replays the inputs since.

    state() and display_pose() handle either model.

  • client_pump predicts a ride whose entity carries a valid dynamics, as it already does one with a valid drive. arigl needs no change: it draws display_pose.

Tests

  • AriadneOneWorld.AClientRunsTheDynamicVehicleItDrivesAsTheWorldDoes: the relay's world with a drivable Humvee on the dynamic plant, against the client's model on the same drive axes. Worst error over 9 s of throttle, a turn, braking and reverse: 0.000007 m and 0.000002 rad (top speed 9.97 m/s). The room's entities carry the same dynamics, and kinematics() refuses this vehicle.

  • HolonVehicleTest.TheDynamicVehicleWeDriveIsPredictedAndReconciled:

    • over 600 steps, turning at up to 0.68 rad/s with samples every 4 ticks, nothing is corrected (0 m);
    • a 1.5 m push is corrected by exactly 1.500 m, and the prediction agrees again (0.0000 m).

    Also checked: a server, no numbers, and an unknown preset are refused.

  • HolonSyncTest.TheClientPumpPredictsTheDynamicVehicleWeDrive: the numbers round-trip through the room's entities, and client_pump keeps the driver local, predicts the vehicle and runs it on. Getting out gives back the walker.

  • Locally, these suites pass: scene world 110, holon 51, holon sync 34, dyn_bike_plant 11, avatar sim 8, room scene 21, room avatar 10, room intrinsics 21, server document 23, world dataset 4, pose stream 13. arigl builds.

Not verified

  • I haven't run a live arisrv + arigl session.
  • The client's model runs on flat ground. On a slope or against a wall, the relay's samples correct it rather than the client predicting it.
  • A reconcile takes the yaw rate, steering and driver state from the client's own prediction for that tick. After a correction that changed them (a collision), the replay starts from the client's values until the next sample.
  • dynamic4w, jolt and boats are still played out.

The relay publishes what a client needs to run a `dynamic` vehicle
(dynamic_drive: its preset and five numbers, the navigator's hold on a
command, the ticks it ticks on; WorldVehicles::dynamics,
room_entity::dynamics). dynamic_vehicle_model runs the relay's
dyn_bike_plant with that vehicle alone and no world, one substep a
physics step; dyn_bike_plant::save/restore let the holon log and replay
it. holon::predict_vehicle takes a dynamic_drive, and client_pump uses
it when the room's entity carries one.
@transfix
transfix merged commit 6d63163 into feat/one-world-statics Nov 22, 2026
6 of 21 checks passed
@transfix
transfix deleted the feat/one-world-dynamic branch November 22, 2026 21:59
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