Skip to content

Mori/keep brake before stop - #3582

Draft
shotamori-dev wants to merge 9 commits into
tier4:v4.4.0.1-hotfixfrom
shotamori-dev:mori/keep-brake-before-stop
Draft

shotamori-dev wants to merge 9 commits into
tier4:v4.4.0.1-hotfixfrom
shotamori-dev:mori/keep-brake-before-stop

Conversation

@shotamori-dev

@shotamori-dev shotamori-dev commented Oct 7, 2026 •

Copy link
Copy Markdown

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

…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
shotamori-dev force-pushed the mori/keep-brake-before-stop branch from d184220 to d872881 Compare October 7, 2026 08:57
…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.
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

1 participant