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

feat(behavior_path_planner): define DrivableAreaInfo and commonize generateDrivableArea #3444

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Apr 17, 2023

Description

Currently, a drivable area is created in each module.
With a new architecture, since multiple modules can be launched simultaneously, in some cases concatenating drivable area from multiple modules is required, which is difficult to do.
Temporarily the specific implementation for concatenating the drivable area form lane_change, avoidance, and pull_out is used now.

To handle this module-specific temporary implementation, with this PR, the drivable area is created as follows.

  • Each module creates the drivable_area_info, which is an abstract information of generating the drivable area.
// NOTE: To deal with some policies about drivable area generation, currently DrivableAreaInfo is
// quite messy. Needs to be refactored.
struct DrivableAreaInfo
{
  std::vector<DrivableLanes> drivable_lanes;
  std::vector<tier4_autoware_utils::Polygon2d> obstacle_polys;

  // temporary only for pull over's freespace planning
  double drivable_margin{0.0};

  // temporary only for side shiftEdit
  bool is_already_expanded{false};
};
  • Then, in the last part of behavior_path_planner, the drivable_area_info is converted to the drivable area and put into the output path.
  • NOTE:
    • For the old architecture, each module put the drivable area into the output path as well.
    • Side shift and pull over's free space planner has different policies for generating the drivable area. Therefore, DrivableAreaInfo has specific variables for them.

I confirmed that the drivable area is generated correctly.

pull out
image

lane change
image

external lane change
image

pull over (not freespace)
image

pull over (freespace)

pull out + avoidance
image

Related links

Tests performed

Notes for reviewers

Interface changes

Nothing

Effects on system behavior

Nothing

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

@takayuki5168 takayuki5168 changed the title po feat(behavior_path_planner): define DrivableAreaInfo and commonize generateDrivableArea Apr 17, 2023
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Apr 17, 2023
@takayuki5168 takayuki5168 force-pushed the feat/common-drivable-area-generation2 branch 4 times, most recently from d0810f9 to e69f5f3 Compare April 23, 2023 19:04
@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.84 ⚠️

Comparison is base (2894c4b) 14.97% compared to head (aef2539) 14.13%.

❗ Current head aef2539 differs from pull request most recent head 6812d12. Consider uploading reports for the commit 6812d12 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3444      +/-   ##
==========================================
- Coverage   14.97%   14.13%   -0.84%     
==========================================
  Files        1301     1413     +112     
  Lines       92057    98983    +6926     
  Branches    29049    29611     +562     
==========================================
+ Hits        13788    13994     +206     
- Misses      63598    70169    +6571     
- Partials    14671    14820     +149     
Flag Coverage Δ *Carryforward flag
differential 15.35% <0.00%> (?)
total 14.11% <ø> (-0.87%) ⬇️ Carriedforward from 534d93c

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

Impacted Files Coverage Δ
...ner/include/behavior_path_planner/data_manager.hpp 46.66% <0.00%> (-3.34%) ⬇️
.../include/behavior_path_planner/planner_manager.hpp 0.00% <ø> (ø)
...th_planner/scene_module/scene_module_interface.hpp 34.10% <0.00%> (-0.82%) ⬇️
...nner/scene_module/side_shift/side_shift_module.hpp 100.00% <ø> (ø)
...ude/behavior_path_planner/utils/avoidance/util.hpp ∅ <ø> (∅)
...nner/include/behavior_path_planner/utils/utils.hpp 45.45% <0.00%> (-54.55%) ⬇️
...er/src/scene_module/avoidance/avoidance_module.cpp 3.44% <0.00%> (-0.01%) ⬇️
...lanner/src/scene_module/avoidance_by_lc/module.cpp 0.00% <ø> (ø)
.../scene_module/goal_planner/goal_planner_module.cpp 14.78% <0.00%> (-0.37%) ⬇️
...planner/src/scene_module/lane_change/interface.cpp 16.19% <0.00%> (-0.16%) ⬇️
... and 8 more

... and 127 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@takayuki5168 takayuki5168 force-pushed the feat/common-drivable-area-generation2 branch 5 times, most recently from 44f4944 to 2466b18 Compare April 24, 2023 16:10
@takayuki5168 takayuki5168 marked this pull request as ready for review April 25, 2023 07:08
@takayuki5168 takayuki5168 force-pushed the feat/common-drivable-area-generation2 branch 4 times, most recently from d1cd0f4 to aef2539 Compare April 26, 2023 07:42
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 force-pushed the feat/common-drivable-area-generation2 branch from aef2539 to a247c94 Compare April 26, 2023 12:49
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
@takayuki5168 takayuki5168 enabled auto-merge (squash) April 26, 2023 13:15
@takayuki5168 takayuki5168 merged commit c8a889e into autowarefoundation:main Apr 26, 2023
@takayuki5168 takayuki5168 deleted the feat/common-drivable-area-generation2 branch April 26, 2023 14:05
Mingyu1991 pushed a commit to Mingyu1991/autoware.universe that referenced this pull request Jun 26, 2023
…nerateDrivableArea (autowarefoundation#3444)

* feat(behavior_path_planner): generate DrivableArea at last

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix lane change

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix goal planner

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* remove cerr

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* Update planning/behavior_path_planner/src/planner_manager.cpp

Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>

---------

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Signed-off-by: Mingyu Li <mingyu.li@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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants