-
Notifications
You must be signed in to change notification settings - Fork 669
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(avoidance): check if the avoidance path is in drivable area #5032
feat(avoidance): check if the avoidance path is in drivable area #5032
Conversation
97343ae
to
b60fe82
Compare
@@ -235,6 +235,9 @@ struct AvoidanceParameters | |||
// Even if the obstacle is very large, it will not avoid more than this length for left direction | |||
double max_left_shift_length{0.0}; | |||
|
|||
// Validate vehicle departure from driving lane. | |||
double max_departure_from_lane{0.0}; |
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.
[NITS] by sugaharaGPT
max_deviation_from_lane?
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.
Thanks for your idea. Fixed.
@@ -2350,6 +2376,30 @@ bool AvoidanceModule::isValidShiftLine( | |||
} | |||
} | |||
|
|||
// check if the vehicle is in road. |
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.
// check if the vehicle is in road. | |
// check if the vehicle is in road. (yaw angle is not considered) |
const auto THRESHOLD = minimum_distance + std::abs(shift_length); | ||
|
||
if (boost::geometry::distance(basic_point, lanelet::utils::to2D(bound)) < THRESHOLD) { | ||
RCLCPP_DEBUG_THROTTLE(getLogger(), *clock_, 1000, "road shoulder distance is not enough."); |
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 this debug info is outputted even if road shoulder distance is big enough?
In my understanding, this condition is met when road shoulder distance is not enough or max_departure_from_lane
is big?
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.
update comment!
following avoidance path that is generated from latest new shift line may cause deviation from drivable area.
bool safe{false}; | ||
|
||
bool valid{false}; |
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.
what does valid
means? or invalid
means?
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.
valid
includes some criterias:
- deviation from current ego position
- deviation from current lane
- path curverture (doesn't exist for now)
- ...
Since I will add some validation functions, I used general name.
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.
LGTM!
b60fe82
to
37573a1
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5032 +/- ##
==========================================
+ Coverage 14.83% 14.87% +0.03%
==========================================
Files 1649 1649
Lines 114261 114325 +64
Branches 35368 35405 +37
==========================================
+ Hits 16956 17001 +45
+ Misses 78167 78157 -10
- Partials 19138 19167 +29
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
add619c
to
6e0a072
Compare
Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: satoshi-ota <[email protected]>
28269c4
to
1850a4e
Compare
Description
🤖 Generated by Copilot at 3d133af
This pull request refactors and improves the avoidance module of the behavior path planner. It removes unused or redundant code, adds new variables and parameters to store and control the drivable area and the lane departure, and enhances the generation and validation of shift lines for obstacle avoidance. These changes aim to increase the safety and efficiency of the avoidance behavior.
This PR related to autowarefoundation/autoware_launch#584.
Tests performed
Effects on system behavior
Nothing.
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.