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

refactor(goal_planner): refactoring plan flow and add post process #5554

Merged
merged 6 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,27 +287,47 @@
}
}

CandidateOutput planCandidate() const override;
BehaviorModuleOutput plan() override;
BehaviorModuleOutput planWaitingApproval() override;
bool isExecutionRequested() const override;
bool isExecutionReady() const override;
void processOnExit() override;
void updateData() override;
void postProcess() override;
void setParameters(const std::shared_ptr<GoalPlannerParameters> & parameters);
void acceptVisitor(
[[maybe_unused]] const std::shared_ptr<SceneModuleVisitor> & visitor) const override
{
}
CandidateOutput planCandidate() const override { return CandidateOutput{}; }

Check warning on line 302 in planning/behavior_path_planner/include/behavior_path_planner/scene_module/goal_planner/goal_planner_module.hpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/include/behavior_path_planner/scene_module/goal_planner/goal_planner_module.hpp#L302

Added line #L302 was not covered by tests

private:
/* 
* state transitions and plan function used in each state
*
* +--------------------------+
* | RUNNING |
* | planPullOverAsCandidate()|
* +------------+-------------+
* | hasDecidedPath()
* 2 v
* +--------------------------+
* | WAITING_APPROVAL |
* | planPullOverAsCandidate()|
* +------------+-------------+
* | isActivated()
* 3 v
* +--------------------------+
* | RUNNING |
* | planPullOverAsOutput() |
* +--------------------------+
*/

// The start_planner activates when it receives a new route,
// so there is no need to terminate the goal planner.
// If terminating it, it may switch to lane following and could generate an inappropriate path.
bool canTransitSuccessState() override { return false; }

bool canTransitFailureState() override { return false; }

bool canTransitIdleToRunningState() override { return true; }

mutable StartGoalPlannerData goal_planner_data_;
Expand Down Expand Up @@ -411,8 +431,9 @@
void returnToLaneParking();

// plan pull over path
BehaviorModuleOutput planWithGoalModification();
BehaviorModuleOutput planWaitingApprovalWithGoalModification();
BehaviorModuleOutput planPullOver();
BehaviorModuleOutput planPullOverAsOutput();
BehaviorModuleOutput planPullOverAsCandidate();
void selectSafePullOverPath();
std::vector<PullOverPath> sortPullOverPathCandidatesByGoalPriority(
const std::vector<PullOverPath> & pull_over_path_candidates,
Expand Down
Loading
Loading