diff --git a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_out/pull_out_module.hpp b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_out/pull_out_module.hpp index 9dbd977a1a95d..f7e3413f8f40c 100644 --- a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_out/pull_out_module.hpp +++ b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_out/pull_out_module.hpp @@ -71,6 +71,10 @@ class PullOutModule : public SceneModuleInterface bool isExecutionRequested() const override; bool isExecutionReady() const override; BT::NodeStatus updateState() override; + BT::NodeStatus getNodeStatusWhileWaitingApproval() const override + { + return BT::NodeStatus::SUCCESS; + } BehaviorModuleOutput plan() override; BehaviorModuleOutput planWaitingApproval() override; CandidateOutput planCandidate() const override; diff --git a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_over/pull_over_module.hpp b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_over/pull_over_module.hpp index 831d185cb3889..633d8af9bf1cd 100644 --- a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_over/pull_over_module.hpp +++ b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/pull_over/pull_over_module.hpp @@ -79,6 +79,10 @@ class PullOverModule : public SceneModuleInterface bool isExecutionRequested() const override; bool isExecutionReady() const override; BT::NodeStatus updateState() override; + BT::NodeStatus getNodeStatusWhileWaitingApproval() const override + { + return BT::NodeStatus::SUCCESS; + } void onTimer(); bool planWithEfficientPath(); bool planWithCloseGoal(); diff --git a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp index 91b851ace15b4..65be40b9fb603 100644 --- a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp +++ b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp @@ -103,6 +103,15 @@ class SceneModuleInterface */ virtual BT::NodeStatus updateState() = 0; + /** + * @brief If the module plan customized reference path while waiting approval, it should output + * SUCCESS. Otherwise, it should output FAILURE to check execution request of next module. + */ + virtual BT::NodeStatus getNodeStatusWhileWaitingApproval() const + { + return BT::NodeStatus::FAILURE; + } + /** * @brief Return true if the module has request for execution (not necessarily feasible) */ diff --git a/planning/behavior_path_planner/src/scene_module/scene_module_bt_node_interface.cpp b/planning/behavior_path_planner/src/scene_module/scene_module_bt_node_interface.cpp index 116663ad3d797..7f90ad46feff4 100644 --- a/planning/behavior_path_planner/src/scene_module/scene_module_bt_node_interface.cpp +++ b/planning/behavior_path_planner/src/scene_module/scene_module_bt_node_interface.cpp @@ -68,7 +68,7 @@ BT::NodeStatus SceneModuleBTNodeInterface::tick() // std::exit(EXIT_FAILURE); // TODO(Horibe) do appropriate handing } scene_module_->unlockRTCCommand(); - return BT::NodeStatus::FAILURE; + return scene_module_->getNodeStatusWhileWaitingApproval(); } while (rclcpp::ok()) {