Skip to content

nav: nav@1 comes to rest at its goal (the drive's stop points) and a parked bicycle holds - #1297

Merged
transfix merged 1 commit into
feat/gym-plant-planfrom
feat/nav-stop-at-goal
Nov 16, 2026
Merged

transfix merged 1 commit into
feat/gym-plant-planfrom
feat/nav-stop-at-goal

Conversation

@transfix

Copy link
Copy Markdown
Owner

nav@1 comes to rest at its goal and stays there. Stacked on #1286 (base feat/gym-plant-plan), which is stacked on #1284.

The problem, measured

One Humvee per run, driven by nav@1 on a flat 500 m square, from rest to a goal straight ahead. "Past" is the rear axle's distance past the goal once it has stopped; "at reach" is its speed as it came within the 3 m reach.

plant goal at reach, before → after (m/s) at rest, before → after (m past the goal)
dynamic4w (and dynamic) 10 m 3.0 → 3.0 −2.1 → −2.1
50 m 9.4 → 3.3 +4.6 → −2.0
100 m 15.0 → 3.3 +16.0 → −1.9
150 m 19.3 → 3.3 +28.5 → −1.9
jolt 50 m 8.3 → 3.2 +3.2 → −2.0
100 m 13.2 → 3.3 +12.1 → −1.9
150 m 16.5 → 3.2 +21.0 → −1.9
kinematic 10–150 m 2.9–19.4 → 2.9–3.5 never stopped of its own: drove on until the map's edge stopped it, 300–440 m on → −0.8 to +0.1

Three causes:

  • The drive has no goal-stopping governor. Its stopping governor (v_stop) is for walls. Toward the goal, the goal's pull brakes only within about 1.3 v of it, at a_max, so the arrival speed grows with the trip.
  • Parking. sim_world parks an agent as it passes within reach_tol.
    • On a plant the park brake then stops it at a_brake (6 m/s² on the Humvee), v²/2a_brake past.
    • On the kinematic arm parking does not hold. The FSM takes a_max·dt off the speed and puts the carrot 2 v straight ahead, and the goal's pull adds the same back. With the default coefficients the agent cruises on at its arrival speed.
  • The gym's arrival test is instantaneous. With several agents, each passed through its reach at a different time, so a gym episode never ended.

What

  • veh_params::stop_at: a point per agent where the drive comes to rest.
    • The speed toward it is held to the speed from which the vehicle stops there, as v_stop holds it to the walls: braking at a_max (with the slope as v_stop plans it), and on the plant arm after the latency, at the gentler of a_brake and a_max.
    • Only the component of the motion that closes on the point counts, and the creep floor never exceeds it.
    • Null (the default) is byte-identical; a non-finite entry means none for that agent.
    • The persistent sim_world_cuda path does not apply it.
  • sim_world::config::stop_at_goal: the stop point is each agent's goal.
  • sim_world::config::park_hold: on the kinematic arm, a parked agent brakes to a stop at a_max, straight ahead, and holds, as the plant arm's park brake does at a_brake.
  • Both options are off by default in sim_world:
    • its other hosts keep their behaviour byte for byte (route and convoy followers retarget every tick, and would trail a moving goal by about the stopping distance);
    • GRL-SNAM's torch Swarm, which mirrors the parking branch, keeps its parity.
  • WorldVehicles turns both on for its navigators. That makes it nav@1's default in Ariadne worlds and the gym. navigator() reports them (stop_at_goal, park_hold; pycvc's fields()["navigator"]), so a twin can mirror them.

The cost: a trip ends later. The governor plans its braking at a_max (2 m/s² on the Humvee), as v_stop does. A 150 m trip first counts as arrived 44 ticks (2.6 s) later than the old pass-through at speed, 3 s after reaching a top speed of 17.3 m/s instead of 22.

Checks

