diff --git a/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/scene.cpp b/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/scene.cpp index 9b04847bd59b0..23c3d6a3ad443 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/scene.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/scene.cpp @@ -1634,11 +1634,6 @@ void StaticObstacleAvoidanceModule::insertReturnDeadLine( universe_utils::ScopedTimeTrack st(__func__, *time_keeper_); 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; @@ -1651,6 +1646,11 @@ void StaticObstacleAvoidanceModule::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;