autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
964 stars 630 forks source link

fix(autonomous_emergency_braking): aeb strange mpc polygon #7740

Closed danielsanchezaran closed 3 months ago

danielsanchezaran commented 3 months ago

Description

Due to the use of resize() the path vector generates a vector full of path points with position x:0 y:0 z:0 . This causes the AEB module to generate a wrong polygon path (because the last path poses are located at the base link).

This PR fixes the issue by doing reserve() instead, which seems like the original intention of the original commit.

Related links

Parent Issue:

How was this PR tested?

Before: cap- 2024-06-28-13-52-30 The polygon is disjointed and an NPC is wrongly detected as an obstacle.

After: cap- 2024-06-28-13-50-29 The polygons are correct and no collision is detected!

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

github-actions[bot] commented 3 months ago

Thank you for contributing to the Autoware project!

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

Please ensure:

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 0.00%. Comparing base (3d849e9) to head (5fdb157). Report is 535 commits behind head on main.

Files Patch % Lines
...autoware_autonomous_emergency_braking/src/node.cpp 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7740 +/- ## ========================================== - Coverage 15.09% 0.00% -15.10% ========================================== Files 1967 118 -1849 Lines 135941 12777 -123164 Branches 42122 1379 -40743 ========================================== - Hits 20520 0 -20520 + Misses 92700 12777 -79923 + Partials 22721 0 -22721 ``` | [Flag](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/7740/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | Coverage Δ | | |---|---|---| | [differential](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/7740/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `0.00% <0.00%> (?)` | | | [total](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/7740/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `?` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.