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

feat(behavior_path_planner): add yaw_dev threshold angle #2126

Closed
wants to merge 4 commits into from

Conversation

beyzanurkaya
Copy link
Contributor

@beyzanurkaya beyzanurkaya commented Oct 20, 2022

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

Description

Before PR:

vokoscreen-2022-10-20_12-39-56.mp4

After PR:

vokoscreen-2022-10-21_12-27-20.mp4

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 changed the title add yaw_dev threshold angle feat(behavior_pat_planner): add yaw_dev threshold angle Oct 20, 2022
@beyzanurkaya beyzanurkaya changed the title feat(behavior_pat_planner): add yaw_dev threshold angle feat(behavior_path_planner): add yaw_dev threshold angle Oct 20, 2022
@beyzanurkaya beyzanurkaya force-pushed the 2125-generating-invalid-path-orientation branch from 673a576 to 7f1d7c3 Compare October 20, 2022 12:55
@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Base: 11.09% // Head: 11.08% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (7922bc3) compared to base (333044b).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2126      +/-   ##
==========================================
- Coverage   11.09%   11.08%   -0.01%     
==========================================
  Files        1202     1202              
  Lines       86170    86251      +81     
  Branches    20680    20735      +55     
==========================================
+ Hits         9558     9559       +1     
- Misses      66661    66734      +73     
- Partials     9951     9958       +7     
Flag Coverage Δ *Carryforward flag
differential 3.58% <0.00%> (?)
total 11.06% <0.00%> (ø) Carriedforward from 333044b

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

Impacted Files Coverage Δ
...or_path_planner/src/behavior_path_planner_node.cpp 0.34% <0.00%> (+0.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Comment on lines 593 to 594
const auto closest_path_point_idx =
motion_utils::findNearestIndex(path->points, planner_data->self_pose->pose.position);
Copy link
Contributor

@kosuke55 kosuke55 Oct 24, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. Please use this function.

Comment on lines 593 to 594
const auto closest_path_point_idx =
motion_utils::findNearestIndex(path->points, planner_data->self_pose->pose.position);
Copy link
Contributor

Choose a reason for hiding this comment

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

Right. Please use this function.

Comment on lines 598 to 623
if (std::abs(yaw_dev) > M_PI / 2.0) {
RCLCPP_WARN(
get_logger(), "Path orientation is invalid. Path yaw deviation: %f (deg)",
yaw_dev * 180 / M_PI);
if (!planner_data_->prev_output_path->points.empty()) {
path = planner_data_->prev_output_path;
} else {
return;
}
} else {
// update planner data
planner_data_->prev_output_path = path;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use "early return".

@takayuki5168 takayuki5168 marked this pull request as draft October 25, 2022 02:13
Comment on lines 598 to 620
if (std::abs(yaw_dev) > M_PI / 2.0) {
RCLCPP_WARN(
get_logger(), "Path orientation is invalid. Path yaw deviation: %f (deg)",
yaw_dev * 180 / M_PI);
if (!planner_data_->prev_output_path->points.empty()) {
path = planner_data_->prev_output_path;
} else {
return;
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to convert the PR to draft.

Using previously planned path resolves the issue, but ideally using previous path should be avoided since the current planning with the current dynamic situation is not applied to the planning result.

This issue is known one. During lane_following in behavior_path_planner, the nearest lanelet to ego is searched and the path will start from the lanelet. Therefore, if some functions like drivable area expansion moves the ego pose CoG to neighbour lanelets, the path will suddenly start from the neighbour lanelet.

Rather than hiding an issue with previous path, we should fix this known issue fundamentally.

@beyzanurkaya beyzanurkaya self-assigned this Nov 3, 2022
beyza and others added 4 commits November 3, 2022 13:55
Signed-off-by: beyza <bnk@leodrive.ai>
Signed-off-by: beyza <bnk@leodrive.ai>
Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya force-pushed the 2125-generating-invalid-path-orientation branch from 778f8c0 to 7922bc3 Compare November 3, 2022 11:15
@xmfcx
Copy link
Contributor

xmfcx commented Nov 15, 2022

Currently @mehmetdogru and @beyzanurkaya are looking for alternative solutions for this issue.

@mehmetdogru
Copy link
Contributor

Since the approach followed in this PR is not a proper one, I will be closing the PR. I will create another PR which fixes the related issue.

@mehmetdogru mehmetdogru deleted the 2125-generating-invalid-path-orientation branch December 22, 2022 06:29
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 7, 2023
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.

5 participants