Repository navigation
OW5e: predict the vehicle a client drives on the dynamic4w plant - #1453
Merged
Merged
Conversation
…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 fifth slice (ARIADNE_WORLDS.md §18.5): a client now predicts the vehicle it drives (or is) when that vehicle runs on the
dynamic4wplant, as #1448 (OW5d) does for thedynamicplant. Until now such a vehicle was played out a round trip behind the driver's keys. Stacked on #1448.What changed
The relay says which plant, and the height it rides from.
dynamic_drivegains:plant:dynamicordynamic4w;ground: the height dyn_4w_plant measures its vehicles' heights from (ground_reference(), the ground under its first vehicle's start).WorldVehicles::dynamicsnow answers for adynamic4wvehicle too. The room's entities carry both fields (entities.e<id>.dynamics.plant,.ground). An entity written withoutplantreads asdynamic.dyn_4w_plant::save/restore(dyn_4w_saved: the model's state with the suspension, the driver, the held command), plusrear_axle(i)andbox_pose(i, ...), as OW5d: predict the vehicle a client drives on the dynamic plant #1448 adds to dyn_bike_plant.dynamic_vehicle_modelruns either plant. Fordynamic4wit builds adyn_4w_plantwith that one vehicle and no world, on flat ground atground, one substep per physics step.dynamic_vehicle::modelis now astd::variantof the two plants' saved states.dynamic_vehicle_statedraws it leaning with them.A driver's pose carries its heading alone (holon's
ride_of). Soat()ondynamic4wtakes the box's attitude from the sample's yaw plus the model's pitch and roll. Heave, roll, pitch and their rates come from what was predicted for that tick, as the yaw rate already does.The holon and
client_pumpneed no new code:predict_vehicle(pid, dynamic_drive)builds whichever model the drive names.Tests
AriadneOneWorld.AClientRunsTheFourWheelVehicleItDrivesAsTheWorldDoes: the relay's world with a drivable Humvee ondynamic4w, against the client's model on the same drive axes, over the same 9 s of throttle, a turn, braking and reverse. Worst errors:The OW5d test now shares this body (
drive_as_the_world_does), and still gets 0.000007 m and 0.000002 rad.HolonVehicleTest.TheFourWheelVehicleWeDriveIsPredictedAndReconciled, which shares its body with OW5d's:Also checked: stepping a vehicle of the other plant throws, and
joltisn't a plant a client runs.HolonSyncTest.TheClientPumpPredictsTheFourWheelVehicleWeDrive: the plant and the height round-trip through the room's entities, and client_pump predicts the vehicle on the four-wheel model.Locally, these suites pass: scene world 111, holon 52, holon sync 35, dyn_4w_plant 8, dyn_bike_plant 11, room scene 21, room avatar 10, room intrinsics 21, server document 23, world dataset 4, pose stream 13, avatar sim 8. arigl builds.
Not verified
joltand boats are still played out.