feat(crane_local_planner): update_rate_hz<=0でコールバック駆動モードを追加#1354
Merged
feat(crane_local_planner): update_rate_hz<=0でコールバック駆動モードを追加#1354
Conversation
## 背景 上流コマンドのレートとタイマーレートがずれると同一メッセージの 多重処理や取りこぼしが発生する。また update_rate_hz=0 の場合に ゼロ除算で未定義動作になるバグがあった。 ## 変更内容 - update_rate_hz <= 0.0 のときタイマーを生成せず、/control_targets 受信コールバック内で直接 processLatestCommands() を実行するモードを追加 - update_rate_hz > 0.0 のときは従来通りのタイマー駆動(挙動維持) - コールバックモード選択時に起動ログで明示 - crane.launch.xml のデフォルト値を 120.0 → 0.0 に変更し コールバック駆動をデフォルト運用に設定
## 変更内容 - crane.launch.xml の実機用 local_planner 設定の update_rate_hz を 120.0 → 0.0 に変更し、コールバック駆動モードをデフォルトとする
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.
概要
crane_local_plannerのupdate_rate_hzパラメータが 0 以下のとき、タイマーではなく上流コマンド/control_targetsの受信コールバックでprocessLatestCommands()を駆動するモードを追加します。背景・根本原因
update_rate_hz = 0のときゼロ除算で未定義動作になるバグがあった変更内容
local_planner.hpp:update_rate_hz <= 0.0のときタイマーを生成せず、/control_targets受信コールバック内で直接processLatestCommands()を呼ぶよう分岐を追加。正値の場合は従来通りタイマー駆動。crane.launch.xml: シミュレータ・実機両方のupdate_rate_hzを0.0に変更し、デフォルトをコールバック駆動に設定。