From 15a2e254c6376f10cba90d78839803007179fb11 Mon Sep 17 00:00:00 2001 From: Muhammad Zulfaqar Azmi Date: Thu, 30 May 2024 21:06:49 +0900 Subject: [PATCH 1/3] fix(lane_change): transit failure if previous module path empty Signed-off-by: Muhammad Zulfaqar Azmi --- planning/behavior_path_lane_change_module/src/interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/planning/behavior_path_lane_change_module/src/interface.cpp b/planning/behavior_path_lane_change_module/src/interface.cpp index 2567787a3f2e4..93415977b212f 100644 --- a/planning/behavior_path_lane_change_module/src/interface.cpp +++ b/planning/behavior_path_lane_change_module/src/interface.cpp @@ -225,6 +225,10 @@ bool LaneChangeInterface::canTransitFailureState() updateDebugMarker(); log_debug_throttled(__func__); + if(getPreviousModuleOutput().path.points.empty()){ + return true; + } + if (module_type_->isAbortState() && !module_type_->hasFinishedAbort()) { log_debug_throttled("Abort process has on going."); return false; From 36a17f488367972decbb4eb26d2caf28d8aa1cf1 Mon Sep 17 00:00:00 2001 From: Zulfaqar Azmi Date: Fri, 31 May 2024 14:19:27 +0900 Subject: [PATCH 2/3] precommit fix Signed-off-by: Zulfaqar Azmi --- planning/behavior_path_lane_change_module/src/interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/behavior_path_lane_change_module/src/interface.cpp b/planning/behavior_path_lane_change_module/src/interface.cpp index 93415977b212f..04e27a0bf15a4 100644 --- a/planning/behavior_path_lane_change_module/src/interface.cpp +++ b/planning/behavior_path_lane_change_module/src/interface.cpp @@ -225,7 +225,7 @@ bool LaneChangeInterface::canTransitFailureState() updateDebugMarker(); log_debug_throttled(__func__); - if(getPreviousModuleOutput().path.points.empty()){ + if (getPreviousModuleOutput().path.points.empty()) { return true; } From 6458500bf63a2f6f19445d299358cd4fce01b744 Mon Sep 17 00:00:00 2001 From: Zulfaqar Azmi Date: Fri, 31 May 2024 14:21:30 +0900 Subject: [PATCH 3/3] Add WARN Signed-off-by: Zulfaqar Azmi --- planning/behavior_path_lane_change_module/src/interface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planning/behavior_path_lane_change_module/src/interface.cpp b/planning/behavior_path_lane_change_module/src/interface.cpp index 04e27a0bf15a4..a75c1bb22db41 100644 --- a/planning/behavior_path_lane_change_module/src/interface.cpp +++ b/planning/behavior_path_lane_change_module/src/interface.cpp @@ -226,6 +226,8 @@ bool LaneChangeInterface::canTransitFailureState() log_debug_throttled(__func__); if (getPreviousModuleOutput().path.points.empty()) { + RCLCPP_WARN( + getLogger(), "Previous output path is empty. Some module might accidentally reset it."); return true; }