Repository navigation
OW5m: a vehicle's attitude in its pose - #1484
Merged
Merged
Conversation
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.
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 thirteenth slice (ARIADNE_WORLDS.md §18.5). The relay's poses now carry a vehicle's pitch and roll, so a client draws the room's vehicles tilted as they are, and a driven jolt car's or boat's prediction starts from the relay's attitude. Stacked on #1481.
What changed
entity_ride, world_vehicles.h). It applies when an entity's chassis is a body in the relay's world: a jolt vehicle, a boat's hull, or a dynamic plant's box. The pose then has that body's rotation and vertical speed; before, it was a turn about z alone. The pose stream already carried a full quaternion, so the wire format is unchanged.conference::entity_pose_subjects, which every client draws them by).holon::entities(). The stream arisrv actually sends for the room's vehicles still had the heading only, so clients drew them level. Both now shareentity_ride, andWorldVehicles::world()gives the relay's stream the chassis.dynamic_vehicle_model::at). Its spin stays the predicted one, because the stream doesn't carry it.2·atan2(z, w), which is right only for a turn about z alone; it now usesheading_of, the general formula.Tests
AriadneOneWorld)client_run::entity_gap): within 1e-6 rad of the chassis in the jolt and boat runs. Without the fix it was 169 mrad off for the jolt car on the hill and 207 mrad for the boat on the waves.acoswould otherwise read as 1 mrad.HolonVehicleTest.TheBoatWeDriveIsPredictedAndReconciled: a rolled sample puts the hull at its roll; a heading-only sample after it keeps that roll.Not done yet
Not verified