Skip to content

Commit

Permalink
fix(start_planner): prevent approval when stop path (autowarefoundati…
Browse files Browse the repository at this point in the history
…on#4932)

Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 authored Sep 10, 2023
1 parent 1a30fc3 commit 477ce95
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ bool StartPlannerModule::isExecutionRequested() const

bool StartPlannerModule::isExecutionReady() const
{
if (!status_.is_safe_static_objects) {
return false;
}

if (status_.pull_out_path.partial_paths.empty()) {
return true;
}
Expand Down Expand Up @@ -185,6 +189,7 @@ BehaviorModuleOutput StartPlannerModule::plan()
getLogger(), *clock_, 5000, "Start plan for a backward goal is not supported now");
const auto output = generateStopOutput();
setDebugData(); // use status updated in generateStopOutput()
updateRTCStatus(0, 0);
return output;
}

Expand All @@ -202,6 +207,7 @@ BehaviorModuleOutput StartPlannerModule::plan()
getLogger(), *clock_, 5000, "Not found safe pull out path, publish stop path");
const auto output = generateStopOutput();
setDebugData(); // use status updated in generateStopOutput()
updateRTCStatus(0, 0);
return output;
}

Expand Down Expand Up @@ -298,6 +304,7 @@ BehaviorModuleOutput StartPlannerModule::planWaitingApproval()
clearWaitingApproval();
const auto output = generateStopOutput();
setDebugData(); // use status updated in generateStopOutput()
updateRTCStatus(0, 0);
return output;
}

Expand All @@ -308,6 +315,7 @@ BehaviorModuleOutput StartPlannerModule::planWaitingApproval()
clearWaitingApproval();
const auto output = generateStopOutput();
setDebugData(); // use status updated in generateStopOutput()
updateRTCStatus(0, 0);
return output;
}

Expand Down

0 comments on commit 477ce95

Please sign in to comment.