Skip to content

World vehicles steer around each other, on one plant and across plants - #1339

Merged
transfix merged 2 commits into
masterfrom
feat/world-avoid
Nov 18, 2026
Merged

transfix merged 2 commits into
masterfrom
feat/world-avoid

Conversation

@transfix

Copy link
Copy Markdown
Owner

Track 1 of the local-world gaps: vehicles in a world steer around each other.

Why

The world runtime turned on none of the navigator's inter-agent steering (separation, yield, gap keeping), so vehicles met only physically. Two kinematic boxes drove through each other, and a kinematic box shoved a dynamic chassis back the way it came. The roadmap's note said only vehicles on different plants were affected; in fact none steered around each other.

Change

  • cvc::nav::sim_world::set_foreign_agents takes points outside the world (another fleet's vehicles). The separation steers each agent away from them as it would from a peer. Nothing moves them, and gap keeping and yielding don't see them. It's empty by default, so existing runs are byte-unchanged.
  • Passing on the right (config::sep_side, sep_side_radius; set_separation_side). A peer ahead, within sep_side_radius and no further than sep_radius off the agent's line, turns the agent's carrot right. The turn is sep_side × the peer's weight × the carrot's distance. Two vehicles meeting head on both swing right and pass, where the push along the line between them only slowed them. It defaults to off.
  • WorldVehicles turns this on by default (set_avoid, or the vehicles.avoid key). Separation runs at 5 vehicle radii with 1.5 radii of strength, and the turn at 0.6 with a 20-radius look-ahead. Before each fleet steps, it gets the other plants' vehicles as foreign agents. Turning avoidance off changes the navigators in place, without rebuilding them.

Tests

  • AriadneWorldVehicles.VehiclesSteerAroundEachOtherOnOneAndManyPlants: two vehicles head on, 0.5 m off one line.
    • Two kinematic cars pass 2.40 m apart instead of 0.50 m.
    • A kinematic car and a dynamic one pass 2.68 m apart and both get past. Without avoidance the car shoves the other 52 m back.
    • The key turns avoidance off.
  • Windows Release: 2,050/2,050 of the Ariadne/world/gym/vehicle/nav/plant/sim/server-document/cvcgl ctest set pass with avoidance on by default. Changed lines are clang-format clean.

Not yet

  • Avoidance is reactive. The vehicles don't plan routes around each other.
  • Optional sensing and belief for the fog demos, and nav_stats with agents added and removed. Both are the rest of track 1, in a follow-up.

The world runtime turned on none of the navigator's inter-agent steering,
so vehicles met only physically: two kinematic boxes drove through each
other, and a kinematic box shoved a dynamic chassis back the way it came.

- cvc::nav::sim_world::set_foreign_agents: points outside the world
  (another fleet's vehicles) that the separation steers each agent away
  from as from a peer; nothing moves them, and min_gap and yielding do not
  see them. Empty by default: runs are byte-unchanged.
- sim_world::config::sep_side and sep_side_radius: passing on the right.
  A peer ahead, within sep_side_radius and no further than sep_radius off
  the agent's line, turns its carrot right by sep_side times the peer's
  weight times the carrot's distance, so two that meet head on both swing
  right and pass, where the push along the line between them only slowed
  them. Default 0 = off. set_separation_side sets them.
- WorldVehicles: on by default (set_avoid, the vehicles.avoid key): every
  navigator's separation at 5 vehicle radii and 1.5 radii of strength, the
  turn at 0.6 with a 20-radius look-ahead, and before each fleet steps the
  other plants' vehicles as its foreign agents. Turning it off changes the
  navigators in place.

Test: AriadneWorldVehicles.VehiclesSteerAroundEachOtherOnOneAndManyPlants
(head on, 0.5 m off one line: two kinematic cars pass 2.40 m apart
instead of 0.50 m; a kinematic car and a dynamic one pass 2.68 m apart
and both get past, where without it the car shoved the other 52 m back;
the key turns it off).
The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and
NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before
#1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate
drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the
segmentation action test has.

(cherry picked from commit dc5fff6)
@transfix
transfix merged commit d1a9286 into master Nov 18, 2026
29 checks passed
@transfix
transfix deleted the feat/world-avoid branch November 18, 2026 04:29
transfix added a commit that referenced this pull request Nov 18, 2026
* World vehicles steer around each other, on one plant and across plants

The world runtime turned on none of the navigator's inter-agent steering,
so vehicles met only physically: two kinematic boxes drove through each
other, and a kinematic box shoved a dynamic chassis back the way it came.

- cvc::nav::sim_world::set_foreign_agents: points outside the world
  (another fleet's vehicles) that the separation steers each agent away
  from as from a peer; nothing moves them, and min_gap and yielding do not
  see them. Empty by default: runs are byte-unchanged.
- sim_world::config::sep_side and sep_side_radius: passing on the right.
  A peer ahead, within sep_side_radius and no further than sep_radius off
  the agent's line, turns its carrot right by sep_side times the peer's
  weight times the carrot's distance, so two that meet head on both swing
  right and pass, where the push along the line between them only slowed
  them. Default 0 = off. set_separation_side sets them.
- WorldVehicles: on by default (set_avoid, the vehicles.avoid key): every
  navigator's separation at 5 vehicle radii and 1.5 radii of strength, the
  turn at 0.6 with a 20-radius look-ahead, and before each fleet steps the
  other plants' vehicles as its foreign agents. Turning it off changes the
  navigators in place.

Test: AriadneWorldVehicles.VehiclesSteerAroundEachOtherOnOneAndManyPlants
(head on, 0.5 m off one line: two kinematic cars pass 2.40 m apart
instead of 0.50 m; a kinematic car and a dynamic one pass 2.68 m apart
and both get past, where without it the car shoved the other 52 m back;
the key turns it off).

* World vehicles can sense the world under fog, instead of knowing its grid

WorldVehicles froze every navigator's sensing on the world's grid, so a
world could not run libcvc's fog navigation (a belief built from the
vehicles' rays), which the fog and ghost demos are.

- WorldVehicles::set_sense (the vehicles.sense key): "known" (the
  default, as before) or "fog": each plant's navigator starts from an
  empty prior and senses the grid with its vehicles' rays (60 m, 120 of
  them), building a belief it plans on. Changing it makes the navigators
  again, and every vehicle goes back to its start.
- WorldVehicles::belief(plant, ...): the occupancy a plant's navigator
  plans on (the grid under known, its belief under fog), for a view or a
  host to draw.
- ARIADNE.md: avoidance (#1339) and sensing in the vehicles section.

Test: AriadneWorldVehicles.UnderFogTheNavigatorsSenseTheWorld (known: the
grid's 240 blocked cells; fog: 29 at first, 100 after 10 s of driving,
none beyond what is there; the key sets it back).

* tests: the tiler's action test gets 900 s on slow Debug runners

TilerIntrinsicsAriadne.AnActionStartsItUnderTheDefaultLimits runs a contour stack through an
action's frame loop, as the segmentation action test runs its volume, and ran past ctest's 300 s
in #1340's Debug package job. The tiler's port test gets the segmentation test's 900 s, and its
own loop allows 900 s too.

* tests: the tiler action test's comment within the line limit
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