Repository navigation
OW5d: predict the vehicle a client drives on the dynamic plant - #1448
Merged
Merged
Conversation
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.
# Conflicts: # inc/cvc/ariadne/world_vehicles.h # src/cvc/CMakeLists.txt
…op of the stack # Conflicts: # inc/cvc/ariadne/world_vehicles.h
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 fourth slice (ARIADNE_WORLDS.md §18.5): a client now predicts the vehicle it drives (or is) when that vehicle runs on the
dynamicplant, 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(newvehicle_drive.h) carries:vehicle_descthroughvehicle_desc_of;sim_world::plant_plan_of, in SI;WorldVehicles::dynamicsfills it, and the room's entities carry it asroom_entity::dynamics(keysentities.e<id>.dynamics.*).dynamic_vehicle_model(newvehicle_dynamics.h) is adyn_bike_plantwith that one vehicle and no world, stepped one substep per physics step.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), plusrear_axle(i). The holon logs the vehicle by tick and replays from a sample with these.holon::predict_vehicle(pid, dynamic_drive)andpredicted_vehicle(pid, dynamic_vehicle&)work as the kinematic versions do:reconcile_tolof the prediction for the sample's tick, nothing changes;state()anddisplay_pose()handle either model.client_pumppredicts a ride whose entity carries a validdynamics, as it already does one with a validdrive. arigl needs no change: it drawsdisplay_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 samedynamics, andkinematics()refuses this vehicle.HolonVehicleTest.TheDynamicVehicleWeDriveIsPredictedAndReconciled: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
dynamic4w,joltand boats are still played out.