Repository navigation
OW5l: a sea's waves under a predicted boat - #1481
Merged
Merged
Conversation
The relay's scene world now reads its water's waves at the clock's time: SceneWorld::follow sets the world's field time to the clock's at its first call, as world::follow does. The step ending on tick T reads the sea at T x fixed_dt however late the world was attached, and the bodies float on the waves the drawn sea shows. A client's boat model sets its world's field time to the sample's tick x fixed_dt, so it rides the relay's waves. AriadneOneWorld.AClientsBoatRidesTheRelaysWaves: on a lake with a 14 m/s wind sea that heaves the launch 0.71 m, each sample finds the model within 2.2 mm of it and 6.4 mm of its height; a model reading the waves half a second off is 171 mm off. The gust-front and wake frame-pacing tests now pin the clock-anchored field time.
The relay's pose for an entity whose chassis is a body in its world (a jolt vehicle, a boat's hull, a dynamic plant's box) now carries that body's attitude and vertical speed, for the room's entities and for a driver's pose alike; before, a turn about z alone. A jolt or boat model takes its chassis's pitch, roll and vertical speed from each sample; a heading-only sample (an older relay's) keeps the predicted ones. The drive axes read the pose's heading whatever its tilt. On OW5l's waves the boat model is within 7.9 mrad of the hull's attitude from its first sample (145 mrad before); the jolt Humvee within 3.7 mrad (17.5 before).
The relay streams the room's vehicles from conference::entity_pose_subjects, which still built a heading-only pose; OW5m had changed only holon's ride_of (a driver's pose and holon::entities). Both now use entity_ride (world_vehicles.h), with WorldVehicles::world() for the chassis. Every client draws the room's vehicles from that stream, so they were drawn level. client_run gains entity_gap: the jolt and boat runs check the vehicle's own entry in that stream is within 1e-6 rad of the chassis. Without this fix it was 169 mrad off for the jolt car on the hill and 207 mrad for the boat on the waves.
OW5m: a vehicle's attitude in its pose
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 twelfth slice (ARIADNE_WORLDS.md §18.5). A client now predicts the boat it drives on a sea's waves; OW5j did it on still water only. Stacked on #1470.
What changed
SceneWorld::followsets its world's field time to the clock's time at its first call, asworld::followalready does. The step ending on tick T then reads the sea at T × fixed_dt, however long the holon ran before the world was attached.dynamic_vehicle_model::atsets its world's field time to the sample's tick × fixed_dt (the holon passes the server's tick), and each step adds fixed_dt.Tests
AriadneOneWorld.AClientsBoatRidesTheRelaysWaves: the launch on a wider, deeper lake with a 14 m/s wind sea. The relay's holon ran 7 s before its world was attached.drive_as_the_world_does(used by every plant's test) now also checks that the relay world's field time equals the holon's tick × fixed_dt after attaching.AriadneSceneWeather.TheGustFrontIsInTheStepOnTheClocksTime: a world that anchors late now has the clock's field time and an air offset of 0, where before its offset was the clock's time. The air read at its field time is still the storms at the clock's time.AriadneBoatNode.TheWakesPushIsTheSameAtAnyFramePacingnow anchors at t = 0 before its first frame, as a drawn scene does. Before, its 0.137 s run anchored after a frame of 8 quanta, and the wake's field time is in the state hash it compares.Not done yet
Not verified
HolonVehicleTest) still uses a hand-built still lake. On waves, only the model's path is tested. The holon's reconcile passes the server's tick toat(), which is the only input the change needs.