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(autoware_universe_utils): fix procedure to check if point is on edge #10260

Conversation

mitukou1109
Copy link
Contributor

Description

This PR fixes the procedure in covered_by() and within() functions to check if the given point is on any edge of the given polygon.

Related links

internal: https://star4.slack.com/archives/C0575HP7NJG/p1741675912882399

How was this PR tested?

colcon test --packages-select autoware_universe_utils --event-handlers console_cohesion+

Benchmark results with 100 randomly generated polygons with 9 vertices:

function Boost alternative
covered_by() 14.29ms 10.38ms
within() 47.20ms 1.63ms

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Mar 12, 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:

@kosuke55
Copy link
Contributor

thanks! after merging this PR, please sent same one to https://github.com/autowarefoundation/autoware_utils too

Copy link
Contributor

@takayuki5168 takayuki5168 left a comment

Choose a reason for hiding this comment

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

I didn't go deep into the implementation, but seems good to me.

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

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 65.51724% with 10 lines in your changes missing coverage. Please review.

Project coverage is 26.23%. Comparing base (97c1195) to head (20a4aef).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...oware_universe_utils/src/geometry/alt_geometry.cpp 65.51% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10260      +/-   ##
==========================================
- Coverage   26.24%   26.23%   -0.02%     
==========================================
  Files        1378     1378              
  Lines      107485   107540      +55     
  Branches    41443    41466      +23     
==========================================
+ Hits        28210    28212       +2     
- Misses      76453    76505      +52     
- Partials     2822     2823       +1     
Flag Coverage Δ *Carryforward flag
differential 70.87% <65.51%> (?)
total 26.23% <ø> (-0.01%) ⬇️ Carriedforward from 97c1195

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kosuke55 kosuke55 merged commit 2d879df into autowarefoundation:main Mar 12, 2025
54 of 58 checks passed
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) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) run:clang-tidy-pr-review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants