Repository navigation
Mori/keep brake before stop - #3582
Draft
shotamori-dev wants to merge 9 commits into
Draft
shotamori-dev wants to merge 9 commits into
shotamori-dev wants to merge 9 commits into
Conversation
…or brake keeping before stop - Implement a robust brake-keeping state machine (NORMAL, TERMINAL_CLIP, STOP_AND_GO) in keepBrakeBeforeStop to prevent unexpected acceleration before stop points. - Promote local stopped condition to class member `m_is_stopped_with_delay` for state transition checks. - Add `terminal_clip_dist_th`, `terminal_clip_vel_th`, and `abort_dist_th` parameters to controller, default YAML, and JSON schema.
shotamori-dev
force-pushed
the
mori/keep-brake-before-stop
branch
from
October 7, 2026 08:57
d184220 to
d872881
Compare
…ctly distance-based fail-safe
…in DRIVE Reset m_brake_keeping_state to NORMAL when the controller state is not DRIVE. This prevents residual sub-states (TERMINAL_CLIP or STOP_AND_GO) from affecting vehicle behavior during re-departure, manual takeover, or emergency transitions.
…machine for robust stopping This commit refines the `keepBrakeBeforeStop` sub-state machine to ensure a robust and smooth stopping behavior, completely separating the control logic from trajectory noise and resolving potential edge cases. Key changes: - Added a lower-bound guard (`D >= 0.0`) for `TERMINAL_CLIP` entry to prevent unintended clip engagement when restarting after a slight overshoot. - Refined the `STOP_AND_GO` (early stop recovery) entry condition to strictly trigger outside the stop area (`D > drive_state_stop_dist`). - Integrated `m_pid_vel.reset()` upon entering `STOP_AND_GO` to clear accumulated integral errors (windup) during the brake clip, preventing sudden acceleration spikes. - Introduced a landing transition from `STOP_AND_GO` to `TERMINAL_CLIP` when entering the stop area (`D <= drive_state_stop_dist`). This prevents overshooting during recovery and ensures a safe hand-off to the main `STOPPED` state.
|
This branch has not been deployed
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.



Description
DPの出力ノイズ(目標速度の不自然なフリッカー等)に起因する停止際のブレーキのバタつきや乗り心地悪化を防止するため、keepBrakeBeforeStop の制御ロジックの改善案を実装しました。
詳細な設計背景・状態遷移図については、Related linksを参照してください。
brake_keeping_acc, brake_keeping_terminal_clip_dist_th, brake_keeping_abort_dist_th は動的に変更可能。それぞれ初期値は、-0.2m/s2, 1.0m, 2.0m.
デバッグ用出力値(Debug Values)に以下3つを追加(43〜)
BRAKE_KEEPING_STATE: ブレーキ保持機能の内部状態IS_STOPPED_WITH_DELAY: 遅延考慮の停止状態フラグHAS_STOP_POINT: 停止ポイントの有無Related links
【keepBrakeBeforeStop機能】E2Eプランナーにおける停止際制御の設計
Tests performed
Notes for reviewers
Interface changes
Effects on system behavior
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.