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(mission_planner): consider overlap lanelets when enable_correct_goal_pose param is true #5533

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

beyzanurkaya
Copy link
Contributor

@beyzanurkaya beyzanurkaya commented Nov 9, 2023

Description

Fixes:

Tests performed

fix-overlap-goal-lanes.mp4

wip tier4 internal scenario test
evaluator_description: fix/consider-overlap-lanelet
2023/11/30 https://evaluation.tier4.jp/evaluation/reports/b059c77e-39d1-5d8c-8367-127e79619b10/?project_id=prd_jt

Not applicable.

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.

@beyzanurkaya beyzanurkaya self-assigned this Nov 9, 2023
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 9, 2023
@beyzanurkaya beyzanurkaya added type:bug Software flaws or errors. tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Nov 9, 2023
@mehmetdogru mehmetdogru self-requested a review November 9, 2023 12:18
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: Patch coverage is 12.90323% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 14.84%. Comparing base (8948859) to head (f805b36).
Report is 2 commits behind head on main.

❗ Current head f805b36 differs from pull request most recent head 047170a. Consider uploading reports for the commit 047170a to get more accurate results

Files Patch % Lines
...n_planner/src/lanelet2_plugins/default_planner.cpp 11.76% 4 Missing and 11 partials ⚠️
planning/route_handler/src/route_handler.cpp 14.28% 5 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5533      +/-   ##
==========================================
- Coverage   14.94%   14.84%   -0.10%     
==========================================
  Files        1943     1838     -105     
  Lines      133953   126717    -7236     
  Branches    39841    37982    -1859     
==========================================
- Hits        20020    18817    -1203     
+ Misses      91656    86652    -5004     
+ Partials    22277    21248    -1029     
Flag Coverage Δ *Carryforward flag
differential 14.85% <12.90%> (?)
total 14.85% <ø> (-0.10%) ⬇️ Carriedforward from 78eea31

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

@kosuke55
Copy link
Contributor

@beyzanurkaya is it ok to update this branch?

@beyzanurkaya
Copy link
Contributor Author

@kosuke55 sure, I rebased the branch onto main.

@mehmetdogru
Copy link
Contributor

@kosuke55 @beyzanurkaya

I am working on a PR also covers/solves this issue. So when I am done, I would like to review this PR as well before we possibly merge it.

@beyzanurkaya beyzanurkaya force-pushed the fix/consider-overlap-lanelet branch 2 times, most recently from 256369a to 0a0342c Compare November 28, 2023 10:17
@kosuke55
Copy link
Contributor

@beyzanurkaya @mehmetdogru
thanks!
I ran tier4 internal scenario test just now, I will review this after checking the result is no problem

@kosuke55
Copy link
Contributor

some scenarios related shoulder_lanes fails, but I did not check closely 🙏

@kosuke55 kosuke55 force-pushed the fix/consider-overlap-lanelet branch 2 times, most recently from 208003b to 4590451 Compare December 11, 2023 02:37
Comment on lines 358 to 373
for (const auto & gl_llt : goal_lanelets) {
if (
param_.check_footprint_inside_lanes &&
!check_goal_footprint(gl_llt, combined_prev_lanelet, polygon_footprint, next_lane_length) &&
!is_in_parking_lot(
lanelet::utils::query::getAllParkingLots(lanelet_map_ptr_),
lanelet::utils::conversion::toLaneletPoint(goal.position))) {
RCLCPP_WARN(logger, "Goal's footprint exceeds lane!");
is_goal_valid = false;
} else {
is_goal_valid = true;
}

if (is_in_lane(closest_lanelet, goal_lanelet_pt)) {
const auto lane_yaw = lanelet::utils::getLaneletAngle(closest_lanelet, goal.position);
const auto goal_yaw = tf2::getYaw(goal.orientation);
const auto angle_diff = tier4_autoware_utils::normalizeRadian(lane_yaw - goal_yaw);
if (is_in_lane(gl_llt, goal_lanelet_pt)) {
const auto lane_yaw = lanelet::utils::getLaneletAngle(gl_llt, goal.position);
const auto goal_yaw = tf2::getYaw(goal.orientation);
const auto angle_diff = tier4_autoware_utils::normalizeRadian(lane_yaw - goal_yaw);

const double th_angle = tier4_autoware_utils::deg2rad(param_.goal_angle_threshold_deg);
if (std::abs(angle_diff) < th_angle) {
return true;
const double th_angle = tier4_autoware_utils::deg2rad(param_.goal_angle_threshold_deg);
if (std::abs(angle_diff) < th_angle) {
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If goal's footprint exceeds lane but the process below may return true, is it ok?
It is like the footprint check is ignored.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is ok for us because we don't have any motivation to check footprint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kosuke55 I'm asking just to be sure, is your suggestion to completely remove the footprint check instead of an edit that will eliminate the logical issue here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kosuke55 friendly ping

Copy link
Contributor

@kosuke55 kosuke55 Feb 28, 2024

Choose a reason for hiding this comment

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

@beyzanurkaya
Sorry for the delay.

I am not sure if we should remove the footprint check, but the results of it sometimes appear to be unused.
This PR appears to return true even if is_goal_valid is false if one point of goal_lanelet_pt is in the goal lane and the angle is threshold only.
In what scene would you use the result of the footprint check?
(i.e., in what scene return is_goal_valid;)

Copy link
Contributor

@kosuke55 kosuke55 Feb 28, 2024

Choose a reason for hiding this comment

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

Would the conditional branch look like this?

○: true
× : false

image

If goal's footprint exceeds lane but the process below may return true, is it ok?
It is like the footprint check is ignored.

I mentioned about 2,3 pattern.

In what scene would you use the result of the footprint check?
(i.e., in what scene return is_goal_valid;)

I think this scnene is 3 or 5.
5 will ignore the angle check.

@kosuke55 kosuke55 reopened this Dec 12, 2023
Copy link

stale bot commented Feb 10, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added status:stale Inactive or outdated issues. (auto-assigned) and removed status:stale Inactive or outdated issues. (auto-assigned) labels Feb 10, 2024
@xmfcx
Copy link
Contributor

xmfcx commented Mar 5, 2024

@beyzanurkaya could you resolve the conflicts and update this PR?

Do you have any blockers or questions on this PR?

@xmfcx
Copy link
Contributor

xmfcx commented Mar 5, 2024

I would suggest to first squash, then rebase to make it easier to resolve the conflicts. You can contact me if you need help.

@beyzanurkaya beyzanurkaya force-pushed the fix/consider-overlap-lanelet branch 2 times, most recently from f51def1 to 84a591e Compare April 2, 2024 10:57
Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya marked this pull request as draft May 7, 2024 09:04
Copy link

stale bot commented Jul 6, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jul 6, 2024
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) status:stale Inactive or outdated issues. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:bug Software flaws or errors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants