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(path_optimizer): fix possible zero division #10022

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soblin
Copy link
Contributor

@soblin soblin commented Jan 27, 2025

Description

Below code can cause zero division because the vector is zero.

const auto & curr_seg_point = bound.at(segment_idx);
const auto & next_seg_point = bound.at(segment_idx);

Related links

Parent Issue:

  • Link

How was this PR tested?

All fail cases are from simulator

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jan 27, 2025
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@soblin soblin added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.77%. Comparing base (7fd0259) to head (f99d547).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10022      +/-   ##
==========================================
- Coverage   29.77%   29.77%   -0.01%     
==========================================
  Files        1436     1438       +2     
  Lines      108319   108339      +20     
  Branches    42955    42955              
==========================================
+ Hits        32254    32256       +2     
- Misses      72932    72951      +19     
+ Partials     3133     3132       -1     
Flag Coverage Δ *Carryforward flag
differential 23.30% <100.00%> (?)
total 29.77% <ø> (+<0.01%) ⬆️ Carriedforward from 7fd0259

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

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
Status: To Triage
Development

Successfully merging this pull request may close these issues.

3 participants