Add aggressiveness-scaled brake ramping#195
Merged
JohanAlvedal merged 1 commit intocodex/01from Jan 20, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
brake_offset_cso the brake offset approaches the target at a controllable speed instead of using a symmetric rate limiter.Description
ramp_factorby clampingaggressivenessto 1..5 and dividing by3.0, then deriveramp_up_c_per_15min = 3.0 * ramp_factorandramp_down_c_per_15min = 2.0 * ramp_factor.step_up = ramp_up_c_per_15min * (dt_minutes / 15.0)andstep_down = ramp_down_c_per_15min * (dt_minutes / 15.0)and apply directional logic so the offset increases bystep_upor decreases bystep_downtoward the target.apply_rate_limitusage for brake offset with the new separate up/down ramp logic and continue to persist the offset using the existing_persist_brake_offsetflow.ramp_up_c_per_15minandramp_down_c_per_15minin the sensor attributes via_build_attributes.Testing
pytest -qand all tests passed:31 passed.Codex Task