Skip to content

Ariadne: a wheeled vehicle look, its wheels rolled, steered and on the ground - #1472

Merged
transfix merged 1 commit into
masterfrom
feat/vehicle-look-wheels
Nov 23, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/vehicle-look-wheels

Conversation

@transfix

Copy link
Copy Markdown
Owner

A vehicle's model look can now turn its wheels. In cvcdbg's demo3 port, the Humvees' wheels don't turn: look: { model: humvee } draws Humvee.glb, one mesh with its wheels in it, and vehicle_view merges it (m.merged()). pose_vehicle_wheels poses only the box look's _wheel0..3. This adds a wheeled look: a chassis mesh plus one wheel mesh, each wheel posed from entity_wheel exactly as the box look's are.

look:
  file: vehicles/humvee/chassis.glb   # the chassis, without its wheels
  wheel: vehicles/humvee/wheel.glb    # one wheel: the left front
  wheelbase: 3.228                    # the model's own (m)
  track: 1.8743

What it does

  • The files' frame. Both files are in the vehicle's frame, as written (x forward, y left, z up; no axis turned):
    • the chassis's origin is midway between its axles, on its centre line, on the ground;
    • the wheel's origin is its hub, its axle along y, its outer face toward +y.
  • The wheels.
    • The wheel is drawn once for each of the vehicle's wheels (<node>_tyre<k>, in WorldVehicles::wheels' order).
    • Each frame, pose_vehicle_wheels poses each one from that wheel's entity_wheel: at its hub, Rz(steer) Ry(spin), on its suspension or the ground.
    • A pose entity's wheels roll at its pose's speed, its front ones turn by its steer, and each sits on the grid's ground.
    • A right wheel is the wheel turned half a turn about z.
  • Fitting (a wheeled look's default; fit: false draws both at their own size):
    • the chassis is scaled on each axis so its axles (wheelbase:), its track (track:) and its wheel radius (half the wheel mesh's height) are the vehicle's, its origin at the axles' middle;
    • the wheel is scaled to the vehicle's wheel radius.
  • Finding the wheel. The wheel is found as the mesh is: file:, model: (both by name), asset:, or with data: a file in the same package.
    • A look whose wheel can't be found or read is drawn as its box, with a warning.
  • The catalog publishes look.wheel, look.wheelbase and look.track, so vehicle_preview stands the wheels on its set too.
  • Unchanged: the single-mesh model: and file: looks are drawn as before. The world side is unchanged: entity_wheel, WorldVehicles::wheels, the entity keys and the pose path. WorldVehicles only publishes the three keys above.
  • Docs: docs/ARIADNE.md ("Wheeled looks: wheels that turn") says which files are the chassis and the wheel, and their frame. ARIADNE_WORLDS.md notes it under Poses.

Tests

  • AriadneWorldVehicles.WheeledLooks:
    • wheel:, wheelbase:, track: parse; fit is the default;
    • the wheel resolves beside the document, by model name, as an asset, and in a data package;
    • a missing wheel draws the box with a warning;
    • wheel: without a mesh, or a negative track, is an error.
  • cvcgl_ariadne_physics's test_vehicle_pose_wheeled_look, on a pose entity at 6 m/s with 0.2 rad of steer:
    • the chassis is fitted on each axis (3.3/3, 1.82/2, 0.47/0.5) and hangs the stand height below the chassis;
    • there are four wheel nodes, each at its entity_wheel hub on the ground;
    • each wheel is rolled (a frame later, rolled further), the front ones steered 0.2 and the rear ones not;
    • each wheel mesh is the Humvee's radius, with its outer face out on both sides;
    • the preview's four wheels stand at rest;
    • an unreadable wheel leaves the look unready, with a warning naming it;
    • both meshes come from a data package once it has loaded.
  • Local, Release with Jolt and YAML on Linux: cvcgl_ariadne_physics all pass; ariadne_scene_world_test 114 pass and 1 skipped (FleetBench, already skipped before).

Follow-ups (not here)

  • Per-wheel suspension for pose entities. entity_pose could carry each wheel's height (for example demo3's Jolt or dynamic4w suspension). Today a pose entity's wheels sit on the grid's ground under each hub.
  • Named wheel nodes in one model. The other way to give a model separate wheels needs cvc::model to keep glTF node transforms and names. Its assimp import doesn't apply node transforms today.

…e ground

A one-piece vehicle model (look: { model: humvee }, Humvee.glb's one mesh) draws its wheels still:
vehicle_view merges it, and pose_vehicle_wheels poses only the box look's wheels. A wheeled look is
a model in two parts:

  look: { file: chassis.glb, wheel: wheel.glb, wheelbase: 3.228, track: 1.8743 }

- The chassis mesh without its wheels, and one wheel's mesh, both in the vehicle's frame (x
  forward, y left, z up; the chassis's origin midway between its axles on the ground, the wheel's
  its hub, axle along y, outer face toward +y).
- The wheel is drawn once per wheel of the vehicle (<node>_tyre<k>, WorldVehicles::wheels' order)
  and posed each frame from entity_wheel as the box look's are: at its hub, Rz(steer) Ry(spin), on
  its suspension or the ground. A pose entity's wheels roll at its pose's speed and its front ones
  turn by its steer. A right wheel is the wheel turned half a turn about z.
- With fit (a wheeled look's default) the chassis is scaled per axis so its axles (wheelbase:),
  track (track:) and wheel radius (half the wheel mesh's height) are the vehicle's, and the wheel
  to the vehicle's wheel radius; fit: false draws both at their own size.
- The wheel is found as the mesh is (file:, model:, asset:, or a file in a data: package), and a
  look whose wheel cannot be found or read is drawn as its box, with a warning. The catalog
  publishes look.wheel, look.wheelbase and look.track, so vehicle_preview draws the wheels too.
- The single-mesh model: and file: looks are drawn as before.

Docs: ARIADNE.md ("Wheeled looks: wheels that turn"), ARIADNE_WORLDS.md. Tests:
AriadneWorldVehicles.WheeledLooks (parse, resolve, errors) and cvcgl_ariadne_physics's
test_vehicle_pose_wheeled_look (a pose entity with speed and steer: the fitted chassis, each
wheel at its hub, rolled, the front steered and the rear not, the right one turned; the preview's
wheels at rest; an unreadable wheel).
@transfix
transfix enabled auto-merge (squash) November 23, 2026 01:27
@transfix
transfix disabled auto-merge November 23, 2026 01:27
@transfix
transfix merged commit 316b440 into master Nov 23, 2026
31 checks passed
@transfix
transfix deleted the feat/vehicle-look-wheels branch November 23, 2026 07:51
transfix added a commit that referenced this pull request Nov 23, 2026
transfix added a commit that referenced this pull request Nov 23, 2026
…1472's tests)

attach_vehicle_model names a parted look's nodes after its group, so the preview's wheels are
<node>_wheel<k>. The wheeled-look test checks the preview's wheels at rest at their fitted hubs and
that an unreadable wheel fails with a warning naming it. ARIADNE_WORLDS.md notes the parted look.
transfix added a commit that referenced this pull request Nov 23, 2026
The closed schema lands after the PRs that add loader keys, so it carries
their keys now:

- notifications: always, as well as a flag (#1450);
- a tray_icon's icon: and auth: (#1450);
- a color picker's fmt: rgb | hex (#1452);
- a load:'s name:, a key or an expression that names the application
  (#1485);
- scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and
  in a scene of its own (#1475).

Master's own new keys need none: #1472's look: wheel:, wheelbase: and
track: sit in world:, which the world rules check, and #1399's region: is
a custom node's own key.

AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs
finds fmt: cmyk and notifications: sometimes.
transfix added a commit that referenced this pull request Nov 23, 2026
…1472) (#1471)

* Revert "Ariadne: a wheeled vehicle look, its wheels rolled, steered and on the ground (#1472)"

This reverts commit 316b440.

* Ariadne: a parted vehicle look whose wheels roll and steer; every plant's wheels roll

A look in parts (look: { chassis:, wheel:, rig: }): the chassis mesh, one wheel mesh and a rig
(cvc::ariadne::vehicle_rig: hubs, radius, steer:, mirror:, up:; inline or a YAML/JSON file),
fitted to the vehicle per axis. Each wheel is a node of its own, posed each frame from the
vehicle's wheels (parted_wheel_poses): at its hub, rolled by its spin, steered when the rig
steers it. The parts may come from a data: package.

entity_wheel's spin is now set on every plant (a Jolt wheel's own rotation; the others rolled
at the chassis's speed each physics step), with its radius and whether its axle steers.
parse_value reads a YAML/JSON text as a Value. Documented in docs/ARIADNE.md.

* vehicle_view: a right wheel turned before it is scaled (setRotation drops the scale)

* vehicle_preview draws a parted look; an unreadable wheel warns (from #1472's tests)

attach_vehicle_model names a parted look's nodes after its group, so the preview's wheels are
<node>_wheel<k>. The wheeled-look test checks the preview's wheels at rest at their fitted hubs and
that an unreadable wheel fails with a warning naming it. ARIADNE_WORLDS.md notes the parted look.
transfix added a commit that referenced this pull request Nov 24, 2026
)

* Ariadne: a closed .ari schema every load checks, and ari validate

The .ari document's structure gets a formal definition, roadmap section 15,
now docs/ARIADNE.md section 14:

- src/cvc/ariadne/schema/ari.v1.schema.json: one JSON Schema for every
  top-level block, all 35 built-in widget types, the scene, include: and
  load: sites, with descriptions. Every map is closed: an unknown key is an
  error, except x- keys, a custom widget's or node's own keys, and a block an
  app registered or the document declares in customs:. A widget's type is its
  first type key in the loader's order. It keeps to json-schema-validator's
  draft-7 subset.
- CMake embeds it (CvcEmbedText.cmake) for ari_schema_json() and installs it
  under share/libcvc/ariadne/schema/.
- With the validator built in, every load checks the document, its import:ed
  libraries, its load: fragments and each include: expansion (placed in the
  unit's own file), as warnings and LoadResult::schema_issues with line and
  column. The compiled validators live in a cvc::app slot.
- validate_string / validate_file check without loading, the document's own
  units instantiated with their declared args.
- ari validate [--structural-only] [--strict] [--json] and ari schema.
- ci.yml: package-linux's configure assertion also requires the validator.

All 176 shipped documents are valid; reopen_refit.ari gains its missing
meta.min_libcvc. Five loader tests that feed bad values count the loader's own
warnings and check the schema flags the same pointer. New ariadne_schema_test
and ctests for ari validate and ari schema.

* Ariadne schema: scene: clock: hz, the world's rate

OW8 (#1441) gave the scene's clock an hz key: a whole number of ticks a
second from 10 to 240, as sim_rate_valid takes it. The schema takes it the
same way in both clock entries, and ClockBlockTakesAWorldsRate checks that the
schema accepts hz: 60 and flags each rate the loader warns about.

* Ariadne schema: the hosts' blocks in their short forms

wasm: takes a guest's path alone and relay: a relay's URL alone, as
their readers do; a bare server: or world: sets nothing, as theirs do.
The schema took a map only, so WasmWasiTest's `wasm: all.wat`, under
min_libcvc 3.7.13, failed its load on Linux.

* Ariadne schema: the keys the open PRs add to the loader

The closed schema lands after the PRs that add loader keys, so it carries
their keys now:

- notifications: always, as well as a flag (#1450);
- a tray_icon's icon: and auth: (#1450);
- a color picker's fmt: rgb | hex (#1452);
- a load:'s name:, a key or an expression that names the application
  (#1485);
- scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and
  in a scene of its own (#1475).

Master's own new keys need none: #1472's look: wheel:, wheelbase: and
track: sit in world:, which the world rules check, and #1399's region: is
a custom node's own key.

AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs
finds fmt: cmyk and notifications: sometimes.
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