Skip to content

demos: drive Humvees on the Jolt plant by default (held) - #703

Merged
transfix merged 4 commits into
masterfrom
feat/demos-default-humvee
Oct 20, 2026
Merged

transfix merged 4 commits into
masterfrom
feat/demos-default-humvee

Conversation

@transfix

@transfix transfix commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

The one-line flip from #702: navdemo::default_plant() returns humvee when the build has Jolt. This affects nav_city_drive, nav_finale and nav_fog_ghost; nav_city_swarm keeps the bicycle for its hundreds of agents.

It was held as a draft because the Austin finale's Humvees wedged in a corner after act 2 replanned them on A* routes. Since #713, the finale on a plant drives vehicle routes (plan_vehicle_route and route_follower): its Humvees drive 5387 m in 900 frames against 1903 m on A* routes, and none wedges. docs/PHYSICS_API.md now says both. Joe asked to merge it (2026-10-19).

Retargeted to master: its old base, #707's branch, was squash-merged. A merge commit brings master in, so the diff against master is this PR's three files: src/cvcGL/examples/nav_common.h, nav_common.cpp and docs/PHYSICS_API.md.

…ant by name (P9)

The navigator planned every plant's vehicle with its own veh_params, which the trained metric
sizes for no vehicle in particular: at Austin's 0.05 per metre, a 3 m disc, 18 m/s and 30 m/s^2,
against a Humvee's 2.5 m/s^2 and 1.82 m track.

- vehicle_desc::max_speed: the top speed the driver model holds (Humvee 24.6 m/s, 55 mph;
  RoboRacer 10 m/s), in the snapshot JSON, the tuning keys, pycvc and the docs.
- plant_limits gains the vehicle's envelope and size: a_max, vmax, a_lat, half_width, front, rear.
  nav_plant::limits fills them (nav_plant_options::plan_with_vehicle, on by default): 0.8 of
  max_accel, max_speed, 0.5 g of cornering at most 0.8 of the static stability factor, and the
  chassis box and wheels from the rear axle.
- sim_world drives with them in place of cfg.veh's a_max, vmax and a_lat_max, and covers the body
  with kPlantDiscs = 4 footprint discs. The discs are inset 0.7 half-widths and 1.3 half-widths
  wide, at body_gain 1/4. The drive gains per-agent disc offsets (veh_params::body_offsets_col,
  CPU) and a per-agent cornering limit (plant_drive::a_lat). plant_plan_of reads them back.
- The plant arm sends the acceleration its own integration would apply, within [sp_min, vmax]:
  never a reverse nav forbids, never past vmax. nav_plant::command reads under 0.1 m/s as rest.
  Before, a Humvee asked to back out of a corner braked against its springs' jitter forever.
- cvc::physics::plant_host puts a sim_world's agents on a plant by name: "kinematic", a preset,
  or a list cycled over the agents. It can do that in code or from <prefix>.nav_plant.vehicle,
  and builds and owns the world (a flat ground, or a cvc::world's collide items). It falls back
  to the bicycle without Jolt.
- The cvcGL nav demos take --plant and a restart-panel plant control. nav_material_demo runs the
  bicycle and the Humvee side by side. The demos still default to the bicycle: in the Austin
  finale a Humvee drives its route, then wedges in a corner it cannot turn a 6.7 m circle out of
  (with the plan off too), and the material layer keeps the bicycle out of the lake but not the
  Humvee (0 entries against 65). Both wait on vehicle-aware routes and P8.

Tests (Windows MSVC):
- nav_plant_test's new PlansWithTheVehiclesOwnEnvelope drives a sim_world sized with nav's
  defaults through a hard turn. On the vehicle's plan it commands at most 2.0 m/s^2 and 0.50 g;
  on nav's numbers, 30 m/s^2 and 0.98 g.
- The P4 gates, which size nav by hand, turn the plan off.
- physics_plant_host_test (5) covers switching, lists, refusals, the state tree, and Jolt worker
  threads: the same state hash on 0 and 3 workers.
- ctest: 4260/4261; the one failure is a model test that passes alone. The 361 nav, drive,
  material, physics and plant tests all pass.
@transfix
transfix force-pushed the feat/nav-plant-vehicle-limits branch from 530d4cf to 5eaa21e Compare October 19, 2026 02:01
navdemo::default_plant() is the Humvee when the build has Jolt (nav_city_drive, nav_finale,
nav_fog_ghost; nav_city_swarm keeps the bicycle for its hundreds of agents). Held as a draft:
in Austin the Humvees still wedge in corners nav's routes give them, until the routes allow for
a vehicle's turning circle and P8 trains through it.
@transfix
transfix changed the base branch from feat/nav-plant-vehicle-limits to master October 19, 2026 16:54
@transfix
transfix marked this pull request as ready for review October 19, 2026 16:54
@transfix
transfix merged commit c9da5ba into master Oct 20, 2026
24 checks passed
@transfix
transfix deleted the feat/demos-default-humvee branch October 29, 2026 20:52
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