From 81e1d40addd64829cc9ba55cb430202ccf018a11 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Tue, 28 May 2024 14:30:42 +0200 Subject: [PATCH] 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.launch.xml | 2 +- planning/.pages | 2 +- .../README.md | 2 +- .../package.xml | 2 +- .../test/src/test_node_interface.cpp | 37 +++++++++++-------- .../CMakeLists.txt | 2 +- .../README.md | 0 .../config/run_out.param.yaml | 0 .../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 ++- .../plugins.xml | 3 -- 36 files changed, 86 insertions(+), 56 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 dd73e823b6c05..390243aa2584f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -170,7 +170,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 29fe7f7071126..3662179babffa 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_run_out_module autoware_lint_common behavior_velocity_blind_spot_module behavior_velocity_crosswalk_module @@ -74,7 +75,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 3f60c904d6eb4..fb7287314f859 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 @@ -54,12 +54,19 @@ std::shared_ptr generateNode() const auto velocity_smoother_dir = ament_index_cpp::get_package_share_directory("autoware_velocity_smoother"); - const auto get_behavior_velocity_module_config = [](const std::string & module) { + // TODO(esteve): delete when all the modules are migrated to autoware_behavior_velocity_* + const auto get_behavior_velocity_module_config_no_prefix = [](const std::string & module) { const auto package_name = "behavior_velocity_" + module + "_module"; const auto package_path = ament_index_cpp::get_package_share_directory(package_name); return package_path + "/config/" + module + ".param.yaml"; }; + const auto get_behavior_velocity_module_config = [](const std::string & module) { + const auto package_name = "autoware_behavior_velocity_" + module + "_module"; + const auto package_path = ament_index_cpp::get_package_share_directory(package_name); + return package_path + "/config/" + module + ".param.yaml"; + }; + std::vector module_names; module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin"); module_names.emplace_back("behavior_velocity_planner::WalkwayModulePlugin"); @@ -72,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"); @@ -89,20 +96,20 @@ std::shared_ptr generateNode() velocity_smoother_dir + "/config/default_velocity_smoother.param.yaml", velocity_smoother_dir + "/config/Analytical.param.yaml", behavior_velocity_planner_dir + "/config/behavior_velocity_planner.param.yaml", - get_behavior_velocity_module_config("blind_spot"), - get_behavior_velocity_module_config("crosswalk"), - get_behavior_velocity_module_config("walkway"), - get_behavior_velocity_module_config("detection_area"), - get_behavior_velocity_module_config("intersection"), - get_behavior_velocity_module_config("no_stopping_area"), - get_behavior_velocity_module_config("occlusion_spot"), + get_behavior_velocity_module_config_no_prefix("blind_spot"), + get_behavior_velocity_module_config_no_prefix("crosswalk"), + get_behavior_velocity_module_config_no_prefix("walkway"), + get_behavior_velocity_module_config_no_prefix("detection_area"), + 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("run_out"), - get_behavior_velocity_module_config("speed_bump"), - get_behavior_velocity_module_config("stop_line"), - get_behavior_velocity_module_config("traffic_light"), - get_behavior_velocity_module_config("virtual_traffic_light"), - get_behavior_velocity_module_config("out_of_lane"), - get_behavior_velocity_module_config("no_drivable_lane")}); + 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"), + get_behavior_velocity_module_config_no_prefix("virtual_traffic_light"), + get_behavior_velocity_module_config_no_prefix("out_of_lane"), + get_behavior_velocity_module_config_no_prefix("no_drivable_lane")}); // TODO(Takagi, Isamu): set launch_modules // TODO(Kyoichi Sugahara) set to true launch_virtual_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 a0b15570f48f2..0feccb679759f 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 9b94c8b681942..89018bc9cad11 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 f020da2abd045..5feb07da5a57d 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,19 +42,21 @@ #include #include -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { using autoware_auto_perception_msgs::msg::ObjectClassification; using autoware_auto_perception_msgs::msg::PredictedObjects; using autoware_auto_perception_msgs::msg::Shape; using autoware_auto_planning_msgs::msg::PathPointWithLaneId; using autoware_auto_planning_msgs::msg::PathWithLaneId; +using ::behavior_velocity_planner::PlannerData; using run_out_utils::DynamicObstacle; using run_out_utils::DynamicObstacleData; using run_out_utils::DynamicObstacleParam; using run_out_utils::PlannerParam; using run_out_utils::PredictedPath; 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 1c85a22f57bf6..b99b488241b8f 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()) { @@ -200,8 +200,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 4dd66ad45898b..40b86f3636711 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 1cec20297683c..dad670d8044d9 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 92aca946c13ef..50fb40eaf37e9 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 da826e1cf0cf6..d40759512b3d4 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 3db6051ab36e7..f7bd6fc792faf 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_auto_perception_msgs::msg::PredictedObjects; using autoware_auto_planning_msgs::msg::PathPointWithLaneId; @@ -39,6 +39,11 @@ using run_out_utils::PlannerParam; using run_out_utils::PoseWithRange; using tier4_debug_msgs::msg::Float32Stamped; 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 f17f4c7251ea4..85dc9b571a53c 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 51b460482458f..97873ed274cd4 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 { @@ -39,6 +39,8 @@ using autoware_auto_perception_msgs::msg::PredictedObjects; using autoware_auto_perception_msgs::msg::Shape; using autoware_auto_planning_msgs::msg::PathPoint; using autoware_auto_planning_msgs::msg::PathWithLaneId; +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 @@ - - -