-
Notifications
You must be signed in to change notification settings - Fork 672
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
Conversation
673a576
to
7f1d7c3
Compare
Codecov ReportBase: 11.09% // Head: 11.08% // Decreases project coverage by
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
*This pull request uses carry forward flags. Click here to find out more.
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. |
56362c2
to
778f8c0
Compare
const auto closest_path_point_idx = | ||
motion_utils::findNearestIndex(path->points, planner_data->self_pose->pose.position); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems better to consider an overlapping path.
https://github.com/autowarefoundation/autoware.universe/blob/main/common/motion_utils/README.md#nearest-index-for-the-ego
There was a problem hiding this comment.
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.
Line 183 in 778f8c0
size_t findEgoIndex(const std::vector<T> & points) const |
const auto closest_path_point_idx = | ||
motion_utils::findNearestIndex(path->points, planner_data->self_pose->pose.position); |
There was a problem hiding this comment.
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.
Line 183 in 778f8c0
size_t findEgoIndex(const std::vector<T> & points) const |
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use "early return".
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 { |
There was a problem hiding this comment.
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.
Signed-off-by: beyza <bnk@leodrive.ai>
Signed-off-by: beyza <bnk@leodrive.ai>
Signed-off-by: beyza <bnk@leodrive.ai>
778f8c0
to
7922bc3
Compare
Currently @mehmetdogru and @beyzanurkaya are looking for alternative solutions for this issue. |
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. |
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.
After all checkboxes are checked, anyone who has write access can merge the PR.