-
Notifications
You must be signed in to change notification settings - Fork 682
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
refactor(behavior_path_planner): refactor planWithPriority in start_planner #5393
refactor(behavior_path_planner): refactor planWithPriority in start_planner #5393
Conversation
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
…n_with_priority Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
…n_with_priority Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
planning/behavior_path_planner/src/scene_module/start_planner/start_planner_module.cpp
Outdated
Show resolved
Hide resolved
for (const auto & pair : order_priority) { | ||
if (findPullOutPath( | ||
start_pose_candidates, pair.first, pair.second, refined_start_pose, goal_pose)) | ||
return; | ||
} |
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.
I prefer
for (const auto & pair : order_priority) { | |
if (findPullOutPath( | |
start_pose_candidates, pair.first, pair.second, refined_start_pose, goal_pose)) | |
return; | |
} | |
for (const auto & [index, planner] : order_priority) { | |
if (findPullOutPath( | |
start_pose_candidates, index, planner, refined_start_pose, goal_pose)) | |
return; | |
} |
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.
I didn't know this way and looks better!
changed in 791145e
…start_planner_module.cpp Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
const auto make_loop_order_planner_first = [&]() { | ||
PriorityOrder order_priority; | ||
PriorityOrder StartPlannerModule::determinePriorityOrder( | ||
const std::string & search_priority, size_t candidates_size) |
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.
const std::string & search_priority, size_t candidates_size) | |
const std::string & search_priority, const size_t candidates_size) |
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.
changed in 791145e
void StartPlannerModule::updateStatusWithNextPath( | ||
const behavior_path_planner::PullOutPath & path, const Pose & start_pose, | ||
const std::shared_ptr<PullOutPlannerBase> & planner) | ||
{ | ||
const std::lock_guard<std::mutex> lock(mutex_); | ||
status_.driving_forward = false; | ||
status_.found_pull_out_path = true; | ||
status_.pull_out_path = path; | ||
status_.pull_out_start_pose = start_pose; | ||
status_.planner_type = planner->getPlannerType(); | ||
} |
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:
giving planner_type instead of planner is 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.
I agree! thanks!
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.
changed in 791145e
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
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!!
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5393 +/- ##
==========================================
+ Coverage 14.78% 14.81% +0.02%
==========================================
Files 1661 1662 +1
Lines 115453 115438 -15
Branches 35644 35634 -10
==========================================
+ Hits 17068 17099 +31
+ Misses 79153 79093 -60
- Partials 19232 19246 +14
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Description
minor refactor the function
planWithPriotity
the PR should be merged.
🤖 Generated by Copilot at 6ccd8a2
This pull request enhances the start planner module, which plans a path for the ego vehicle to pull out of a parking spot. It improves the readability and maintainability of the code by introducing type aliases, renaming fields and methods, and refactoring the logic with new private methods. It also changes the compatibility check with other scene modules based on the vehicle's direction.
Tests performed
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.
After all checkboxes are checked, anyone who has write access can merge the PR.