Skip to content

Move BobLib to 7363fc1 and migrate to its nested records - #160

Open
raorjun wants to merge 5 commits into
mainfrom
feat/bump-boblib-main
Open

raorjun wants to merge 5 commits into
mainfrom
feat/bump-boblib-main

Conversation

@raorjun

@raorjun raorjun commented Oct 26, 2026

Copy link
Copy Markdown
Member

What

BobSim pins BobLib 1bd6d78. BobLib #37–#58 fix the FourPost force-closure drift (#48) and add mounted driveline and inboard caliper reactions (#40, #41, #45, #48). This PR moves the pin to BobLib main 7363fc1. It migrates BobSim to the new class paths and nested records, as BobLib MIGRATION.md describes.

Changes

  • Generator:
    • It writes the nested vehicle record. Its templates go in a generated package, Experiments.Standards.BobSimTemplates.
    • It maps pDriveline through the MIGRATION.md table. diff_use_lsd selects ClutchLSD or Open.
    • It lists every vehicle.yml input that has no BobLib field.
    • Brake placement is front Outboard and rear Inboard, the BobLib VehicleSim default. The status says that it is a default.
    • brake.front_bias binds in the VehicleSim template only.
    • The solved pose is now VehicleSim.pInitialization. preserve and legacy keep their meaning.
  • Runtime overrides: vcu.* becomes driver.*. frRampSteerDuration is removed. Step steer sends driver.stepDuration.
  • FourPost: the override names move to pVehicle.chassis.<axle>Axle.actuation.*. The bar rates still go only to the rig bars.
  • DOE: the blocks name the nested record paths. The record reader follows nested modifications.

How to check

  • make lint typecheck test: 1158 passed. test_bobsim_sources_do_not_reference_legacy_boblib_generation_layout needs git, so it fails in a worktree container. It passes on the host.
  • make standard-eval-four-post on the default car:
    • Static balance passes. The force residual is 1.6e-12 N. On 1bd6d78 it was 4.39 N at 118 s.
    • The anti values are unchanged: front CP +0.005136 and WC −0.003892 N/N, rear CP −0.008950 and WC +0.004728 N/N.
    • The bar-rate readback is match.
  • make standard-eval-transient: 8 of 8 cases run. Every override readback is match.
  • Drive reaction, straight line at 15 m/s:
    • The upright-side torque is 0 on both rear halfshafts.
    • The motor and differential mount torques sum to the halfshaft torques within 0.49 N·m.
  • make sync-vehicle lists the unbound driveline inputs and the brake-placement default.

Notes

Baselines need a decision

The baseline is not refreshed. test_baseline_provenance_matches_simulation_inputs fails until someone reviews a refresh. On the new pin:

  • The ramp-steer limit ay at 15 m/s falls from 21.26 to 16.73 m/s². BobLib BobVis: easier controls, LLTD, friction circles and a metrics tab #48 reports 16.91 to 16.61 m/s² for its reference vehicle. The BobSim case falls more. An Open-differential run reaches 18.47 m/s², so the ClutchLSD law explains about 1.7 of the 4.5 m/s². The rest is not separated.
  • The steady-state study loses 6 of 22 cases. Five low-ay cases hit the 420 s wall-clock timeout. (20 m/s, 2 m/s²) hits the settling timeout.
  • The transient ay and yaw gains fall about 8 %. quality.ay_fit_error is 0.051, above its 0.05 gate.

A value-only refresh is ready for four_post, ramp_steer and transient. It changes no tolerances and leaves the steady state untouched. It is not in this PR.

Unbound inputs

diff_T_capacity_max, diff_clutchEffectiveRadius, diff_w_transition, diff_c_viscous and the halfshaft JEquivalent fields have no BobLib field. The ClutchLSD differential is not recalibrated.

Overlap

#151 pins BobLib 2e16f1d (BobLib #31, still open). It edits engines/boblib, app/modelica_generator.py, app/static/app.js, transient_eval_sim.py and tests/test_modelica_generator.py, so it conflicts with this PR. BobLib #31 needs the new record paths.

Stack

8 of 8, on #158.

@raorjun
raorjun added this pull request to stack #159 October 26, 2026 05:27
@raorjun
raorjun requested a review from rhorvath02 October 26, 2026 06:10
@raorjun
raorjun marked this pull request as ready for review October 26, 2026 12:57
@rhorvath02

Copy link
Copy Markdown
Member

@raorjun failing CI

Base automatically changed from fix/generator-brake-bias-binding to main October 29, 2026 22:20
@raorjun
raorjun force-pushed the feat/bump-boblib-main branch from 7a5b9b9 to d2bcabe Compare October 29, 2026 22:20
BobLib #37-#58 replace the flat pVehicle records with owner-named nested
records and remove the Templates packages. The generator now writes the
new layout, following BobLib MIGRATION.md.

- The vehicle record holds chassis (frontAxle, rearAxle, frame), battery,
  controller, inverter, motor, transmission, brakes, driveline and aero.
  For the default car its chassis matches the BobLib record field for field.
- Templates go to a generated package, Experiments.Standards.BobSimTemplates.
  They extend BaseClasses.PartialVehicleSim and
  PartialDoubleWishboneFourPost. The four-post template keeps the rig bar
  bindings frAxleDW(pAxle(stabilizer = pFrStabar)).
- controller.finalDriveRatio and the brake links are bound the way BobLib
  binds them. A vehicle file cannot set pVCU.finalDriveRatio.
- pDriveline maps through the MIGRATION.md driveline table. diff_use_lsd
  selects ClutchLSD or Open. Fields with no BobLib home stay unbound. The
  status payload and the CLI list each one with the reason. An unknown
  field or unequal left and right halfshaft values stop generation.
- Brake placement is front Outboard and rear Inboard, the BobLib VehicleSim
  default. vehicle.yml has no placement input, and the status says so.
- brake.front_bias binds pVehicle.brakes.frontBrakeBias in the VehicleSim
  template only, so a bias change still leaves FourPostSim current.
- The solved pose is now VehicleSim.pInitialization. preserve keeps it only
  when the active entry was solved for this record and the record matches.
  legacy drops it. A pose for another record blocks generation.
- The makefile, the SHARK overlay restore and the app source links follow
  the new paths.
BobLib #46 moved the maneuver parameters from vcu to the StandardDriver
instance driver. The override aliases now name driver.*. targetVel still
maps to initialVel.

vcu.frRampSteerDuration has no replacement. On the old pin it only set the
default of stepDuration. The step-steer cases now send stepDuration, which
maps to driver.stepDuration, and the alias for frRampSteerDuration is gone.
A case that still sends frRampSteerDuration fails the override check as an
unknown name.
FourPost wrote pVehicle.pFrAxleDW.springFreeLength and springTable. The
override check now rejects them as unknown names. They are now
pVehicle.chassis.{front,rear}Axle.actuation.*. The bar rates still go only to
the rig bars pFrStabar and pRrStabar. The override probe uses the same names.

The schedule test reads the tables from BaseClasses.PartialFourPostRig and
KnCInputs, where BobLib now defines them.

On the default car the static balance now passes. The largest force residual
is 1.6e-12 N, against 4.39 N at 118 s on BobLib 1bd6d78. The docs record both.
The DOE blocks named the old flat records, such as pFrAxleDW and pAero. They
now name the nested record paths from BobLib MIGRATION.md, such as
chassis.frontAxle.actuation and aero. pTorsionalStiff becomes
chassis.frame with param torsionalStiffness.

The record reader follows a dotted block through the nested modifications.
A param can also be a nested modification, such as unsprungMass(m = ...).
The override names become pVehicle.<block>.<param>, which match the compiled
init XML. _doe_config.yaml is regenerated.
The steady-state study forced steadyStateAyGain 0.05 and steadyStateAyTi 1.0.
BobLib #46 retuned the defaults to 0.04 and 1.6. With the old gains the
sampled steering holds a limit cycle and fails the ay-rate settle check.
The old pin had the same defaults as the removed values, so its behavior
does not change.
@raorjun
raorjun force-pushed the feat/bump-boblib-main branch from d2bcabe to 9c9a0c8 Compare October 29, 2026 22:21
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.

2 participants