From aa20bc62a7b4dc034c07af7a628e7523a1d8c9ad Mon Sep 17 00:00:00 2001 From: kobayu858 <129580202+kobayu858@users.noreply.github.com> Date: Thu, 29 Aug 2024 07:04:22 +0900 Subject: [PATCH] fix(autoware_behavior_path_start_planner_module): fix unusedFunction (#8659) fix:unusedFunction Signed-off-by: kobayu858 --- .../debug.hpp | 39 ------------------- .../util.hpp | 2 - .../src/debug.cpp | 30 -------------- .../src/start_planner_module.cpp | 1 - .../src/util.cpp | 12 +----- 5 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/debug.hpp delete mode 100644 planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/debug.cpp diff --git a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/debug.hpp b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/debug.hpp deleted file mode 100644 index 81358f37132f5..0000000000000 --- a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/debug.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2023 TIER IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AUTOWARE__BEHAVIOR_PATH_START_PLANNER_MODULE__DEBUG_HPP_ -#define AUTOWARE__BEHAVIOR_PATH_START_PLANNER_MODULE__DEBUG_HPP_ - -#include "autoware/behavior_path_start_planner_module/data_structs.hpp" - -#include -#include - -namespace autoware::behavior_path_planner -{ -using autoware::behavior_path_planner::StartPlannerDebugData; - -void updateSafetyCheckDebugData( - StartPlannerDebugData & data, const PredictedObjects & filtered_objects, - const TargetObjectsOnLane & target_objects_on_lane, - const std::vector & ego_predicted_path) -{ - data.filtered_objects = filtered_objects; - data.target_objects_on_lane = target_objects_on_lane; - data.ego_predicted_path = ego_predicted_path; -} - -} // namespace autoware::behavior_path_planner - -#endif // AUTOWARE__BEHAVIOR_PATH_START_PLANNER_MODULE__DEBUG_HPP_ diff --git a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/util.hpp b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/util.hpp index 09485e68852a3..60c5ccedd93f5 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/util.hpp +++ b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/include/autoware/behavior_path_start_planner_module/util.hpp @@ -49,8 +49,6 @@ PathWithLaneId getBackwardPath( const Pose & current_pose, const Pose & backed_pose, const double velocity); lanelet::ConstLanelets getPullOutLanes( const std::shared_ptr & planner_data, const double backward_length); -Pose getBackedPose( - const Pose & current_pose, const double & yaw_shoulder_lane, const double & back_distance); std::optional extractCollisionCheckSection( const PullOutPath & path, const double collision_check_distance_from_end); } // namespace autoware::behavior_path_planner::start_planner_utils diff --git a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/debug.cpp b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/debug.cpp deleted file mode 100644 index 1b25d8eac8846..0000000000000 --- a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/debug.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2023 TIER IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "autoware/behavior_path_start_planner_module/debug.hpp" - -namespace autoware::behavior_path_planner -{ - -void updateSafetyCheckDebugData( - StartPlannerDebugData & data, const PredictedObjects & filtered_objects, - const TargetObjectsOnLane & target_objects_on_lane, - const std::vector & ego_predicted_path) -{ - data.filtered_objects = filtered_objects; - data.target_objects_on_lane = target_objects_on_lane; - data.ego_predicted_path = ego_predicted_path; -} - -} // namespace autoware::behavior_path_planner diff --git a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp index 5c3c62b947af2..6c88bf006b5d3 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp @@ -18,7 +18,6 @@ #include "autoware/behavior_path_planner_common/utils/path_safety_checker/objects_filtering.hpp" #include "autoware/behavior_path_planner_common/utils/path_safety_checker/path_safety_checker_parameters.hpp" #include "autoware/behavior_path_planner_common/utils/path_utils.hpp" -#include "autoware/behavior_path_start_planner_module/debug.hpp" #include "autoware/behavior_path_start_planner_module/util.hpp" #include "autoware/motion_utils/trajectory/trajectory.hpp" diff --git a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/util.cpp b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/util.cpp index 0d4a4366b2714..219efb3084f1c 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/util.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/util.cpp @@ -72,17 +72,6 @@ PathWithLaneId getBackwardPath( return backward_path; } -Pose getBackedPose( - const Pose & current_pose, const double & yaw_shoulder_lane, const double & back_distance) -{ - Pose backed_pose; - backed_pose = current_pose; - backed_pose.position.x -= std::cos(yaw_shoulder_lane) * back_distance; - backed_pose.position.y -= std::sin(yaw_shoulder_lane) * back_distance; - - return backed_pose; -} - lanelet::ConstLanelets getPullOutLanes( const std::shared_ptr & planner_data, const double backward_length) { @@ -103,6 +92,7 @@ lanelet::ConstLanelets getPullOutLanes( /*forward_only_in_route*/ true); } +// cppcheck-suppress unusedFunction std::optional extractCollisionCheckSection( const PullOutPath & path, const double collision_check_distance_from_end) {