diff --git a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp index 194e5ecdaf86c..6b11d490e8c23 100644 --- a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp +++ b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -139,15 +138,9 @@ class AvoidanceModule : public SceneModuleInterface void removeCandidateRTCStatus() { if (rtc_interface_ptr_map_.at("left")->isRegistered(candidate_uuid_)) { - rtc_interface_ptr_map_.at("left")->updateCooperateStatus( - candidate_uuid_, true, State::FAILED, std::numeric_limits::lowest(), - std::numeric_limits::lowest(), clock_->now()); - } - - if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { - rtc_interface_ptr_map_.at("right")->updateCooperateStatus( - candidate_uuid_, true, State::FAILED, std::numeric_limits::lowest(), - std::numeric_limits::lowest(), clock_->now()); + rtc_interface_ptr_map_.at("left")->removeCooperateStatus(candidate_uuid_); + } else if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { + rtc_interface_ptr_map_.at("right")->removeCooperateStatus(candidate_uuid_); } } @@ -369,21 +362,10 @@ class AvoidanceModule : public SceneModuleInterface unlockNewModuleLaunch(); - for (const auto & left_shift : left_shift_array_) { - rtc_interface_ptr_map_.at("left")->updateCooperateStatus( - left_shift.uuid, true, State::FAILED, std::numeric_limits::lowest(), - std::numeric_limits::lowest(), clock_->now()); - } - - for (const auto & right_shift : right_shift_array_) { - rtc_interface_ptr_map_.at("right")->updateCooperateStatus( - right_shift.uuid, true, State::FAILED, std::numeric_limits::lowest(), - std::numeric_limits::lowest(), clock_->now()); - } - if (!path_shifter_.getShiftLines().empty()) { left_shift_array_.clear(); right_shift_array_.clear(); + removeRTCStatus(); } generator_.reset(); diff --git a/planning/behavior_path_avoidance_module/src/scene.cpp b/planning/behavior_path_avoidance_module/src/scene.cpp index 15b3e970df4b1..d0afe25949bcb 100644 --- a/planning/behavior_path_avoidance_module/src/scene.cpp +++ b/planning/behavior_path_avoidance_module/src/scene.cpp @@ -1283,6 +1283,7 @@ void AvoidanceModule::updateData() void AvoidanceModule::processOnEntry() { initVariables(); + removeRTCStatus(); } void AvoidanceModule::processOnExit()