Repository navigation
nav: nav@1 comes to rest at its goal (the drive's stop points) and a parked bicycle holds - #1297
Merged
Merged
Conversation
…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
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).
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.
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.
dynamic4w(anddynamic)joltkinematicThree causes:
v_stop) is for walls. Toward the goal, the goal's pull brakes only within about 1.3 v of it, ata_max, so the arrival speed grows with the trip.sim_worldparks an agent as it passes withinreach_tol.a_brake(6 m/s² on the Humvee), v²/2a_brake past.a_max·dtoff 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.What
veh_params::stop_at: a point per agent where the drive comes to rest.v_stopholds it to the walls: braking ata_max(with the slope asv_stopplans it), and on the plant arm after the latency, at the gentler ofa_brakeanda_max.sim_world_cudapath 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 ata_max, straight ahead, and holds, as the plant arm's park brake does ata_brake.sim_world:Swarm, which mirrors the parking branch, keeps its parity.navigator()reports them (stop_at_goal,park_hold; pycvc'sfields()["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), asv_stopdoes. 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_test14/14, including the newNavTerrain.AnAgentComesToRestAtItsGoal: 150 m at a 24 m/s top speed, on the kinematic arm and on a plant, with the options on and off.ariadne_scene_world_test50/50, including the newAriadneWorldGym.NavAtOneComesToRestAtItsGoalAndTheEpisodeEnds: three agents ondynamic4wand the bicycle; the episode ends, and 100 ticks on every agent is at rest within its reach.nav_plant_test28/28,nav_test68/68,nav_sim_world_agents_test17/17.test_pycvc_gym.py(84 checks on the build branch; 80 as this stack's file has them),test_pycvc_world_entities.py33,test_pycvc_nav_agents.py43.cvcgl_ariadne_physics,cvcgl_ariadne_labels; this build has no cvcGL) and the rest ofctest. 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 byGymTwin(plant_arm=True)where the navigator reportsstop_at_goal).