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 (autowarefoundation#3843) (#541)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
  • Loading branch information
kosuke55 and satoshi-ota committed May 29, 2023
1 parent 7c8b912 commit 0216e37
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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 @@ -213,6 +217,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 0216e37

Please sign in to comment.