fix(crane_world_model_publisher): Vision単独検出時のボール速度0固定を修正#1388
Open
HansRobo wants to merge 1 commit into
Open
Conversation
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_world_model_publisherにおいて、Tracker 未検出かつ Vision 検出のみの状況でボール速度が 0 に固定されてしまう不具合を修正します。Vision 連続フレームの有限差分による速度推定フォールバックを実装しました。問題
world_model_data_provider.cppのintegrateBallInfo()では、Tracker が未検出で Vision のみ検出している場合にball_info_.velocityとball_info_.velocity_normを 0 に固定していました。その直後のボール状態判定
velocity_norm < 0.1により、実際にはボールが高速移動していても常にSTOPPEDと判定されてしまいます。これにより Tracker 障害時に下流スキルからボールの移動情報が失われ、ルーズボール検知失敗などの問題を招いていました。原因
Vision 単独経路に速度推定のフォールバックが存在せず、速度を無条件に 0 固定していたためです。前回 Vision 位置・時刻を保持する仕組みも無く、有限差分による速度算出ができませんでした。
修正内容
world_model_data_provider.hppに前回 Vision ボール位置・時刻・有効フラグを保持するメンバ (prev_vision_ball_position_,prev_vision_ball_stamp_,prev_vision_ball_valid_) を追加。integrateBallInfo()の Vision 単独検出経路で、(現在pos - 前回pos) / dtによる有限差分で速度を推定するフォールバックを実装。dt <= 0の場合のみ速度 0 とする。検証
cwm の独立オーバーレイ worktree 上で対象パッケージの colcon build (
--no-rdeps) を実施し、コンパイルが正常に完了することを確認しました(Build complete.)。状態推定ロジックの変更のため、実機・シミュレーションでの挙動確認は別途推奨します。レビュー観点
last_detect_time) を用いており、フレーム間隔が正しく反映されるか。本PRはソースコード監査ワークフローで検出・敵対的検証されたバグに対する単一修正です。