From 12af9c286e84731d5d8f742fb16935f7cea5bd1f Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Tue, 28 May 2024 14:30:42 +0200 Subject: [PATCH 1/2] refactor(autoware_velocity_run_out_module): prefix package with autoware_ and move code to the autoware namespace Signed-off-by: Esteve Fernandez --- .github/CODEOWNERS | 2 +- .../behavior_planning/behavior_planning.launch.xml | 2 +- planning/.pages | 2 +- planning/autoware_behavior_velocity_planner/README.md | 2 +- planning/autoware_behavior_velocity_planner/package.xml | 2 +- .../test/src/test_node_interface.cpp | 4 ++-- .../CMakeLists.txt | 2 +- .../README.md | 0 .../config/run_out.param.yaml | 0 .../docs/calculate_expected_target_velocity.svg | 0 .../docs/collision_detection_for_shape.svg | 0 .../docs/collision_points.svg | 0 .../docs/create_dynamic_obstacle.svg | 0 .../docs/create_polygon_on_path_point.svg | 0 .../docs/ego_cut_line.svg | 0 .../docs/exclude_obstacles_by_partition.svg | 0 .../docs/insert_velocity.svg | 0 .../docs/insert_velocity_to_approach.svg | 0 .../docs/run_out_overview.svg | 0 .../package.xml | 4 ++-- .../plugins.xml | 3 +++ .../src/debug.cpp | 4 ++-- .../src/debug.hpp | 5 +++-- .../src/dynamic_obstacle.cpp | 6 ++++-- .../src/dynamic_obstacle.hpp | 6 ++++-- .../src/manager.cpp | 9 +++++---- .../src/manager.hpp | 7 +++++-- .../src/path_utils.cpp | 4 ++-- .../src/path_utils.hpp | 4 ++-- .../src/scene.cpp | 8 ++++++-- .../src/scene.hpp | 9 +++++++-- .../src/state_machine.cpp | 4 ++-- .../src/state_machine.hpp | 4 ++-- .../src/utils.cpp | 7 +++++-- .../src/utils.hpp | 6 ++++-- planning/behavior_velocity_run_out_module/plugins.xml | 3 --- 36 files changed, 66 insertions(+), 43 deletions(-) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/CMakeLists.txt (89%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/README.md (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/config/run_out.param.yaml (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/calculate_expected_target_velocity.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/collision_detection_for_shape.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/collision_points.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/create_dynamic_obstacle.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/create_polygon_on_path_point.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/ego_cut_line.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/exclude_obstacles_by_partition.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/insert_velocity.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/insert_velocity_to_approach.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/docs/run_out_overview.svg (100%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/package.xml (92%) create mode 100644 planning/autoware_behavior_velocity_run_out_module/plugins.xml rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/debug.cpp (99%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/debug.hpp (97%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/dynamic_obstacle.cpp (99%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/dynamic_obstacle.hpp (96%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/manager.cpp (97%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/manager.hpp (86%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/path_utils.cpp (90%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/path_utils.hpp (92%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/scene.cpp (99%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/scene.hpp (95%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/state_machine.cpp (96%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/state_machine.hpp (92%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/utils.cpp (98%) rename planning/{behavior_velocity_run_out_module => autoware_behavior_velocity_run_out_module}/src/utils.hpp (97%) delete mode 100644 planning/behavior_velocity_run_out_module/plugins.xml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 451ade3771f61..da54ae2e768d3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -171,7 +171,7 @@ planning/behavior_velocity_no_stopping_area_module/** kosuke.takeuchi@tier4.jp s planning/behavior_velocity_occlusion_spot_module/** shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp planning/behavior_velocity_out_of_lane_module/** maxime.clement@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp planning/behavior_velocity_planner_common/** fumiya.watanabe@tier4.jp isamu.takagi@tier4.jp mamoru.sobue@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp -planning/behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp makoto.kurihara@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp +planning/autoware_behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp makoto.kurihara@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp planning/behavior_velocity_speed_bump_module/** mdogru@leodrive.ai shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp planning/behavior_velocity_stop_line_module/** fumiya.watanabe@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp zhe.shen@tier4.jp planning/behavior_velocity_traffic_light_module/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp diff --git a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml index 154a3019f1c17..b093bc6295e65 100644 --- a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml +++ b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml @@ -156,7 +156,7 @@ /> ament_cmake_ros ament_lint_auto autoware_behavior_velocity_virtual_traffic_light_module + autoware_behavior_velocity_run_out_module autoware_lint_common behavior_velocity_blind_spot_module behavior_velocity_crosswalk_module @@ -75,7 +76,6 @@ behavior_velocity_no_stopping_area_module behavior_velocity_occlusion_spot_module behavior_velocity_out_of_lane_module - behavior_velocity_run_out_module behavior_velocity_speed_bump_module behavior_velocity_stop_line_module behavior_velocity_traffic_light_module diff --git a/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp b/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp index 7cbe0f65a1fc2..e741d054afbaf 100644 --- a/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp +++ b/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp @@ -79,7 +79,7 @@ std::shared_ptr generateNode() module_names.emplace_back("behavior_velocity_planner::NoStoppingAreaModulePlugin"); module_names.emplace_back("behavior_velocity_planner::StopLineModulePlugin"); module_names.emplace_back("behavior_velocity_planner::OcclusionSpotModulePlugin"); - module_names.emplace_back("behavior_velocity_planner::RunOutModulePlugin"); + module_names.emplace_back("autoware::behavior_velocity_planner::RunOutModulePlugin"); module_names.emplace_back("behavior_velocity_planner::SpeedBumpModulePlugin"); module_names.emplace_back("behavior_velocity_planner::OutOfLaneModulePlugin"); module_names.emplace_back("behavior_velocity_planner::NoDrivableLaneModulePlugin"); @@ -103,7 +103,7 @@ std::shared_ptr generateNode() get_behavior_velocity_module_config_no_prefix("intersection"), get_behavior_velocity_module_config_no_prefix("no_stopping_area"), get_behavior_velocity_module_config_no_prefix("occlusion_spot"), - get_behavior_velocity_module_config_no_prefix("run_out"), + get_behavior_velocity_module_config("run_out"), get_behavior_velocity_module_config_no_prefix("speed_bump"), get_behavior_velocity_module_config_no_prefix("stop_line"), get_behavior_velocity_module_config_no_prefix("traffic_light"), diff --git a/planning/behavior_velocity_run_out_module/CMakeLists.txt b/planning/autoware_behavior_velocity_run_out_module/CMakeLists.txt similarity index 89% rename from planning/behavior_velocity_run_out_module/CMakeLists.txt rename to planning/autoware_behavior_velocity_run_out_module/CMakeLists.txt index 3ee589ba69740..bcbe4ea12a643 100644 --- a/planning/behavior_velocity_run_out_module/CMakeLists.txt +++ b/planning/autoware_behavior_velocity_run_out_module/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(behavior_velocity_run_out_module) +project(autoware_behavior_velocity_run_out_module) find_package(autoware_cmake REQUIRED) autoware_package() diff --git a/planning/behavior_velocity_run_out_module/README.md b/planning/autoware_behavior_velocity_run_out_module/README.md similarity index 100% rename from planning/behavior_velocity_run_out_module/README.md rename to planning/autoware_behavior_velocity_run_out_module/README.md diff --git a/planning/behavior_velocity_run_out_module/config/run_out.param.yaml b/planning/autoware_behavior_velocity_run_out_module/config/run_out.param.yaml similarity index 100% rename from planning/behavior_velocity_run_out_module/config/run_out.param.yaml rename to planning/autoware_behavior_velocity_run_out_module/config/run_out.param.yaml diff --git a/planning/behavior_velocity_run_out_module/docs/calculate_expected_target_velocity.svg b/planning/autoware_behavior_velocity_run_out_module/docs/calculate_expected_target_velocity.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/calculate_expected_target_velocity.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/calculate_expected_target_velocity.svg diff --git a/planning/behavior_velocity_run_out_module/docs/collision_detection_for_shape.svg b/planning/autoware_behavior_velocity_run_out_module/docs/collision_detection_for_shape.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/collision_detection_for_shape.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/collision_detection_for_shape.svg diff --git a/planning/behavior_velocity_run_out_module/docs/collision_points.svg b/planning/autoware_behavior_velocity_run_out_module/docs/collision_points.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/collision_points.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/collision_points.svg diff --git a/planning/behavior_velocity_run_out_module/docs/create_dynamic_obstacle.svg b/planning/autoware_behavior_velocity_run_out_module/docs/create_dynamic_obstacle.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/create_dynamic_obstacle.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/create_dynamic_obstacle.svg diff --git a/planning/behavior_velocity_run_out_module/docs/create_polygon_on_path_point.svg b/planning/autoware_behavior_velocity_run_out_module/docs/create_polygon_on_path_point.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/create_polygon_on_path_point.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/create_polygon_on_path_point.svg diff --git a/planning/behavior_velocity_run_out_module/docs/ego_cut_line.svg b/planning/autoware_behavior_velocity_run_out_module/docs/ego_cut_line.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/ego_cut_line.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/ego_cut_line.svg diff --git a/planning/behavior_velocity_run_out_module/docs/exclude_obstacles_by_partition.svg b/planning/autoware_behavior_velocity_run_out_module/docs/exclude_obstacles_by_partition.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/exclude_obstacles_by_partition.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/exclude_obstacles_by_partition.svg diff --git a/planning/behavior_velocity_run_out_module/docs/insert_velocity.svg b/planning/autoware_behavior_velocity_run_out_module/docs/insert_velocity.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/insert_velocity.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/insert_velocity.svg diff --git a/planning/behavior_velocity_run_out_module/docs/insert_velocity_to_approach.svg b/planning/autoware_behavior_velocity_run_out_module/docs/insert_velocity_to_approach.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/insert_velocity_to_approach.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/insert_velocity_to_approach.svg diff --git a/planning/behavior_velocity_run_out_module/docs/run_out_overview.svg b/planning/autoware_behavior_velocity_run_out_module/docs/run_out_overview.svg similarity index 100% rename from planning/behavior_velocity_run_out_module/docs/run_out_overview.svg rename to planning/autoware_behavior_velocity_run_out_module/docs/run_out_overview.svg diff --git a/planning/behavior_velocity_run_out_module/package.xml b/planning/autoware_behavior_velocity_run_out_module/package.xml similarity index 92% rename from planning/behavior_velocity_run_out_module/package.xml rename to planning/autoware_behavior_velocity_run_out_module/package.xml index 40e55b3de1a17..cb2c2df58ffe2 100644 --- a/planning/behavior_velocity_run_out_module/package.xml +++ b/planning/autoware_behavior_velocity_run_out_module/package.xml @@ -1,9 +1,9 @@ - behavior_velocity_run_out_module + autoware_behavior_velocity_run_out_module 0.1.0 - The behavior_velocity_run_out_module package + The autoware_behavior_velocity_run_out_module package Tomohito Ando Makoto Kurihara diff --git a/planning/autoware_behavior_velocity_run_out_module/plugins.xml b/planning/autoware_behavior_velocity_run_out_module/plugins.xml new file mode 100644 index 0000000000000..1ddcaf8e620e1 --- /dev/null +++ b/planning/autoware_behavior_velocity_run_out_module/plugins.xml @@ -0,0 +1,3 @@ + + + diff --git a/planning/behavior_velocity_run_out_module/src/debug.cpp b/planning/autoware_behavior_velocity_run_out_module/src/debug.cpp similarity index 99% rename from planning/behavior_velocity_run_out_module/src/debug.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/debug.cpp index 3f6935365c1a4..129d5299385fd 100644 --- a/planning/behavior_velocity_run_out_module/src/debug.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/debug.cpp @@ -28,7 +28,7 @@ using tier4_autoware_utils::createMarkerOrientation; using tier4_autoware_utils::createMarkerScale; using tier4_autoware_utils::createPoint; -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace { @@ -368,4 +368,4 @@ motion_utils::VirtualWalls RunOutModule::createVirtualWalls() return debug_ptr_->createVirtualWalls(); } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_run_out_module/src/debug.hpp b/planning/autoware_behavior_velocity_run_out_module/src/debug.hpp similarity index 97% rename from planning/behavior_velocity_run_out_module/src/debug.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/debug.hpp index fbf682279e363..3c6d475950e7c 100644 --- a/planning/behavior_velocity_run_out_module/src/debug.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/debug.hpp @@ -24,8 +24,9 @@ #include #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::Polygon2d; using sensor_msgs::msg::PointCloud2; using tier4_debug_msgs::msg::Float32MultiArrayStamped; using tier4_debug_msgs::msg::Int32Stamped; @@ -149,6 +150,6 @@ class RunOutDebug double height_{0}; }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // DEBUG_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/dynamic_obstacle.cpp b/planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.cpp similarity index 99% rename from planning/behavior_velocity_run_out_module/src/dynamic_obstacle.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.cpp index edf1d8cf48b8e..d204c7ec6f2fc 100644 --- a/planning/behavior_velocity_run_out_module/src/dynamic_obstacle.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.cpp @@ -30,8 +30,10 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::Point2d; +using ::behavior_velocity_planner::splineInterpolate; namespace { // create quaternion facing to the nearest trajectory point @@ -600,4 +602,4 @@ void DynamicObstacleCreatorForPoints::onSynchronizedPointCloud( std::lock_guard lock(mutex_); obstacle_points_map_filtered_ = lateral_nearest_points; } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_run_out_module/src/dynamic_obstacle.hpp b/planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.hpp similarity index 96% rename from planning/behavior_velocity_run_out_module/src/dynamic_obstacle.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.hpp index c7d8ef674aafd..b7ed815829a2b 100644 --- a/planning/behavior_velocity_run_out_module/src/dynamic_obstacle.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.hpp @@ -42,11 +42,12 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { using autoware_perception_msgs::msg::ObjectClassification; using autoware_perception_msgs::msg::PredictedObjects; using autoware_perception_msgs::msg::Shape; +using ::behavior_velocity_planner::PlannerData; using run_out_utils::DynamicObstacle; using run_out_utils::DynamicObstacleData; using run_out_utils::DynamicObstacleParam; @@ -55,6 +56,7 @@ using run_out_utils::PredictedPath; using tier4_planning_msgs::msg::PathPointWithLaneId; using tier4_planning_msgs::msg::PathWithLaneId; using PathPointsWithLaneId = std::vector; +using ::behavior_velocity_planner::Polygons2d; /** * @brief base class for creating dynamic obstacles from multiple types of input @@ -171,6 +173,6 @@ class DynamicObstacleCreatorForPoints : public DynamicObstacleCreator pcl::PointCloud obstacle_points_map_filtered_; }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // DYNAMIC_OBSTACLE_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/manager.cpp b/planning/autoware_behavior_velocity_run_out_module/src/manager.cpp similarity index 97% rename from planning/behavior_velocity_run_out_module/src/manager.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/manager.cpp index fb6a70070749a..5ee50863fd162 100644 --- a/planning/behavior_velocity_run_out_module/src/manager.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/manager.cpp @@ -20,10 +20,10 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::SceneModuleManagerInterface; using tier4_autoware_utils::getOrDeclareParameter; - RunOutModuleManager::RunOutModuleManager(rclcpp::Node & node) : SceneModuleManagerInterface(node, getModuleName()) { @@ -198,8 +198,9 @@ void RunOutModuleManager::setDynamicObstacleCreator( break; } } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #include PLUGINLIB_EXPORT_CLASS( - behavior_velocity_planner::RunOutModulePlugin, behavior_velocity_planner::PluginInterface) + autoware::behavior_velocity_planner::RunOutModulePlugin, + behavior_velocity_planner::PluginInterface) diff --git a/planning/behavior_velocity_run_out_module/src/manager.hpp b/planning/autoware_behavior_velocity_run_out_module/src/manager.hpp similarity index 86% rename from planning/behavior_velocity_run_out_module/src/manager.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/manager.hpp index ad35caf98149a..f0c49b99c99e5 100644 --- a/planning/behavior_velocity_run_out_module/src/manager.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/manager.hpp @@ -23,8 +23,11 @@ #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::PluginWrapper; +using ::behavior_velocity_planner::SceneModuleInterface; +using ::behavior_velocity_planner::SceneModuleManagerInterface; class RunOutModuleManager : public SceneModuleManagerInterface { public: @@ -49,6 +52,6 @@ class RunOutModulePlugin : public PluginWrapper { }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // MANAGER_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/path_utils.cpp b/planning/autoware_behavior_velocity_run_out_module/src/path_utils.cpp similarity index 90% rename from planning/behavior_velocity_run_out_module/src/path_utils.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/path_utils.cpp index be7db13cd3ca3..346a10646e6bc 100644 --- a/planning/behavior_velocity_run_out_module/src/path_utils.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/path_utils.cpp @@ -15,7 +15,7 @@ #include "path_utils.hpp" #include -namespace behavior_velocity_planner::run_out_utils +namespace autoware::behavior_velocity_planner::run_out_utils { geometry_msgs::msg::Point findLongitudinalNearestPoint( const std::vector & points, @@ -36,4 +36,4 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint( return min_dist_point; } -} // namespace behavior_velocity_planner::run_out_utils +} // namespace autoware::behavior_velocity_planner::run_out_utils diff --git a/planning/behavior_velocity_run_out_module/src/path_utils.hpp b/planning/autoware_behavior_velocity_run_out_module/src/path_utils.hpp similarity index 92% rename from planning/behavior_velocity_run_out_module/src/path_utils.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/path_utils.hpp index 8867778520bc7..62591af27af11 100644 --- a/planning/behavior_velocity_run_out_module/src/path_utils.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/path_utils.hpp @@ -25,7 +25,7 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace run_out_utils { @@ -36,5 +36,5 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint( const std::vector & target_points); } // namespace run_out_utils -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // PATH_UTILS_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/scene.cpp b/planning/autoware_behavior_velocity_run_out_module/src/scene.cpp similarity index 99% rename from planning/behavior_velocity_run_out_module/src/scene.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/scene.cpp index de50b3161ea6f..351ed8e7a09b8 100644 --- a/planning/behavior_velocity_run_out_module/src/scene.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/scene.cpp @@ -34,10 +34,14 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace bg = boost::geometry; +using ::behavior_velocity_planner::PlanningBehavior; using object_recognition_utils::convertLabelToString; +namespace planning_utils = ::behavior_velocity_planner::planning_utils; +using ::behavior_velocity_planner::getCrosswalksOnPath; +using ::behavior_velocity_planner::Polygon2d; RunOutModule::RunOutModule( const int64_t module_id, const std::shared_ptr & planner_data, @@ -1031,4 +1035,4 @@ bool RunOutModule::isMomentaryDetection() return elapsed_time_since_detection < planner_param_.ignore_momentary_detection.time_threshold; } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_run_out_module/src/scene.hpp b/planning/autoware_behavior_velocity_run_out_module/src/scene.hpp similarity index 95% rename from planning/behavior_velocity_run_out_module/src/scene.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/scene.hpp index 2f797a44d06f7..85da1340a5a5d 100644 --- a/planning/behavior_velocity_run_out_module/src/scene.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/scene.hpp @@ -30,7 +30,7 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { using autoware_perception_msgs::msg::PredictedObjects; using run_out_utils::PlannerParam; @@ -39,6 +39,11 @@ using tier4_debug_msgs::msg::Float32Stamped; using tier4_planning_msgs::msg::PathPointWithLaneId; using tier4_planning_msgs::msg::PathWithLaneId; using BasicPolygons2d = std::vector; +using ::behavior_velocity_planner::PathWithLaneId; +using ::behavior_velocity_planner::PlannerData; +using ::behavior_velocity_planner::Polygon2d; +using ::behavior_velocity_planner::SceneModuleInterface; +using ::behavior_velocity_planner::StopReason; class RunOutModule : public SceneModuleInterface { @@ -177,6 +182,6 @@ class RunOutModule : public SceneModuleInterface bool isMomentaryDetection(); }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // SCENE_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/state_machine.cpp b/planning/autoware_behavior_velocity_run_out_module/src/state_machine.cpp similarity index 96% rename from planning/behavior_velocity_run_out_module/src/state_machine.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/state_machine.cpp index 322264cad8501..484a7cdcd95e3 100644 --- a/planning/behavior_velocity_run_out_module/src/state_machine.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/state_machine.cpp @@ -14,7 +14,7 @@ #include "state_machine.hpp" -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace run_out_utils { @@ -107,4 +107,4 @@ void StateMachine::updateState(const StateInput & state_input, rclcpp::Clock & c } } // namespace run_out_utils -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_run_out_module/src/state_machine.hpp b/planning/autoware_behavior_velocity_run_out_module/src/state_machine.hpp similarity index 92% rename from planning/behavior_velocity_run_out_module/src/state_machine.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/state_machine.hpp index 7c0de8078f435..b88aa821548bb 100644 --- a/planning/behavior_velocity_run_out_module/src/state_machine.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/state_machine.hpp @@ -19,7 +19,7 @@ #include -namespace behavior_velocity_planner::run_out_utils +namespace autoware::behavior_velocity_planner::run_out_utils { class StateMachine @@ -53,6 +53,6 @@ class StateMachine std::optional prev_obstacle_{}; std::optional target_obstacle_{}; }; -} // namespace behavior_velocity_planner::run_out_utils +} // namespace autoware::behavior_velocity_planner::run_out_utils #endif // STATE_MACHINE_HPP_ diff --git a/planning/behavior_velocity_run_out_module/src/utils.cpp b/planning/autoware_behavior_velocity_run_out_module/src/utils.cpp similarity index 98% rename from planning/behavior_velocity_run_out_module/src/utils.cpp rename to planning/autoware_behavior_velocity_run_out_module/src/utils.cpp index c6eda901a1424..ec1cd460e1bb0 100644 --- a/planning/behavior_velocity_run_out_module/src/utils.cpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/utils.cpp @@ -33,8 +33,11 @@ #endif #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::DetectionRange; +using ::behavior_velocity_planner::PathPointWithLaneId; +namespace planning_utils = ::behavior_velocity_planner::planning_utils; namespace run_out_utils { Polygon2d createBoostPolyFromMsg(const std::vector & input_poly) @@ -450,4 +453,4 @@ Polygons2d createMandatoryDetectionAreaPolygon( } } // namespace run_out_utils -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_run_out_module/src/utils.hpp b/planning/autoware_behavior_velocity_run_out_module/src/utils.hpp similarity index 97% rename from planning/behavior_velocity_run_out_module/src/utils.hpp rename to planning/autoware_behavior_velocity_run_out_module/src/utils.hpp index 9208e57dcdc7f..10f856b257a61 100644 --- a/planning/behavior_velocity_run_out_module/src/utils.hpp +++ b/planning/autoware_behavior_velocity_run_out_module/src/utils.hpp @@ -29,7 +29,7 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace run_out_utils { @@ -38,6 +38,8 @@ using autoware_perception_msgs::msg::ObjectClassification; using autoware_perception_msgs::msg::PredictedObjects; using autoware_perception_msgs::msg::Shape; using autoware_planning_msgs::msg::PathPoint; +using ::behavior_velocity_planner::PlannerData; +using ::behavior_velocity_planner::Polygons2d; using tier4_autoware_utils::Box2d; using tier4_autoware_utils::LineString2d; using tier4_autoware_utils::Point2d; @@ -271,5 +273,5 @@ Polygons2d createMandatoryDetectionAreaPolygon( const PathWithLaneId & path, const PlannerData & planner_data, const PlannerParam & planner_param); } // namespace run_out_utils -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // UTILS_HPP_ diff --git a/planning/behavior_velocity_run_out_module/plugins.xml b/planning/behavior_velocity_run_out_module/plugins.xml deleted file mode 100644 index 5320d46f92929..0000000000000 --- a/planning/behavior_velocity_run_out_module/plugins.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - From cdbfa43d0376f235aa8bb6556f8b09c264ba6c3c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 01:57:41 +0000 Subject: [PATCH 2/2] style(pre-commit): autofix --- planning/autoware_behavior_velocity_planner/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/autoware_behavior_velocity_planner/package.xml b/planning/autoware_behavior_velocity_planner/package.xml index b05d83685d047..fff1fb8ff91c0 100644 --- a/planning/autoware_behavior_velocity_planner/package.xml +++ b/planning/autoware_behavior_velocity_planner/package.xml @@ -65,8 +65,8 @@ ament_cmake_ros ament_lint_auto - autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_run_out_module + autoware_behavior_velocity_virtual_traffic_light_module autoware_lint_common behavior_velocity_blind_spot_module behavior_velocity_crosswalk_module