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(static_obstacle_avoidance): fix issues in target object filtering logic #7830

Merged
merged 4 commits into from
Jul 4, 2024

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Jul 4, 2024

Description

improve logic to judge if the vehicle is in intersection e27f497

Originally, this module checks whether the object polygon is perfectly in intersection polygon. But somtimes it caused wrong judgement due to the perception performance or noise. In this PR, I changed the logic to use object position point instead of its polygon for boost::geometry::within function.

BEFORE

image

AFTER

image


support edge case where the current lane is terminated 5da4c47

This moule checks whether the object is on ego lane by using route_handler->getNextLaneletWithinRoute. But the lane where the bus is on is NOT included in route lanelet in following fig.

Then, I added following process to handle this situation.

  if (route_handler->getNextLaneletWithinRoute(object.overhang_lanelet, &next_lanelet)) {
  ...
  } else {
    for (const auto & lane : route_handler->getNextLanelets(object.overhang_lanelet)) {
      if (boost::geometry::within(
            lanelet::utils::to2D(lanelet::utils::conversion::toLaneletPoint(object.getPosition()))
              .basicPoint(),
            lane.polygon2d().basicPolygon())) {
        return true;
      }
    }
  }

BEFORE

image

AFTER

image


fix parked vehicle judgement b6ca523

Previously, this module couldn't filter parked vehicle properly because it didn't use most right/left lane to calculate shiftable ratio when there were opposite lanes.

BEFORE

In this case, the bus is judged as parked vehicle even though it's on middle lane.

image

AFTER

After this PR, the bus is judged non-parked vehicle.

image

Related links

Parent Issue:

How was this PR tested?

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 Jul 4, 2024
Copy link

github-actions bot commented Jul 4, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 4, 2024
@satoshi-ota satoshi-ota enabled auto-merge (squash) July 4, 2024 08:00
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

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

Project coverage is 28.67%. Comparing base (7238701) to head (b6ca523).
Report is 13 commits behind head on main.

Files Patch % Lines
...ath_static_obstacle_avoidance_module/src/utils.cpp 0.00% 30 Missing ⚠️
...acle_avoidance_module/src/shift_line_generator.cpp 0.00% 5 Missing ⚠️
...ath_static_obstacle_avoidance_module/src/debug.cpp 0.00% 4 Missing ⚠️
..._static_obstacle_avoidance_module/data_structs.hpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7830      +/-   ##
==========================================
- Coverage   28.67%   28.67%   -0.01%     
==========================================
  Files        1587     1588       +1     
  Lines      116303   116319      +16     
  Branches    49662    49673      +11     
==========================================
+ Hits        33355    33359       +4     
- Misses      73904    73917      +13     
+ Partials     9044     9043       -1     
Flag Coverage Δ *Carryforward flag
differential 13.65% <0.00%> (?)
total 28.69% <ø> (+0.01%) ⬆️ Carriedforward from 7238701

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

@satoshi-ota satoshi-ota merged commit 99c7c57 into autowarefoundation:main Jul 4, 2024
54 of 55 checks passed
@satoshi-ota satoshi-ota deleted the fix/vehicle-filter branch July 4, 2024 08:07
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Jul 8, 2024
… logic (autowarefoundation#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Jul 9, 2024
… logic (autowarefoundation#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
palas21 pushed a commit to palas21/autoware.universe that referenced this pull request Jul 12, 2024
… logic (autowarefoundation#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: palas21 <[email protected]>
tby-udel pushed a commit to tby-udel/autoware.universe that referenced this pull request Jul 14, 2024
… logic (autowarefoundation#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
… logic (#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
Ariiees pushed a commit to Ariiees/autoware.universe that referenced this pull request Jul 22, 2024
… logic (autowarefoundation#7830)

* fix(static_obstacle_avoidance): check if object is inside/outside by its position point instead of its polygon

Signed-off-by: satoshi-ota <[email protected]>

* refactor(static_obstacle_avoidance): add getter functions

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): check next lane without route if the current lane is not preferred

Signed-off-by: satoshi-ota <[email protected]>

* fix(static_obstacle_avoidance): fix parked vehicle check

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
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.

2 participants