From cdeea66053724d200504a8a600e07289ebe1b97e Mon Sep 17 00:00:00 2001 From: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:35:06 +0900 Subject: [PATCH] fix(static_obstacle_avoidance): suppress unnecessary warning (#9142) (#1606) Signed-off-by: satoshi-ota --- planning/behavior_path_avoidance_module/src/scene.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/planning/behavior_path_avoidance_module/src/scene.cpp b/planning/behavior_path_avoidance_module/src/scene.cpp index 4af3dfdb68009..d8d1ee11e7d8f 100644 --- a/planning/behavior_path_avoidance_module/src/scene.cpp +++ b/planning/behavior_path_avoidance_module/src/scene.cpp @@ -1505,11 +1505,6 @@ void AvoidanceModule::insertReturnDeadLine( { const auto & data = avoid_data_; - if (data.new_shift_line.empty()) { - RCLCPP_WARN(getLogger(), "module doesn't have return shift line."); - return; - } - if (data.to_return_point > planner_data_->parameters.forward_path_length) { RCLCPP_DEBUG(getLogger(), "return dead line is far enough."); return; @@ -1522,6 +1517,11 @@ void AvoidanceModule::insertReturnDeadLine( return; } + if (data.new_shift_line.empty()) { + RCLCPP_WARN(getLogger(), "module doesn't have return shift line."); + return; + } + if (!helper_->isFeasible(data.new_shift_line)) { RCLCPP_WARN(getLogger(), "return shift line is not feasible. do nothing.."); return;