Fix VehicleSim QSS initialization from FourPost state - #19
Merged
Conversation
rhorvath02
force-pushed
the
fix/vehiclesim-qss-initialization
branch
from
August 8, 2026 20:05
31ceba7 to
78f4fea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
VehicleSim did not start from a coupled static suspension pose. The chassis reference frame used a legacy mass-weighted estimate while the four independent lower-arm coordinates started at zero. That combination did not reproduce the settled front/rear spring lengths or tire loads, so the simulation spent its opening transient finding the suspension equilibrium.
The old mass/CG calculation also represented only the supplied left-side axle records. This PR separates that legacy start-pose estimate from the actual complete-vehicle mass properties instead of treating the estimate as the vehicle CG.
QSS initialization
The record is solved for the standard initialVel = 15 m/s; VehicleSim warns when used at another initial velocity.
Post-rebase VehicleSim results
Validated after rebasing onto current main, including the merged wheel alignment, force-frame, aerodynamic, transient-slip, vector-angle, and initialization-gate fixes.
Initialized spring lengths:
Initial loads remain left/right symmetric: 710.496 N per front corner and 721.413 N per rear corner. All recorded outputs are finite. Initialization completed without homotopy, and the standard ramp-steer simulation terminated normally at the QSS plateau at 6.140 s.
The corrected complete-vehicle mass properties remain:
The post-rebase Windows run reported 37.31 s in the simulation stage. End-to-end time was dominated by a fresh OpenModelica backend translation, so runtime is not the primary claim; the material improvement is removal of the artificial suspension startup transient.
Validation
Out of scope
The remaining initial longitudinal acceleration is associated with drivetrain/controller torque balance. It is separate from the suspension heave/settling issue addressed here.