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(lane_departure_checker,start_planner): add check for path within lanes for bvspm #6366

Conversation

danielsanchezaran
Copy link
Contributor

@danielsanchezaran danielsanchezaran commented Feb 9, 2024

Description

In this PR, a new departure check set of functions have been added to lane_departure_checker that:

  1. Creates an ego vehicle footprint convex hull.
  2. Checks which lanelets are touched by the footprint hull using the MapLayer
  3. Then Checks if each individual footprint is fully within the lanelets or not
    I have implemented this check for shift pull out and geometric pull out to improve and be able to consider all the necessary lanelets to do a proper out of lane check. This solves the issue in which the ego vehicle cannot start with a shift pull out on overlapped lanes:

Before, the shift pull out planner cannot generate a route when the ego overlaps more than one lane (other planners are disabled):
image

After the changes on this PR:
image

Related links

Tests performed

Tests performed: Psim and Scenario tests: TIER IV INTERNAL LINK , degradation seems to be caused by an unrelated problem with this PR.

Notes for reviewers

Interface changes

Effects on system behavior

Checked lanes for lane departure are increased to involve all relevant lanelets for the start planner.

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.

@danielsanchezaran danielsanchezaran self-assigned this Feb 9, 2024
@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Feb 9, 2024
@kyoichi-sugahara kyoichi-sugahara force-pushed the feat/add-check-for-path-within-lanes-for-bvspm branch from 9098aa3 to 5305676 Compare February 9, 2024 07:21
@danielsanchezaran danielsanchezaran force-pushed the feat/add-check-for-path-within-lanes-for-bvspm branch from 9ffbc69 to 3b49562 Compare February 26, 2024 00:33
@danielsanchezaran danielsanchezaran marked this pull request as ready for review February 26, 2024 00:36
@danielsanchezaran danielsanchezaran added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 26, 2024
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 73 lines in your changes are missing coverage. Please review.

Project coverage is 14.63%. Comparing base (e64415b) to head (6208d4f).
Report is 5 commits behind head on main.

Files Patch % Lines
..._departure_checker_node/lane_departure_checker.cpp 0.00% 49 Missing ⚠️
...s/parking_departure/geometric_parallel_parking.cpp 0.00% 10 Missing ⚠️
...r_path_start_planner_module/src/shift_pull_out.cpp 0.00% 7 Missing ⚠️
...th_start_planner_module/src/geometric_pull_out.cpp 0.00% 5 Missing ⚠️
..._start_planner_module/src/start_planner_module.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6366      +/-   ##
==========================================
- Coverage   14.63%   14.63%   -0.01%     
==========================================
  Files        1900     1900              
  Lines      130645   130689      +44     
  Branches    38381    38733     +352     
==========================================
+ Hits        19123    19124       +1     
- Misses      90064    90107      +43     
  Partials    21458    21458              
Flag Coverage Δ *Carryforward flag
differential 16.52% <0.00%> (?)
total 14.64% <ø> (+<0.01%) ⬆️ Carriedforward from e64415b

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kyoichi-sugahara
Copy link
Contributor

@danielsanchezaran
Sorry for not merging this PR during your vacation 🙇
Can you confirme scenario result with latest scenaro just in case?
I guess some fail which is not related to this change is apperaerd.

Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

LGTM!Thanks!!!!!

@danielsanchezaran
Copy link
Contributor Author

@danielsanchezaran Sorry for not merging this PR during your vacation 🙇 Can you confirme scenario result with latest scenaro just in case? I guess some fail which is not related to this change is apperaerd.

Thank you for your reply, for reference here are the evaluation results we discussed about TIER IV INTERNAL LINK

@danielsanchezaran danielsanchezaran force-pushed the feat/add-check-for-path-within-lanes-for-bvspm branch 2 times, most recently from 127a293 to daf0db5 Compare February 27, 2024 23:06
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
danielsanchezaran and others added 9 commits February 28, 2024 18:07
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
@danielsanchezaran danielsanchezaran force-pushed the feat/add-check-for-path-within-lanes-for-bvspm branch from daf0db5 to 6208d4f Compare February 28, 2024 09:07
@danielsanchezaran danielsanchezaran enabled auto-merge (squash) February 28, 2024 09:14
@xmfcx
Copy link
Contributor

xmfcx commented Feb 28, 2024

I've canceled the build-and-test-differential / build-and-test-differential (humble) job and restarted build-and-test-differential / build-and-test-differential (humble, -cuda) (pull_request) because this is the only required job from now.

This PR halves the time required for build-and-test-differential checks:

If the test passes, it will be merged automatically, you don't need to do anything.

If you make any further changes to this PR, please rebase to main.

@danielsanchezaran danielsanchezaran merged commit 0042c20 into autowarefoundation:main Feb 28, 2024
19 of 23 checks passed
@danielsanchezaran danielsanchezaran deleted the feat/add-check-for-path-within-lanes-for-bvspm branch February 28, 2024 17:40
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request Feb 29, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request Feb 29, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
shmpwk pushed a commit to tier4/autoware.universe that referenced this pull request Feb 29, 2024
… lanes for bvspm (autowarefoundation#6366) (#1165)

* feat(lane_departure_checker,start_planner): add check for path within lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* style(pre-commit): autofix

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
… lanes for bvspm (#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request Apr 2, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
satoshi-ota pushed a commit to tier4/autoware.universe that referenced this pull request Apr 5, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Apr 8, 2024
… (cherry pick 8bdb542 and 0042c20) (#1220)

* feat(lane_departure_checker,start_planner): add check for path within lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* declare missing function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* fix(lane_departure_checker): empty lanelet polygon (autowarefoundation#6588)

* fix union sometimes returning empty polygon

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* fix union of polygons

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* fix back launcher

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* cherry pick 8bdb542 and 0042c20 from universe

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* remove unused methods

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
satoshi-ota pushed a commit to tier4/autoware.universe that referenced this pull request Jun 6, 2024
… lanes for bvspm (autowarefoundation#6366)

* WIP add new methods for lane departure checker

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lanelet polygon check for lane departure

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* use new checkPathWillLeaveLane function

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* working solution, fix union bug

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* Add check fo backwards path

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* delete departure check lanes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add lane departure check to geometric pullout

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* merge all union polygon

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* pre-commit changes

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* move the cheap/fast check first to possibly boost performance

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned) component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants