Skip to content

[Architecture] Integrate configurable axles and nested vehicle calibration - #48

Merged
rhorvath02 merged 6 commits into
review/boblib-electricalfrom
review/boblib-vehicle-assembly
Oct 25, 2026
Merged

rhorvath02 merged 6 commits into
review/boblib-electricalfrom
review/boblib-vehicle-assembly

Conversation

@rhorvath02

@rhorvath02 rhorvath02 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Related Issues

#32

Purpose

Replace duplicated vehicle configurations with a shared assembly whose axles, frame and subsystem calibration can be selected independently.

Approach

  • Introduce Chassis.DoubleWishbone, shared chassis/experiment bases, and direct, bellcrank and stabilizer axle variants.
  • Migrate nested vehicle records, typed buses, mounted driveline/brake reactions and controller boundaries together with their callers. Remove obsolete class paths and move configuration combinations into tests.
  • Add single-axle KnC entry points and configuration examples. Correct OMC's homotopy early-success return in exported runtime copies.

This changes public class paths and parameter ownership; existing flat modifiers must migrate to the owner records.

Validation

Callers, fixture paths, test collection and Modelica formatting checked. The full-vehicle FMU passed all seven drive/brake/re-launch checks, allowing removal of the expected-failure marker. Exhaustive rendered-diagram acceptance remains outstanding.

Vehicle behavior changes and comparison

The reference vehicle uses the MSL ClutchLSD stick-slip law instead of the old tanh law, real 0.02 kg·m² inertia on each halfshaft, and final 3D drivetrain reactions. VehicleSim selects outboard front brakes and inboard rear brakes; select Outboard explicitly for outboard rear hardware. The closed-loop hold is 1.0 s instead of 0.1 s to require sustained convergence; the legacy duration remains configurable.

Follow-up 0729995 at the stack tip restores normal termination for envelope limits and settling timeouts, with terminationStatus distinguishing settled, linearity, timeout, tire-load and sideslip outcomes. Invalid configuration remains an error. Seven fresh full-vehicle monitor tests passed.

Reproducible before/after comparison: the default ramp's final lateral acceleration changes from 16.914860 to 16.614094 m/s² and yaw rate from 1.136999 to 1.116581 rad/s. Acceleration/braking final speeds at 2 s differ by about 0.00134 m/s. All six runs completed with finite recorded signals and positive tire loads. These aggregate results document changed behavior; they do not isolate each change or certify the entire operating envelope.

@rhorvath02
rhorvath02 force-pushed the review/boblib-vehicle-assembly branch from 12d1cc6 to 4dcf318 Compare October 22, 2026 08:44

@raorjun raorjun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes the class paths and flat modifiers that BobSim uses today, and I found no companion BobSim PR. BobSim app/modelica_generator.py (origin/main) still emits BobLib.Chassis.Suspension.FrAxleDW_Direct/_BC/_BC_Stabar (lines 74-89), Chassis_DW (929), BaseVehicleSim (926), BaseFourPostSim (974), Experiments/Standards/Templates/Vehicle (311-334), and flat fields such as pDriverMass (858). This PR deletes all of them, so the next BobLib submodule bump breaks record generation. The larger risk is silent. _write_override_file in simulations/response/mbd/_modelica_runner.py skips any key that is not in the init XML (lines 735-738). MODELICA_OVERRIDE_ALIASES (lines 21-43) maps useMode, targetAy, steerAmp, velGain and others to vcu.*. These parameters now live on driver.* (Drivers/Internal/Maneuver.mo). four_post_eval_sim.py:907-908 writes pVehicle.pFrAxleDW.springFreeLength and pVehicle.pRrAxleDW.springFreeLength, which no longer exist. After the bump, every sweep variant runs the baseline with no error, and every maneuver runs the default mode. Please open the BobSim migration PR together with this one, and make the override writer fail on unknown keys. This PR also changes the default vehicle physics with no note in the description (see inline comments). Please attach a full-vehicle old-versus-new comparison, for example steady-state Ay, ramp steer, and launch, before merge.

Comment thread BobLib/Experiments/Standards/BaseClasses/PartialElectricVehicle.mo
Comment thread BobLib/Experiments/Standards/VehicleSim.mo
Comment thread BobLib/Experiments/Standards/BaseClasses/PartialElectricVehicle.mo
Comment thread BobLib/Experiments/Standards/BaseClasses/PartialVehicleSim.mo
Comment thread BobLib/Experiments/Standards/BaseClasses/PartialVehicleSim.mo
@raorjun

raorjun commented Oct 23, 2026

Copy link
Copy Markdown
Member

Recorded the default-vehicle behavior changes in CHANGELOG.md under Unreleased in 38c6308: ClutchLSD, real halfshaft inertia, inboard rear brakes, final driveTrainMechanics3D, the 1.0 s hold, and the assert(false) limits (the sideslip limit too). I did not change any defaults. Whether the rear brakes should be Inboard and whether limits should assert are your calls. The fixture updates for the #38 record change are in 39ffd9c. The BobSim side (generator paths and the silent override skip) still needs a companion BobSim PR.

@rhorvath02
rhorvath02 merged commit 093952a into main Oct 25, 2026
3 checks passed
@rhorvath02
rhorvath02 deleted the review/boblib-vehicle-assembly branch October 25, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-assisted Developed with AI agent assistance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants