Skip to content

Commit

Permalink
fix(behavior_path_planner): return default value if no registered mod…
Browse files Browse the repository at this point in the history
…ule exists (#3843)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota authored May 26, 2023
1 parent 2af2daa commit 3950f81
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ class SceneModuleManagerInterface

bool isSimultaneousExecutableAsApprovedModule() const
{
if (registered_modules_.empty()) {
return enable_simultaneous_execution_as_approved_module_;
}

return std::all_of(
registered_modules_.begin(), registered_modules_.end(), [](const SceneModulePtr & module) {
return module->isSimultaneousExecutableAsApprovedModule();
Expand All @@ -214,6 +218,10 @@ class SceneModuleManagerInterface

bool isSimultaneousExecutableAsCandidateModule() const
{
if (registered_modules_.empty()) {
return enable_simultaneous_execution_as_candidate_module_;
}

return std::all_of(
registered_modules_.begin(), registered_modules_.end(), [](const SceneModulePtr & module) {
return module->isSimultaneousExecutableAsCandidateModule();
Expand Down

0 comments on commit 3950f81

Please sign in to comment.