Skip to content

ariadne: a pose entity's model hangs its stand height below its chassis - #1447

Merged
transfix merged 1 commit into
masterfrom
fix/ariadne-pose-model-base
Nov 22, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/ariadne-pose-model-base

Conversation

@transfix

Copy link
Copy Markdown
Owner

A pose entity drawn with a fitted model (look: { model: ... }, a fitted file, a data look) could float above its terrain or sink into it, by different amounts after each spawn or removal.

Cause

sync_vehicle_markers set the model's base at ground_z - z: the grid's ground under the chassis, relative to it, taken when the vehicle view was built. The view is rebuilt whenever an entity comes or goes. room_entities_of sends the same value to a relay's clients.

  • A plant: its chassis rides on the grid's ground, so that value is its ride height.
  • A pose entity: its chassis is wherever an outside simulation puts it, on that simulation's own terrain, which the grid may not match (a flat grid, a coarser one, or none of its heights). Its model hung by whatever lay between the two at the last rebuild.

In one host whose world grid was flat (z 0) but whose terrain wasn't, the models were drawn 1.35 m above the ground. That offset was fixed at the rebuild and only changed when an entity came or went.

Fix

  • stand_height(vehicle_desc) (world_vehicles.h): half the box's height plus the front wheels' radius (0.4 m with no axles). It's now public, and the kinematic box's placement and stand_z use it: where a kinematic box stands, and where a pose with no z stands.

  • A pose entity's model hangs stand_height below its chassis, wherever its poses put it:

    • drawn: vehicle_view.cpp;
    • sent to a relay's clients: room_entities_of, room_entity::base_z.

    A pose with no z stands at the same height over the ground, so that model's base is the ground. With a z, the model's wheels are where the outside simulation's chassis puts them.

  • Plants are unchanged.

  • docs/ARIADNE.md: the pose table's z row says where the model is drawn.

Tests

  • cvcgl_ariadne_physics, test_vehicle_pose_model_base:

    • a pose entity with a fitted file look, 6 m over a flat grid;
    • then a second entity comes, so the view is rebuilt, with the first at 2.5 m;
    • each model's base is -stand_height (-0.92 m for the Humvee).

    Without the fix, its 3 base checks fail (-6 m, then the rebuild's values).

  • ariadne_scene_world_test, AriadneWorldVehicles.APoseEntitysModelHangsItsStandHeightBelowIt:

    • room_entities_of gives base_z = -stand_height at z 6 and 2.5;
    • with no z, the base lands on the ground.
  • Ran on Linux (Release, Jolt): cvcgl_ariadne_physics all OK, and the 41 AriadneWorldVehicles.* and AriadneOneWorld.* tests pass. The full suite wasn't run here.

A fitted model's base was the grid's ground under the chassis, relative to it, taken when the
vehicle view was built, and it is rebuilt whenever an entity comes or goes. A plant's chassis
rides on the grid's ground, but a pose entity's is wherever an outside simulation puts it, on
that simulation's terrain, which the grid may not match (a flat grid, or a coarser one): its
model floated or sank by whatever lay between them at the last rebuild, and moved at every
spawn or removal.

stand_height(vehicle_desc) is now public: half the box's height plus the front wheels' radius,
where a kinematic box and a pose entity with no z stand. A pose entity's model hangs that far
below its chassis, drawn (vehicle_view) and sent to a relay's clients (room_entities_of).
Plants are unchanged.
@transfix
transfix enabled auto-merge (squash) November 22, 2026 06:25
@transfix
transfix merged commit eb3e3da into master Nov 22, 2026
55 of 56 checks passed
@transfix
transfix deleted the fix/ariadne-pose-model-base branch November 22, 2026 08:31
transfix added a commit that referenced this pull request Nov 22, 2026
Brings in master through 08a7386 (#1413, #1430, #1446, #1420, #1447, #1435). No conflicts; nothing in it touches state_exec.
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