Skip to content

fix(autoware.repos): bump autoware_auto_msgs to include the missing IDL includes - #14

Draft
masahiro-kubota wants to merge 1 commit into
aichallenge-mainfrom
fix/bump-autoware-auto-msgs-foxglove-idl-include
Draft

masahiro-kubota wants to merge 1 commit into
aichallenge-mainfrom
fix/bump-autoware-auto-msgs-foxglove-idl-include

Conversation

@masahiro-kubota

Copy link
Copy Markdown

概要

autoware.repos の core/external/autoware_auto_msgs のピンを、Foxglove のスキーマエラーを直す修正を含む最小のコミットまで上げる。

   core/external/autoware_auto_msgs: # TODO(mfc): Remove when autoware_msgs is merged
     type: git
     url: https://github.com/tier4/autoware_auto_msgs.git
-    version: f6642370c6f4f42a5dc0b6c1fc4a21396d4dc34c
+    version: 1e8b6d234e2690c9da386f006bb60835cdccddfd

背景

foxglove_bridge を繋ぐと Definition of ros2 schema x has changed during the server's runtime が出て、autoware_auto_perception_msgs/msg/DetectedObjects などが Studio 側で読めなくなる。

原因は autoware_auto_msgs の IDL が、使っている型の #include を欠いていたこと。foxglove/ros-foxglove-bridge#253 で切り分けられていて、メンテナも「その版に tier4/autoware_auto_msgs#45 が入っているか確認してほしい」と回答している。

修正 tier4/autoware_auto_msgs#45(2023-09-01 マージ)が追加したのは #include 3 行だけ。

ファイル 追加された include
autoware_auto_perception_msgs/msg/DetectedObjectKinematics.idl geometry_msgs/msg/PoseWithCovariance.idl
autoware_auto_perception_msgs/msg/TrackedObjectKinematics.idl geometry_msgs/msg/PoseWithCovariance.idl
autoware_auto_planning_msgs/msg/TrajectoryPoint.idl geometry_msgs/msg/Pose.idl

現在のピン f6642370 は 2023-01-30 で、この修正より前。

なぜ 1e8b6d23 なのか(最新にしない理由)

tier4/main の履歴は線形で、現在のピン以降は次の 3 コミットしかない。

コミット 日付 内容
e1795354 2023-05-08 add UP_LEFT_ARROW and UP_RIGHT_ARROW for traffic_light (autowarefoundation#42)
1e8b6d23 2023-09-01 add missing includes for Pose / PoseWithCovariance (autowarefoundation#45) ← 目的の修正
624aae9f 2024-07-02 docs(TrajectoryPoint): acceleration_mps2 のコメント追加 (autowarefoundation#47)

1e8b6d23 が autowarefoundation#45 を含む最小のコミットなので、ここで止めている。最新の 624aae9f はコメント追加だけで実利が無いため入れていない。

注意点:autowarefoundation#42 が TrafficLight の定数値を振り直している

1e8b6d23 に上げると e1795354(autowarefoundation#42)も一緒に入る。これは飛ばせない(線形履歴のため)。autowarefoundation#42 は UP_LEFT_ARROW / UP_RIGHT_ARROW を列挙の途中に挿入しているので、以降の定数値がずれる。

定数 変更前 変更後
UP_LEFT_ARROW (無し) 9
UP_RIGHT_ARROW (無し) 10
DOWN_ARROW 9 11
DOWN_LEFT_ARROW 10 12
DOWN_RIGHT_ARROW 11 13
CROSS 12 14
SOLID_OFF 13 15
SOLID_ON 14 16
FLASHING 15 17
UNKNOWN 16 18

ワークスペース内は影響なしと確認した

AutomotiveAIChallenge/autoware.universe の awsim-stable を clone して確認した。

  • TrafficLight:: の定数を参照しているのは以下の 11 ファイルで、すべて記号名での参照。数値べた書きは無い
    • common/tier4_traffic_light_rviz_plugin, perception/crosswalk_traffic_light_estimator, perception/traffic_light_classifier(3ファイル), perception/traffic_light_visualization(2ファイル), planning/behavior_velocity_planner(crosswalk / intersection / traffic_light)
    • 例:traffic_light_classifier の state2label_ も定数をキーにした対応表で、値がずれても整合する
  • yaml / param / python / xml 側に SOLID_ON などの数値対応表を持つ箇所は無い
  • 新定数 UP_LEFT_ARROW / UP_RIGHT_ARROW を参照している箇所は universe 側に存在しない(=ビルドが壊れる要素も、挙動が変わる分岐も増えない)

ワークスペースは全体を同じ msgs でビルドし直すので、番号の振り直しは内部的に一貫する。

残るリスク

このワークスペースの外で作られた数値とは整合しなくなる。具体的には次の 2 つで、こちらでは検証できていない。

  1. AWSIM — 信号情報を publish している場合、Unity 側にビルド済みの数値と食い違う可能性がある
  2. バンプ前に録った rosbag / mcap — 信号トピックを含むものは、再生時に色・形状の意味がずれる

レースのシナリオで信号を使っていないなら、いずれも実害は無いはず。使っている場合はマージ前に確認してほしい。

代替案(採用しなかった)

autowarefoundation#42 をどうしても避けたい場合は、org 側に autoware_auto_msgs を fork して f6642370 の上に autowarefoundation#45 だけ cherry-pick し、autoware.repos の url をその fork に向ける方法がある。ただし維持対象の fork が 1 つ増えるうえ、上で見たとおり autowarefoundation#42 のワークスペース内への影響が無いので、単純なバンプを選んだ。必要ならこちらに切り替える。

確認したこと

…DL includes

Foxglove の "Definition of ros2 schema x has changed during the server's runtime"
は、autoware_auto_msgs の IDL が Pose / PoseWithCovariance の #include を欠いて
いたことが原因(foxglove/ros-foxglove-bridge#253)。修正は
tier4/autoware_auto_msgs#45 で入っているので、これを含む最小のコミットまで上げる。

f6642370 -> 1e8b6d23 で取り込まれるのは以下の2コミットのみ。

- e1795354 add UP_LEFT_ARROW and UP_RIGHT_ARROW for traffic_light (autowarefoundation#42)
- 1e8b6d23 add missing includes for used types Pose and PoseWithCovariance (autowarefoundation#45)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 476ccc8b6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread autoware.repos
type: git
url: https://github.com/tier4/autoware_auto_msgs.git
version: f6642370c6f4f42a5dc0b6c1fc4a21396d4dc34c
version: 1e8b6d234e2690c9da386f006bb60835cdccddfd

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the existing traffic-light wire values

When this manifest is used with a prebuilt AWSIM publisher or an existing rosbag/MCAP containing TrafficLightElement values from the previous pin, this update silently changes their meaning: the included e1795354 inserts two constants at values 9 and 10, shifting DOWN_ARROW through UNKNOWN by two. For example, a previously encoded DOWN_ARROW value of 9 is decoded as UP_LEFT_ARROW, which can corrupt perception and planning behavior without a type or build failure. Please use a revision containing the IDL-include fix without this renumbering, or retain explicit values for the existing constants and append the new ones.

Useful? React with 👍 / 👎.

@masahiro-kubota
masahiro-kubota marked this pull request as draft August 24, 2026 08:23
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