Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(behavior_velocity_planner): avoid duplicates in intersection module #1483

Conversation

maxime-clem
Copy link
Contributor

Signed-off-by: Maxime CLEMENT maxime.clement@tier4.jp

Description

The intersection module of the behavior_velocity_planner outputs very large debug message when crossing multiple intersections. Moreover, the CPU load also greatly increases in that case.

This PR solves this issue by simplifying the detection_area_lanelets calculated by function getObjectiveLanelets().
This variable is used to (1) calculate the lanelet IDs to use for collision detection and (2) calculate the debug polygons to highlight in rviz. Originally, the detection_area_lanelets was a vector of sequences of lanelets where the sequences could overlap, sharing many common lanelets. This would result in many duplicated IDs (1) and many overlapping polygons (2).
In this PR, the detection_area_lanelets is changed to be a vector of lanelets without any duplicate, which simplifies both (1) and (2) without changing the behavior of the module.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
@maxime-clem maxime-clem added type:new-feature New functionalities or additions, feature requests. component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Aug 1, 2022
@maxime-clem maxime-clem self-assigned this Aug 1, 2022
@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #1483 (1704a7c) into main (05f6a6b) will decrease coverage by 0.13%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1483      +/-   ##
==========================================
- Coverage   10.36%   10.23%   -0.14%     
==========================================
  Files        1135     1118      -17     
  Lines       79574    78025    -1549     
  Branches    18534    18171     -363     
==========================================
- Hits         8251     7982     -269     
+ Misses      63122    62530     -592     
+ Partials     8201     7513     -688     
Flag Coverage Δ *Carryforward flag
differential 4.61% <0.00%> (?)
total 10.25% <0.00%> (-0.10%) ⬇️ Carriedforward from 6e44bfa

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...lanner/scene_module/avoidance/avoidance_module.hpp 0.00% <ø> (ø)
...er/src/scene_module/avoidance/avoidance_module.cpp 0.00% <0.00%> (ø)
...c/scene_module/intersection/scene_intersection.cpp 0.00% <0.00%> (ø)
...ule/intersection/scene_merge_from_private_road.cpp 0.00% <0.00%> (ø)
...ity_planner/src/scene_module/intersection/util.cpp 0.00% <0.00%> (ø)
...wer/include/trajectory_follower/mpc_trajectory.hpp 0.00% <0.00%> (-50.00%) ⬇️
...odel/vehicle_model_bicycle_kinematics_no_delay.cpp 73.91% <0.00%> (-17.40%) ⬇️
...vehicle_model/sim_model_ideal_steer_acc_geared.cpp 73.58% <0.00%> (-9.44%) ⬇️
.../motion_velocity_smoother/src/trajectory_utils.cpp 0.00% <0.00%> (-2.74%) ⬇️
...planning_evaluator/src/planning_evaluator_node.cpp 37.11% <0.00%> (-1.04%) ⬇️
... and 142 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7ae23e...1704a7c. Read the comment docs.

@maxime-clem maxime-clem marked this pull request as ready for review August 2, 2022 09:25
@TakaHoribe
Copy link
Contributor

@maxime-clem Thank you! I asked @taikitanaka3 to review this PR.

@soblin soblin self-requested a review August 2, 2022 10:47
Copy link
Contributor

@taikitanaka3 taikitanaka3 left a comment

Choose a reason for hiding this comment

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

LGTM
I checked with lanelets with loop
image
I checked with right of way
image

@taikitanaka3 taikitanaka3 enabled auto-merge (squash) August 2, 2022 11:08
Copy link
Contributor

@soblin soblin left a comment

Choose a reason for hiding this comment

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

using set for checking duplicate lanelet looks good !

@taikitanaka3 taikitanaka3 merged commit 17c3656 into autowarefoundation:main Aug 2, 2022
@maxime-clem maxime-clem deleted the fix-behavior_velocity_planner-overlapping_intersection_lanelets branch August 2, 2022 11:50
tkimura4 referenced this pull request in tier4/autoware.universe Aug 2, 2022
…le (#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
…le (tier4#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…le (tier4#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…le (tier4#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
…le (autowarefoundation#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
…le (tier4#1483)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants