Repository navigation
Ariadne gym: the limits the drive planned each command with on the plant (plants()' plan) - #1286
Merged
Merged
Conversation
…ant (plants()' plan) sim_world::plant_plan gains the rest of the plant arm's columns (plant_drive): the wheelbase, the steering lock, the actuator's slew limit and its angle now, the latency, the braking the vehicle achieves, whether the next tick parks the agent, and whether the plant's measured state modulates the drive. entity_plant gains entity_plan, those and the envelope and footprint plant_plan already had, in SI; pycvc.WorldGym.plants() gives it as `plan`. With it a twin of the drive gives the command the plant took, not only the control law's. Tests: AriadneWorldGym.ThePlanTheDriveCommandedThePlantWith and test_pycvc_gym's plan checks; ARIADNE.md's twin section.
This was referenced Nov 16, 2026
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.
…parked bicycle holds (#1297) 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.
… sleep (#1282) * state_exec async test: SL-7 times the sleeper from just before a warm sleep Slices.SL07_ABetterPriorityPreempts failed all three tries in #1246's recipe / macos-latest / Release job (run 43708365932): the runner made 62, 37 and 42 ticks past the sleeper's due time, against a limit of 32. The test timed the due time from (arm), the step before a first (sleep 0.02). The scheduler's due time is the sleep's own clock reading plus 20 ms, and in a fresh process (one test per ctest run) the code between the two readings runs for the first time there: the runner's ticks over that gap counted as lateness. On an idle Windows machine, fresh processes counted 9-24 that way; the macOS runner, 37-62. Now (arm) is the sleep's argument, (sleep (arm)), so it reads the clock just before the sleep does, and a (sleep 0.001) first warms the sleep's path. The same machine counts 1-5 in fresh processes (40 runs), 0-12 warm (300), and 0-10 in fresh processes with 66 busy loops on its 22 CPUs (30). The limit stays 32, and the count is printed. * Ariadne action-caps test: steps checked with the time cap raised; each kill waits for its warning AriadneAsyncFn.ActionCapsAreTreeSettingsAndChargeAsyncCalls failed three times running on package-linux / libcvc-debug: the 200-round loop was killed with time_limit_exceeded. The default time cap (0.1 s) is wall time, and a loaded Debug runner spent it on the loop. - The step-cap checks raise ariadne.limits.action_max_time to 30 s, so only steps decide them. - The default time cap gets its own check: ten million rounds with no step cap, which run into 0.1 s on any machine (time_limit_exceeded). - Each button is clicked alone, by its label (button_click clicked every button, so each click ran every program), and a kill waits up to 30 s for its own warning instead of a fixed 1 s. - The second spin kill has its own key: a kill warns once per message. Locally (Windows, MSVC Release): 5/5, and 160/160 with 32 copies running at once (slowest 403 ms). (cherry picked from commit a5e83b1)
transfix
enabled auto-merge
November 18, 2026 03:43
# Conflicts: # src/cvc/ariadne/world_vehicles.cpp
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.
Update 2026-11-16. This branch now also carries:
Slices.SL07_ABetterPriorityPreempts, cherry-picked from a5e83b1 (state_exec async test: SL-7 times the sleeper from just before a warm sleep #1282). It failed all three tries in this PR'srecipe / macos-latest / Releaserun: 125, 34 and 51 ticks against a limit of 32, a wall-clock test on a loaded runner, unrelated to this change. Locally, with the cherry-pick,state_exec_async_testSL-7 andariadne_runtime_test(277/277) pass.A generic hook for a twin of the world gym's drive: the limits nav@1's plant arm planned each command with. Stacked on #1284 (base
feat/gym-drive-intents).What
plants()reports each agent's plan (entity_plant::plan, a newentity_plan, in SI). These are the limits the drive plans the plant's command with: the plant arm,plant_drive, assim_worldsets it up fromplant_limitseach tick.a_max,vmax, the corneringa_lat) and itswheelbase.max_steer, the fleet's tightest), the actuator's slew limit (steer_rate) and its angle now (steer_now).latencyand the braking the vehicle achieves (a_brake).body_rr,body_offsetsfrom the rear axle,footprint).parked: the next tick parks the agent (it brakes to a stop ata_brake).modulated: the plant's measured state scales the drive (plant_modulation), which these do not carry.knownis false on nav's bicycle, which has no plant arm. pycvc gives it asplants()[i]["plan"].sim_world::plant_plangains the columns the plan did not have yet: wheelbase, lock, slew, steer_now, latency, a_brake, parked, modulated.plant_plan_ofalready gave the envelope and the footprint.ARIADNE.md's twin section describes it.
Why
#1284's
drivegives a twin the drive's coefficients and carrot, so it can replay the control law. On a vehicle plant, though, the command the plant takes comes from the plant arm, after the control law:v_stopwith the latency anda_brake;-a_brake;Without these limits, a twin's command departs from the plant's on most agent-ticks within 60 m of a goal (61 % in the run below, parked ticks included). With them, GRL-SNAM's
grl_snam.gym_twin(GymTwin(gym, plant_arm=True), CVC-Lab/GRL-SNAM#190) gives the plant's command on all but a few agent-ticks. On three Humvees that nav@1 drives ondynamic4w, the fraction of agent-ticks whose command departs (steering by more than 1e-4 rad or acceleration by more than 0.01 m/s²), with the plan against without it:Checks
Built locally (Release, Jolt, CUDA), with this commit cherry-picked onto #1275 (feat/sim-tick) plus #1284's change, the build #1284 was checked on:
ariadne_scene_world_test: 49/49, including the newAriadneWorldGym.ThePlanTheDriveCommandedThePlantWith. It checks:nav_plant_options' defaults;steer_nowis the model's actuator;parkedis announced, the next tick's command is the park brake's,clamp(-v/dt, -a_brake, a_max).bindings/pycvc/test_pycvc_gym.py: 83 checks, including the new plan checks on every plant.