fix(crane_local_planner): 未指令の味方RVOエージェント残留(幽霊障害物)を修正#1400
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_local_plannerの RVO2 プランナにおいて、指令が止まった味方ロボットが RVO シミュレータ上に前回位置のまま残り、他の味方の経路計画に対する「幽霊障害物」となる不具合を修正します。問題
rvo2_planner.cppのreflectWorldToRVOSimは、味方エージェント (0-19) のうちmsg.robot_commandsに含まれるものだけを更新していました。一方、敵エージェント (20-39) はavailable()が false の場合に (20,20) へ退避して速度0にする処理が存在します。味方側にはこの退避処理が無いため、指令が止まった (退場・通信断などで
robot_commandsから外れた、あるいはavailable()が false になった) 味方エージェントが RVO シミュレータ内に前回位置のまま残留し、他の味方ロボットの経路計画に影響する幽霊障害物となっていました。原因
RVO シミュレータは永続的に保持されるため、各サイクルで更新されなかったエージェントは前回状態を維持します。敵側には未活性エージェントの退避処理があるのに対し、味方側には同等の処理が欠けており、処理が非対称でした。
修正内容
reflectWorldToRVOSimに、敵側と対称な味方エージェントの退避処理を追加しました。std::array<bool, 20>で記録。world_model->ours().robotsを走査し、今サイクルで指令が無い、またはavailable()が false の味方ロボットを敵側と同様に位置 (20,20)・速度0へ退避。これにより、指令の止まった味方エージェントが幽霊障害物として残ることを防ぎます。
検証
cwm の独立オーバーレイ worktree 上で
colcon build(--no-rdeps)によるcrane_local_plannerのコンパイル確認を実施し、ビルド成功 (Build complete.) を確認しました。レビュー観点
RVO 挙動の変更を含むため、レビュー必須です。特に以下を確認してください。
available()が false)が意図通りか。本PRはソースコード監査ワークフローで検出・敵対的検証されたバグに対する単一修正です。