Skip to content

feat(map_based_predictor): add path cut for road border - #3181

Open
ohtt wants to merge 34 commits into
feat/v0.64/e2efrom
feature/map_based_predictor_cut_pedestrian_path_with_road_border
Open

feat(map_based_predictor): add path cut for road border#3181
ohtt wants to merge 34 commits into
feat/v0.64/e2efrom
feature/map_based_predictor_cut_pedestrian_path_with_road_border

Conversation

@ohtt

@ohtt ohtt commented Jul 13, 2026

Copy link
Copy Markdown

Summury

VRU(歩行者・自転車)の予測経路に対し、地図上の境界を考慮した経路カットを追加。

predictor_vru に2つのサブモジュールを新規追加。いずれも経路中心線ではなくオブジェクトのフットプリントで交差を判定する。

  • RoadBorderModule — road_border linestring をフットプリントが跨ぐ地点での減速度依存カット。クラス別の最大減速度で境界手前に停止できる場合のみ経路を切り詰める。停止できない場合、または横断歩道での横断の場合は、横断するものとみなして経路を維持。
  • GuardRailModule — guard_rail linestring をフットプリントが跨ぐ地点での無条件(強制)カット。
  • 共通部分を一旦footprint_path_cut に移植

test

Road border オレンジの境界線
pred_00808

Gurad rail 水色の境界線
pred_00735

Must pass
https://evaluation.ci.tier4.jp/evaluation/reports/e06f3618-e851-5776-9e39-f561a21e6820?project_id=x2_dev

@github-actions

Copy link
Copy Markdown

@ohtt Thank you for contributing to TIER IV E2E branch! Edit the checklist below and check the boxes as you complete the items.

Things to check before merging

Please check the following points before merging:

  • Write a brief description of this PR that can be understood by coding-agents.
  • Contact the branch manager on when the PR will be tested on vehicle.
  • Recommend to use Squash and Merge to merge the PR.
  • Report in #team-product-dev channel on the contents of the PR. @ branch manager.

After merging

Please check the following points after merging:

  • Wait for the automatic hash synchronization, which will automatically create a PR to update the hash, you should check the PR and merge it.

@tier4-autoware-public-bot tier4-autoware-public-bot Bot added beta/v0.64 Base branch: beta/v0.64 diffusion_planner Product: diffusion_planner labels Jul 13, 2026
@ohtt ohtt changed the title add path cut for road border feat(map_based_predictor): add path cut for road border Jul 13, 2026
@ohtt ohtt added the run:build-and-test-differential After beta/v0.41 label Jul 15, 2026
@ohtt
ohtt marked this pull request as ready for review July 15, 2026 02:28
@ohtt
ohtt requested a review from satoshi-ota July 15, 2026 02:31
Comment thread perception/autoware_map_based_prediction/lib/predictor_vru/road_border.cpp Outdated
Comment thread perception/autoware_map_based_prediction/lib/predictor_vru/road_border.cpp Outdated
collect_crosswalk_polygons(*lanelet_map_ptr_, search_box, crosswalk_corridor_extend_margin);

const std::vector<autoware_utils_geometry::LineString2d> candidates_removed_crosswalk_area =
remove_lines_overlapping_polygons(candidates, crosswalk_corridors);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

L218-229までの処理が基本的にすべての歩行者・自転車に対して実行されると思うのですが、処理時間が気になるところです。これらの処理は一度実行してすべての物体に対して結果を使いまわすこともできる用に思っていますが、そのように実装することは難しいですか?

map based predictionの処理内容も増えてきたので実行時間についてはARTで定期的に確認をお願いいたします。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

地図が大規模になってきたときに、lanelet_map_ptr_などを用いた探索で処理時間が爆発しないかが懸念です。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

先にCutされたLineStringを準備しておく手法も考えたのですが、そうすると
collect_candidate_road_border_linestringsの中のroad_border_layer.lineStringLayer.search(search_box);が使えなくなる、(R-treeを使った高速APIが使えなくなる)ので現状の実装にしていました。

編集済みのcandidates_removed_crosswalk_areaを持つlanelet::LaneletMapがを新たに生成できればいいのですが、それが可能かどうかは調査が必要なので調査します。

@ohtt ohtt Jul 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ちなみに私のPC上での実測は
candidates=0で3µs
candidates>0で14µs
ほどでした

@ohtt ohtt Jul 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

別のRtreeを初回に一度だけ作る実装に変更しました。
変更後は
candidates=0で0.41µs
candidates>0で0.73µs

@ohtt
ohtt force-pushed the feature/map_based_predictor_cut_pedestrian_path_with_road_border branch from 4091852 to 2ae5415 Compare July 16, 2026 06:10
@ohtt
ohtt force-pushed the feature/map_based_predictor_cut_pedestrian_path_with_road_border branch from 2ae5415 to 284449f Compare July 16, 2026 06:14
ohtt added 3 commits July 16, 2026 15:17
…ad_border' of github.com:tier4/autoware_universe into feature/map_based_predictor_cut_pedestrian_path_with_road_border
@sonarqubecloud

Copy link
Copy Markdown

@ohtt
ohtt force-pushed the feature/map_based_predictor_cut_pedestrian_path_with_road_border branch from 60a7353 to 84845bd Compare July 16, 2026 08:30
@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@satoshi-ota
satoshi-ota self-requested a review July 17, 2026 02:17

@satoshi-ota satoshi-ota 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.

一部追加で対応が必要なシーンが見つかりましたので、その実装を私の方で進めます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta/v0.64 Base branch: beta/v0.64 diffusion_planner Product: diffusion_planner run:build-and-test-differential After beta/v0.41

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants