-
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(avoidance): check next & previous road shoulder linestring #3691
feat(avoidance): check next & previous road shoulder linestring #3691
Conversation
const auto merge_two_line = [](const auto & a, const auto & b) { | ||
lanelet::Points3d new_points; | ||
for (const auto & p : a) { | ||
new_points.emplace_back(lanelet::utils::getId(), p.basicPoint()); |
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.
memo:
lane id is not needed to calculate distance. so just push the dummy initial id.
const auto lines = | ||
rh->getFurthestLinestring(previous_lanelet.front(), get_right, get_left, get_opposite); | ||
if (isOnRight(o)) { | ||
target_line = merge_two_line(target_line, lines.back()); | ||
} else { | ||
target_line = merge_two_line(target_line, lines.front()); | ||
} |
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.
memo:
getFurthestLinestring() push linestring in the order of right -> left. so the target object is on the right side,need to get left line which lines.back().
https://github.com/autowarefoundation/autoware.universe/blob/main/planning/route_handler/src/route_handler.cpp#L1166
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
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3691 +/- ##
==========================================
- Coverage 14.56% 14.55% -0.01%
==========================================
Files 1409 1409
Lines 99290 99313 +23
Branches 29347 29364 +17
==========================================
Hits 14458 14458
- Misses 69247 69270 +23
Partials 15585 15585
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
3938b22
to
e1a71aa
Compare
…warefoundation#3691) * feat(route_hander): move public Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * feat(avoidance): check road next & previous road shoulder Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
…warefoundation#3691) * feat(route_hander): move public Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * feat(avoidance): check road next & previous road shoulder Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
…warefoundation#3691) * feat(route_hander): move public Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * feat(avoidance): check road next & previous road shoulder Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Description
Currently, avoidance module checks the distance between the object and closest lanelet's most left (or right) linestring.
However, the
distance2d
function returns unexpected value for avoidance module in the following case.It is better to check not only closest lanelet's most left linestring but also next & previous linestring so that
distance2d
function return exact distance between the object and road shoulder.Tests performed
Effects on system behavior
Improve avoidance path generation.
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.