Built locally (Release, Jolt, CUDA), with this commit cherry-picked onto #1275 + #1284 + #1286, the build #1286 was checked on:

  • nav_terrain_test 14/14, including the new NavTerrain.AnAgentComesToRestAtItsGoal: 150 m at a 24 m/s top speed, on the kinematic arm and on a plant, with the options on and off.
    • Bicycle, on: +0.1 m, at rest. Off: still at 19.5 m/s, 808 m on.
    • Plant, on: −2.8 m, at rest. Off: +27.5 m.
  • ariadne_scene_world_test 50/50, including the new AriadneWorldGym.NavAtOneComesToRestAtItsGoalAndTheEpisodeEnds: three agents on dynamic4w and the bicycle; the episode ends, and 100 ticks on every agent is at rest within its reach.
  • nav_plant_test 28/28, nav_test 68/68, nav_sim_world_agents_test 17/17.
  • pycvc: test_pycvc_gym.py (84 checks on the build branch; 80 as this stack's file has them), test_pycvc_world_entities.py 33, test_pycvc_nav_agents.py 43.
  • Not run here: the cvcGL tests (cvcgl_ariadne_physics, cvcgl_ariadne_labels; this build has no cvcGL) and the rest of ctest. Reading them, no check depends on how nav@1 arrives.

GRL-SNAM's gym twin mirrors the stop point (CVC-Lab/GRL-SNAM#190: bike_control(stop_at=), used by GymTwin(plant_arm=True) where the navigator reports stop_at_goal).

…parked bicycle holds

veh_params::stop_at: a point per agent the drive's speed toward it is held
to stop at, as v_stop holds it to the walls (a_max, or on the plant arm the
latency and a_brake; only the motion that closes on it). sim_world gets two
options, both off by default (byte-identical): stop_at_goal (the stop point
is each agent's goal) and park_hold (on the kinematic arm a parked agent
brakes to a stop at a_max and holds). WorldVehicles turns both on for its
navigators, and navigator() reports them (pycvc's fields()["navigator"]).

Without them nav@1 met its goal at the speed the goal's pull left, which
grows with the trip: a Humvee 150 m out arrived at ~19 m/s and parked ~28 m
past its goal; on the bicycle a parked agent drove on at 5.5 m/s. A gym's
agents were then never all at their goals at once, so its episode never
ended.
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Nov 16, 2026
…es it

transfix/libcvc#1297 makes nav@1 come to rest at its goals: the drive's
speed toward a stop point is held to the speed it stops there from (a_max,
or on the plant arm the latency and a_brake). sdf_nav.bike_control takes it
as stop_at=, and GymTwin(plant_arm=True) applies it at each row's goal where
fields()["navigator"]["stop_at_goal"] is set (older libcvc: no stop).

Gate 5 against #1297: plant arm 0 % departing en route, arriving and parked
(accel), against 0.9 / 77.8 / 98.4 % for the control law alone; the gate
now steps past the gym's end of the episode until the agents are at rest.
Gate 3's plant-arm case starts below ~5 m/s, where beta and gamma act: above
it the stop sets the braking and their gradients are zero.
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Nov 16, 2026
)

* gym twin: nav@1's plant arm (GymTwin(plant_arm=True)) and its gate

On a vehicle plant libcvc's drive gives its command through the plant arm
(plant_drive), after the control law: the stopping governor with the latency
and the vehicle's braking, braking down to -a_brake, the steering actuator's
slew and lock, the vehicle's own envelope and footprint, and the park brake at
the goal. sdf_nav.bike_control takes it as plant= (a PlantArm) and steer_now=;
GymTwin(gym, plant_arm=True) reads it from plants()' plan (transfix/libcvc#1286)
and parks rows in rollout, drive_gym and tick_residuals as nav@1 parks an agent.
The default is the control law alone, unchanged.

Gate 5 (tests/test_gym_twin.py): nav@1 drives three Humvees on dynamic4w; the
twin's command from the drive the gym reports against the command the gym's
plant took. Departing agent-ticks, plant arm against the control law alone:
en route 0 % against 0.9 %, arriving 0.5 % (one tick) against 10.5 %, parked
(acceleration) 0 % against 99.2 %. Gate 3 runs with the plant arm too.
docs/gym-twin.md has the numbers.

* gym twin: the stop at the goal (bike_control's stop_at), as nav@1 makes it

transfix/libcvc#1297 makes nav@1 come to rest at its goals: the drive's
speed toward a stop point is held to the speed it stops there from (a_max,
or on the plant arm the latency and a_brake). sdf_nav.bike_control takes it
as stop_at=, and GymTwin(plant_arm=True) applies it at each row's goal where
fields()["navigator"]["stop_at_goal"] is set (older libcvc: no stop).

Gate 5 against #1297: plant arm 0 % departing en route, arriving and parked
(accel), against 0.9 / 77.8 / 98.4 % for the control law alone; the gate
now steps past the gym's end of the episode until the agents are at rest.
Gate 3's plant-arm case starts below ~5 m/s, where beta and gamma act: above
it the stop sets the braking and their gradients are zero.
@transfix
transfix merged commit 46a3f96 into feat/gym-plant-plan Nov 16, 2026
6 checks passed
@transfix
transfix deleted the feat/nav-stop-at-goal branch November 16, 2026 19:21
transfix added a commit that referenced this pull request Nov 18, 2026
…ith on the plant (plants()' plan)

plants()' plan (entity_plan) for a twin of nav@1's plant arm, and #1297: nav@1 comes to rest at its goal (veh_params::stop_at; sim_world stop_at_goal / park_hold, on in WorldVehicles).
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