Skip to content

docs(vehicle-ph-plant): the contact's implicit damper (libcvc #1004), the semi-implicit default (#981) and the discrete-gradient step (#978) - #156

Merged
transfix merged 4 commits into
mainfrom
docs/vehicle-ph-contact-implicit
Nov 7, 2026
Merged

transfix merged 4 commits into
mainfrom
docs/vehicle-ph-contact-implicit

Conversation

@transfix

@transfix transfix commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

This follow-up to #151 updates docs/vehicle-ph-plant.tex and its PDF for three libcvc PRs that merged on 2026-11-06 and 07, and for the libcvc release that shipped #151's pieces. With them, all three gaps raised in review are closed.

What changed

  • Compliant contact at fast impacts (dyn_bike_plant: the contact's damper and friction implicit; contact substeps for fast impacts transfix/libcvc#1004, ce9aebaf). §7.3's limitation becomes the fix.
    • The fix: the damper and friction are now implicit: the step solves (M + h R_c) v_d = M v₀ + h W_c. A substep that would close more than 0.1 m on what it meets is cut into pieces.

    • The 7.8 m/s impact at the default 0.01 s substep:

      Contact Speed clamp Unbooked share of the flow
      Before #1004 supplied 1.5e5 J took 2.42e5 J 3.1e-2
      With #1004 dissipates 8.16e4 J (8.19e4 at 0.00125 s) takes nothing 1.3e-3

      The vehicle's slowest speed is −0.47 m/s, as at the fine step.

    • The navigation world's field: the section adds why it made things worse. Its grid signed distance has |∇φ| = 2 at a face, which makes the barrier 4× and the damper 8× stiffer than against an exact wall. The field is also flat inside a thick wall.

    • Tables: the contact table splits into the model's gates (Table 9, with TheImplicitDamperOnlyDissipates) and the plant's runs (Table 10, with AFastImpactAtTheDefaultSubstep). The 5 m/s rows take #1004's values; the old ones are in the caption. DynContact.Golden is byte-identical, so GRL-SNAM's contact fixture stands.

  • The navigator's integrator (nav: semi-implicit Euler by default in the geometry rollout, with the integrator A/B transfix/libcvc#981, 45cb239a).
    • §9: the passage that said libcvc's multi-start rollout runs explicit Euler now says it did, through 3.7.11.
    • A new "The integrator" paragraph in §9:
      • semi-implicit Euler is the default;
      • on the penetrating batch, the multi-start penalty is 2.050 against 2.230 on the legacy start, and 2.453 against 2.898 on sampled starts. I measured these.
    • #981's A/B is reported, not re-run. It is a training run outside CI.
      • Where training moves the policy, explicit Euler costs 4.7–7.3 points of reach.
      • At the gate's learning rate it gains 1.0 point but hits buildings 4% more.
      • The sharp check alarms on 14–19% of explicit Euler's steps, and never on semi-implicit Euler's.
      • Strang splitting was dropped.
    • GRL-SNAM's native trainer: the paragraph notes it picks up the new default with a pycvc that carries #981, while the torch twin stays explicit.
    • §12.1: the integration item records the new default; with #978 below, that gap is closed.
    • Table 13 gains three rows: SemiImplicitIsTheDefault, the explicit arm's gradcheck (6.5e-4) and the integrators' difference, and the material trainer's explicit full-chain gradcheck (2.2e-4).
  • The opt-in discrete-gradient step (dyn_bike: an opt-in discrete-gradient step whose energy books close exactly transfix/libcvc#978, 789d2f6e). Added after the first push.
    • New §5.3, "Closing the books exactly". dyn_plant_dg is the implicit midpoint rule on the twist, M(v₁ − v)/h = J(Mv̄)v̄ + Q(v̄). Since J is skew, ΔH = h v̄ᵀQ(v̄) holds line for line.
    • Results:
      • On Proposition 2's swerve its books close to at most 1.7e-10 J a step (at most 1.3e-12 of the flow), against dyn_plant's 25 to 0.056 J.
      • It is second order: 3.92–4.03× per halving, against 1.98–2.13×.
      • No coasting step gains energy, with tires up to 16× stiffer.
    • Limits: it is not L-stable. A step costs about 10× a dyn_plant step: 2.8–3.1 µs against 0.30 µs on this machine; the PR's own timings were 3.3–3.6 against 0.34–0.42. It is C++ only, and has no wheel spin.
    • New Table 4: nav_dyn_bike_dg_test's gates, measured on libcvc master f94a9b27, where #978's files are unchanged since its squash. All 7 tests pass, and nav_dyn_bike_test's 23 still do.
    • Text that follows from it: §12.1 says all three review gaps are closed. The §12 integrator paragraph, "What is not claimed", the abstract, the contributions and the Versions list say what the step does not cover.
  • Releases. #979, #982, #983, #987 and #1002 were first released in libcvc 3.7.9; the paper on main still said "no release". #981 and #1004 are in no release yet.
  • Appendix.
    • The build and run commands add the three navigator suites and nav_dyn_bike_dg_test, and the ctest filter is shorter.
    • The printed lines are updated, with new lines for #981 and #978.
    • The equation-to-code map gains rows for the navigator's integrator and the discrete-gradient step.

Where it was measured

libcvc master 352f1933, after v3.7.11. Every file #981 and #1004 touched is unchanged there since their squash commits. #978's rows were measured on master f94a9b27.

Suite Tests passed
physics_dyn_contact_test 9
physics_dyn_bike_plant_test 10
nav_geom_rollout_grad_test 16
nav_coef_train_test 30
nav_material_train_test 18
nav_potential_test 17
nav_dyn_bike_dg_test (at f94a9b27) 7

Checks

  • pdflatex, three passes: no warnings, 54 pages.
  • Scope grep over the .tex: no program, engagement, radio or vehicle-preset terms, no city name except the university's, and no session names.

Not in this PR

  • pycvc doesn't bind #1004's contact_step_depth. pycvc's contact test still runs at a 0.005 s substep, which can now go back to the default in a small libcvc PR.

…ibcvc #1004)

Section 7.3's limitation becomes the fix: the damper and friction are implicit
and a fast closing is substepped, so a 7.8 m/s impact at the default 0.01 s
substep dissipates 8.16e4 J (8.19e4 at 0.00125 s) with no limiter and 1.3e-3 of
the flow unbooked, where it supplied 1.5e5 J before. It adds the grid field's
|grad phi| = 2 at a face and its flat interior. The contact table splits into
the model's gates (with TheImplicitDamperOnlyDissipates) and the plant's (with
AFastImpactAtTheDefaultSubstep), and the 5 m/s rows take #1004's values, with
the old ones in the caption. Measured at #1004's branch commit a61d981c; to be
re-measured on master once it merges.
…ult; first releases

#1004's rows are re-measured on libcvc master 352f1933 (after its squash
ce9aebaf): the contact suite prints as at its branch commit, except the implicit
solve now holds to 3.4e-16. #981 (45cb239a) makes the geometry rollout's default
semi-implicit: section 9 gets its paragraph, with the multi-start penalties
measured there and #981's A/B reported, not re-run; the review gap's integration
item says so; the navigator table gains three #981 rows. #979, #982, #983, #987
and #1002 were first released in 3.7.9.
A new section 5.3 gives dyn_plant_dg, the implicit midpoint rule on the twist,
whose books close to the Newton solve's tolerance (at most 1.7e-10 J a step,
1.3e-12 of the flow, against dyn_plant's 25 to 0.056 J), second order, with no
coasting step gaining energy; not L-stable, about ten times dyn_plant's cost,
C++ only, without wheel spin. Table 4 gives nav_dyn_bike_dg_test's gates,
measured on libcvc master f94a9b27. The review's third gap is now closed, and
the limitations and "What is not claimed" say what the step does not cover.
@transfix transfix changed the title docs(vehicle-ph-plant): the contact's implicit damper (libcvc #1004) and the semi-implicit default (#981) docs(vehicle-ph-plant): the contact's implicit damper (libcvc #1004), the semi-implicit default (#981) and the discrete-gradient step (#978) Nov 7, 2026
@transfix
transfix merged commit 3864141 into main Nov 7, 2026
6 checks passed
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