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(behavior_velocity_planner): expend the ego_lane_with_next_lane area #4177

Merged

Conversation

beyzanurkaya
Copy link
Contributor

@beyzanurkaya beyzanurkaya commented Jul 5, 2023

Description

fixes: #4153

ego_lane_with_next_lane only keeps 2 lanes and in some cases, the total length of these combined lanes may not be in the range of start_arc_length and end_arc_length calculated beforehand. now I add lanelets to ego_lane_with_next_lanes until the total length of added lanelets is between arc values.

Tests performed

vokoscreenNG-2023-07-05_19-19-09.mov

Effects on system behavior

Not applicable.

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jul 5, 2023
@beyzanurkaya beyzanurkaya self-assigned this Jul 5, 2023
@beyzanurkaya beyzanurkaya marked this pull request as ready for review July 5, 2023 16:26
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.90 ⚠️

Comparison is base (92b78db) 15.17% compared to head (cf1506d) 14.27%.

❗ Current head cf1506d differs from pull request most recent head 9435e6f. Consider uploading reports for the commit 9435e6f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4177      +/-   ##
==========================================
- Coverage   15.17%   14.27%   -0.90%     
==========================================
  Files        1496     1571      +75     
  Lines      102981   108795    +5814     
  Branches    31621    31705      +84     
==========================================
- Hits        15623    15527      -96     
- Misses      70365    76369    +6004     
+ Partials    16993    16899      -94     
Flag Coverage Δ *Carryforward flag
differential 7.56% <0.00%> (?)
total 14.30% <ø> (-0.87%) ⬇️ Carriedforward from 01bf2c6

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ity_intersection_module/src/scene_intersection.cpp 0.00% <0.00%> (ø)

... and 264 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@beyzanurkaya
Copy link
Contributor Author

@soblin friendly ping

}
const auto combined_lanelet =
lanelet::utils::combineLaneletsShape(ego_lane_with_next_lanes);
const auto combined_polygon = combined_lanelet.polygon3d();
Copy link
Contributor

Choose a reason for hiding this comment

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

@beyzanurkaya The size of the ego_polygon is critical for collision checking with NPCs, so can you add

const auto trimmed_ego_polygon = getPolygonFromArcLength(ego_lane_with_next_lanes, start_arc_length, end_arc_length);

? This should ensure that the trimmed polygon is not empty. The rest part looks good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soblin The approach I add didn't use trimmed_ego_polygon. After adding the line you marked;

const auto trimmed_ego_polygon = getPolygonFromArcLength(ego_lane_with_next_lanes, start_arc_length, end_arc_length);

I don't quite understand where you want to use it. Can you give me more details?

Copy link
Contributor

Choose a reason for hiding this comment

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

My suggestion is to resurrect trimmed_ego_polygon variable with this one which is calculated from ego_lane_with_next_lanes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soblin I made the changes you wanted and also I cleaned the code. i think everything is okay now.

Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya force-pushed the fix/intersection-module-dies branch from 2bf40cb to 778cd6e Compare July 19, 2023 14:43
Copy link
Contributor

@soblin soblin left a comment

Choose a reason for hiding this comment

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

LGTM from my side, thanks!

Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya force-pushed the fix/intersection-module-dies branch from eba516b to c206cf1 Compare July 20, 2023 08:14
@beyzanurkaya beyzanurkaya merged commit 969cb78 into autowarefoundation:main Jul 20, 2023
@beyzanurkaya beyzanurkaya deleted the fix/intersection-module-dies branch July 21, 2023 07:59
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Jul 24, 2023
…ea (autowarefoundation#4177)

* expend the ego_lane_with_next_lane area

Signed-off-by: beyza <bnk@leodrive.ai>

* style(pre-commit): autofix

* move lanelets_on_path const

Signed-off-by: beyza <bnk@leodrive.ai>

* style(pre-commit): autofix

---------

Signed-off-by: beyza <bnk@leodrive.ai>
Co-authored-by: beyza <bnk@leodrive.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
satoshi-ota pushed a commit to tier4/autoware.universe that referenced this pull request Aug 17, 2023
…ea (autowarefoundation#4177)

* expend the ego_lane_with_next_lane area

Signed-off-by: beyza <bnk@leodrive.ai>

* style(pre-commit): autofix

* move lanelets_on_path const

Signed-off-by: beyza <bnk@leodrive.ai>

* style(pre-commit): autofix

---------

Signed-off-by: beyza <bnk@leodrive.ai>
Co-authored-by: beyza <bnk@leodrive.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intersection module dies when object detected at some turns
3 participants