Skip to content

physics: the dynamic plants take nav's command as the Jolt plant's driver does, and a body panel's friction on the chassis - #873

Merged
transfix merged 1 commit into
masterfrom
fix/dyn-chassis-walls
Oct 29, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/dyn-chassis-walls

Conversation

@transfix

@transfix transfix commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

On Austin at 864 s the 3.7.2 dynamic plants got 11 (dynamic) and 7 (dynamic4w) of 48 vehicles to the objective, against the Jolt Humvee's 32. This PR finds why and fixes it in the two plants.

What was wrong

The collision coupling from #869 is not the problem. On a bench against a flat wall, the dynamic plant and the Jolt Humvee behave the same: they stop at the wall, back out 7.6 m and 7.5 m, and turn away.

What separated them in Austin:

  • Both plants hit buildings about equally. Over one traced episode with every step's contacts logged, the Humvee spent 306 s against buildings and the dynamic plant 321 s.
  • The Humvee gets off them, the dynamic plant doesn't. Every one of the Humvee's 93 building contacts lasted under 10 s. The dynamic plant had contacts of 30 s and more, up to 140 s. In those, the vehicle crawled along a wall at about 0.3 m/s, moving just enough that the route follower never called it pinned.

Two causes, both differences from nav_plant:

  1. The driver. nav_plant's driver (vehicle.cpp) does three things the dynamic plants didn't:

    • holds the vehicle on its brakes at a standstill when nothing is asked;
    • feeds gravity along the slope forward;
    • corrects what the measured acceleration falls short by, with a proportional term and an integral trim, up to max_accel.

    The dynamic plants applied nav's acceleration as the drive force, open loop. So they crept on the smallest command and rolled down slopes at rest: the model's rolling resistance fades to zero at rest, but gravity along the slope doesn't. They also lost g·sin(slope) of every command uphill, and against a wall's drag they got nowhere.

  2. The chassis friction. The chassis box used the world's default material (friction 1), which comes to 0.7 against a building. So a vehicle pressed against a wall by its own steering gripped the wall the way a tire grips the road.

The change

  • dyn_driver.h (new): the Jolt driver's low-speed hold, grade feed-forward, proportional term and trim, applied every substep. Both plants use it through options.driver, which is on by default. With it off, the command is the raw force; the bit-for-bit and ramp tests use that mode.
  • options.chassis_friction, default 0.3, for a body panel on masonry or on another vehicle. By the world's product rule that is 0.21 against a building.

Austin arrival A/B

Settings: dbg_arrival_check3 --radio csma --steer 0.8 --empty-belief --frames 7200 --episodes 8, scene-austin-south, 6 vehicles, the same seeds in every arm. The harness is CVC-DBG/cvcdbg#254, built on Windows MSVC against this branch.

Before this PR:

Plant Arrived Mean time against walls
dynamic, 3.7.2 11/48 (0.23) 379 s
dynamic4w, 3.7.2 7/48 (0.15) 447 s
Jolt Humvee 32/48 (0.67) 295 s
kinematic 41/48 (0.85) 6 s

The causes taken one at a time, on the dynamic plant:

Arm Arrived
no Jolt world (terrain only) 32/48
vehicle-to-vehicle collisions only 30/48
building collisions only 15/48
hold only 14/48
driver 20/48
hold + friction 0.3 27/48
driver + friction 0.3 (this PR) 35/48

With this PR:

Plant Arrived Mission success Mean time against walls
dynamic 35/48 (0.73) 0.38 255 s
dynamic4w 24/48 (0.50) 0.12 325 s
Jolt Humvee (unchanged) 32/48 (0.67) 0.12 295 s
kinematic (unchanged) 41/48 (0.85) 0.75 6 s

Tests

  • TheDriverHoldsAndClimbs, for both plants:
    • Parked on a 10% ramp with nothing asked, the vehicle holds within 5 cm; the raw model rolls 13–15 m back.
    • A command inside the deadband doesn't creep it on flat ground.
    • It reaches nav's 1 m/s² up the ramp: 5.87 m/s against 6.0 on the bicycle, within 8% on four wheels.
  • SlidesAlongAWall: running alongside a wall and steering into it, at 3 m/s for 10 s, the vehicle covers 26.7 m at friction 0.3 against 4.4 m at friction 1.
  • The physics and nav ctest suites pass on Windows MSVC: 207 of 207.

The Jolt plant is unchanged. The probes used to find this (a per-step contact log, and switches for the world, the collisions and the driver) aren't in this PR.

…iver does; a body panel's friction on the chassis

On Austin at 864 s the 3.7.2 dynamic plants got 11 and 7 of 48 vehicles to the objective, against
the Jolt Humvee's 32. Two differences from the Jolt plant, neither in the collision coupling itself
(on a bench, against a flat wall, the two plants stop, back out and turn away alike):

The driver. nav_plant's driver (vehicle.cpp) holds a vehicle on its brakes at a standstill when
nothing is asked, feeds gravity along the slope forward, and corrects what the measured
acceleration falls short by with a proportional term and an integral trim, up to the vehicle's
max_accel. The dynamic plants applied nav's acceleration as the drive force, open loop: they crept
on the smallest command, rolled down any slope at rest (the model's rolling resistance fades to
nothing at rest, gravity along the slope does not), lost g sin(slope) of every command uphill, and
against a wall's drag got nowhere. Both plants now take the command through the same driver
(dyn_driver.h; options.driver, on by default; off, the command is the raw force the tests that
step the model bit for bit use).

The chassis friction. The chassis box took the world's default material, friction 1, so 0.7
against a building: a vehicle pressed against a wall by its own steering gripped it like a tire and
crawled along it at 0.3 m/s for minutes, moving just enough that the route follower never called
it pinned. The box now has options.chassis_friction, 0.3 (a body panel on masonry or another body;
0.21 against a building by the world's product rule).

Tests: TheDriverHoldsAndClimbs (both plants: parked on a 10% ramp it holds within 5 cm where the
raw model rolls 13-15 m back, a command inside the deadband does not creep it, and it reaches nav's
1 m/s^2 up the ramp), SlidesAlongAWall (alongside a wall, steering into it, 26.7 m in 10 s at 0.3
against 4.4 m at 1); the bit-for-bit and ramp tests run the raw model.
@transfix
transfix merged commit 462d822 into master Oct 29, 2026
27 checks passed
transfix added a commit that referenced this pull request Oct 29, 2026
The project version and the cvcpkg recipe family move to 3.7.3. Every recipe is at cvc_revision 1
already, so none restarts.

3.7.3 carries the dynamic plants' driver and chassis friction (#873): --plant
dynamic and dynamic4w take nav's acceleration as the Jolt plant's driver does (a standstill hold,
the grade fed forward, a trim on the measured acceleration) and their chassis boxes scrape walls
at a body panel's friction, so on Austin at 864 s they bring 35 and 24 of 48 vehicles to the
objective (3.7.2: 11 and 7). It also carries pycvc-gl's wasm deps with ImageMagick (#872), the
steering modulation of D and G in cvc::ph (#851), the bench's compare and sweep keys (#859), and
the sanitizer CI jobs for state_exec (#858).
transfix added a commit that referenced this pull request Oct 29, 2026
The project version and the cvcpkg recipe family move to 3.7.3. Every recipe is at cvc_revision 1
already, so none restarts.

3.7.3 carries the dynamic plants' driver and chassis friction (#873): --plant
dynamic and dynamic4w take nav's acceleration as the Jolt plant's driver does (a standstill hold,
the grade fed forward, a trim on the measured acceleration) and their chassis boxes scrape walls
at a body panel's friction, so on Austin at 864 s they bring 35 and 24 of 48 vehicles to the
objective (3.7.2: 11 and 7). It also carries pycvc-gl's wasm deps with ImageMagick (#872), the
steering modulation of D and G in cvc::ph (#851), the bench's compare and sweep keys (#859), and
the sanitizer CI jobs for state_exec (#858).
@transfix
transfix deleted the fix/dyn-chassis-walls branch October 29, 2026 20:53
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