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(drivable_area_expansion): fix invalid access #6566

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Mar 7, 2024

Description

Related ticket: https://tier4.atlassian.net/browse/RT1-5459

Add guard to prevent std::out_of_range in following loop.

image

  // Insert middle points
  for (size_t i = start_idx + 1; i <= goal_idx; ++i) {
    const auto & next_point = tmp_bound.at(i);
    const double dist = tier4_autoware_utils::calcDistance2d(processed_bound.back(), next_point);
    if (dist > overlap_threshold) {
      processed_bound.push_back(next_point);
    }
  }

Tests performed

Psim

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.

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: satoshi-ota <satoshi.ota928@gmail.com>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 7, 2024
@satoshi-ota satoshi-ota marked this pull request as ready for review March 7, 2024 10:04
@shmpwk shmpwk added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 7, 2024
@shmpwk shmpwk enabled auto-merge (squash) March 7, 2024 10:07
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

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

Project coverage is 14.73%. Comparing base (48d20f1) to head (068c531).
Report is 12 commits behind head on main.

Files Patch % Lines
...s/drivable_area_expansion/static_drivable_area.cpp 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6566      +/-   ##
==========================================
- Coverage   14.78%   14.73%   -0.06%     
==========================================
  Files        1917     1917              
  Lines      132038   133724    +1686     
  Branches    39228    40039     +811     
==========================================
+ Hits        19523    19705     +182     
- Misses      90725    92023    +1298     
- Partials    21790    21996     +206     
Flag Coverage Δ *Carryforward flag
differential 10.75% <0.00%> (?)
total 14.78% <ø> (ø) Carriedforward from 48d20f1

*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.

@shmpwk shmpwk merged commit cc00ed5 into autowarefoundation:main Mar 7, 2024
40 of 43 checks passed
@satoshi-ota satoshi-ota deleted the fix/invalid-drivable-bound-access branch March 8, 2024 01:25
satoshi-ota added a commit to tier4/autoware_universe that referenced this pull request Mar 8, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
satoshi-ota added a commit to tier4/autoware_universe that referenced this pull request Mar 8, 2024
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
satoshi-ota added a commit to tier4/autoware_universe that referenced this pull request Mar 19, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
kaigohirao pushed a commit to kaigohirao/autoware.universe that referenced this pull request Mar 22, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: kaigohirao <kaigo.hirao@proxima-ai-tech.com>
satoshi-ota added a commit to tier4/autoware_universe that referenced this pull request Mar 28, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
satoshi-ota added a commit to tier4/autoware_universe that referenced this pull request Jun 6, 2024
…6566)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
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) 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.

3 participants