From 57786a719c27fb7f5082f627ddbbee17c87f83f3 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez <33620+esteve@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:41:26 +0200 Subject: [PATCH] refactor(behavior_path_avoidance_by_lane_change_module)!: prefix package and namespace with autoware_ (#6638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(behavior_path_avoidance_by_lane_change_module): prefix package and namespace with autoware_ Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * build(autoware_behavior_path_avoidance_by_lane_change_module): fix namespaces Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * fix(autoware_behavior_path_avoidance_by_lane_change_module): fix clang-tidy issues Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * fix(autoware_behavior_path_avoidance_by_lane_change_module): fix tests Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * fix(autoware_behavior_path_avoidance_by_lane_change_module): fix clang-tidy issues Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * build(autoware_behavior_path_avoidance_by_lane_change_module): revert clang-tidy fixes for naming functions Signed-off-by: Esteve Fernandez * build(autoware_behavior_path_avoidance_by_lane_change_module): revert clang-tidy fixes for naming functions Signed-off-by: Esteve Fernandez * build(autoware_behavior_path_external_request_lane_change_module): revert performance-related clang-tidy fixes Signed-off-by: Esteve Fernandez * build(autoware_behavior_path_avoidance_by_lane_change_module): revert clang-tidy fixes for naming functions Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * refactor(autoware_behavior_path_avoidance_by_lane_change_module): update CODEOWNERS and .pages files Signed-off-by: Esteve Fernandez * refactor(autoware_behavior_path_avoidance_by_lane_change_module): move headers files to src Signed-off-by: Esteve Fernandez * refactor(autoware_behavior_path_avoidance_by_lane_change_module): fix include paths Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * Update planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.cpp Co-authored-by: M. Fatih Cırıt Signed-off-by: Esteve Fernandez * style(pre-commit): autofix Signed-off-by: Esteve Fernandez * build: fix missing using clauses Signed-off-by: Esteve Fernandez --------- Signed-off-by: Esteve Fernandez Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: M. Fatih Cırıt --- .github/CODEOWNERS | 2 +- planning/.pages | 2 +- .../CMakeLists.txt | 2 +- .../README.md | 0 .../avoidance_by_lane_change.param.yaml | 0 .../images/avoidance_by_lane_change.svg | 0 .../images/avoidance_by_lc_trigger_1.svg | 0 .../images/avoidance_by_lc_trigger_2.svg | 0 .../package.xml | 2 +- .../plugins.xml | 3 ++ .../src}/data_structs.hpp | 12 ++++---- .../src/interface.cpp | 9 ++++-- .../src}/interface.hpp | 18 ++++++----- .../src/manager.cpp | 14 +++++---- .../src}/manager.hpp | 19 +++++++----- .../src/scene.cpp | 14 ++++++--- .../src}/scene.hpp | 21 ++++++++----- ...t_behavior_path_planner_node_interface.cpp | 30 +++++++++---------- .../plugins.xml | 3 -- 19 files changed, 89 insertions(+), 62 deletions(-) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/CMakeLists.txt (90%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/README.md (100%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/config/avoidance_by_lane_change.param.yaml (100%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/images/avoidance_by_lane_change.svg (100%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/images/avoidance_by_lc_trigger_1.svg (100%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/images/avoidance_by_lc_trigger_2.svg (100%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/package.xml (95%) create mode 100644 planning/autoware_behavior_path_avoidance_by_lane_change_module/plugins.xml rename planning/{behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module/src}/data_structs.hpp (79%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/src/interface.cpp (92%) rename planning/{behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module/src}/interface.hpp (77%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/src/manager.cpp (96%) rename planning/{behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module/src}/manager.hpp (73%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/src/scene.cpp (96%) rename planning/{behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module/src}/scene.hpp (76%) rename planning/{behavior_path_avoidance_by_lane_change_module => autoware_behavior_path_avoidance_by_lane_change_module}/test/test_behavior_path_planner_node_interface.cpp (79%) delete mode 100644 planning/behavior_path_avoidance_by_lane_change_module/plugins.xml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index be202d123cd62..297ce75c5c176 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -144,6 +144,7 @@ perception/traffic_light_map_based_detector/** shunsuke.miura@tier4.jp tao.zhong perception/traffic_light_multi_camera_fusion/** shunsuke.miura@tier4.jp tao.zhong@tier4.jp perception/traffic_light_occlusion_predictor/** shunsuke.miura@tier4.jp tao.zhong@tier4.jp perception/traffic_light_visualization/** tao.zhong@tier4.jp yukihiro.saito@tier4.jp +planning/autoware_behavior_path_avoidance_by_lane_change_module/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/** kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp yuki.takagi@tier4.jp planning/autoware_behavior_path_external_request_lane_change_module/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp planning/autoware_behavior_path_planner_common/** daniel.sanchez@tier4.jp fumiya.watanabe@tier4.jp go.sakayori@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp @@ -161,7 +162,6 @@ planning/autoware_planning_topic_converter/** kosuke.takeuchi@tier4.jp satoshi.o planning/autoware_remaining_distance_time_calculator/** ahmed.ebrahim@leodrive.ai planning/autoware_static_centerline_generator/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp planning/autoware_velocity_smoother/** fumiya.watanabe@tier4.jp makoto.kurihara@tier4.jp satoshi.ota@tier4.jp takamasa.horibe@tier4.jp -planning/behavior_path_avoidance_by_lane_change_module/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp planning/behavior_path_goal_planner_module/** daniel.sanchez@tier4.jp kosuke.takeuchi@tier4.jp kyoichi.sugahara@tier4.jp mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp planning/behavior_path_lane_change_module/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp planning/behavior_path_planner/** fumiya.watanabe@tier4.jp go.sakayori@tier4.jp kosuke.takeuchi@tier4.jp kyoichi.sugahara@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp diff --git a/planning/.pages b/planning/.pages index 2decfad30e0da..be6bf0af9b2a9 100644 --- a/planning/.pages +++ b/planning/.pages @@ -10,7 +10,7 @@ nav: - 'Dynamic Drivable Area': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_drivable_area_design - 'Turn Signal': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_turn_signal_design - 'Scene Module': - - 'Avoidance by Lane Change': planning/behavior_path_avoidance_by_lane_change_module + - 'Avoidance by Lane Change': planning/autoware_behavior_path_avoidance_by_lane_change_module - 'Dynamic Obstacle Avoidance': planning/autoware_behavior_path_dynamic_obstacle_avoidance_module - 'Goal Planner': planning/behavior_path_goal_planner_module - 'Lane Change': planning/behavior_path_lane_change_module diff --git a/planning/behavior_path_avoidance_by_lane_change_module/CMakeLists.txt b/planning/autoware_behavior_path_avoidance_by_lane_change_module/CMakeLists.txt similarity index 90% rename from planning/behavior_path_avoidance_by_lane_change_module/CMakeLists.txt rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/CMakeLists.txt index bca909c7cef7e..2ab88e04f96e5 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/CMakeLists.txt +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(behavior_path_avoidance_by_lane_change_module) +project(autoware_behavior_path_avoidance_by_lane_change_module) find_package(autoware_cmake REQUIRED) autoware_package() diff --git a/planning/behavior_path_avoidance_by_lane_change_module/README.md b/planning/autoware_behavior_path_avoidance_by_lane_change_module/README.md similarity index 100% rename from planning/behavior_path_avoidance_by_lane_change_module/README.md rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/README.md diff --git a/planning/behavior_path_avoidance_by_lane_change_module/config/avoidance_by_lane_change.param.yaml b/planning/autoware_behavior_path_avoidance_by_lane_change_module/config/avoidance_by_lane_change.param.yaml similarity index 100% rename from planning/behavior_path_avoidance_by_lane_change_module/config/avoidance_by_lane_change.param.yaml rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/config/avoidance_by_lane_change.param.yaml diff --git a/planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lane_change.svg b/planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lane_change.svg similarity index 100% rename from planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lane_change.svg rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lane_change.svg diff --git a/planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_1.svg b/planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_1.svg similarity index 100% rename from planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_1.svg rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_1.svg diff --git a/planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_2.svg b/planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_2.svg similarity index 100% rename from planning/behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_2.svg rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/images/avoidance_by_lc_trigger_2.svg diff --git a/planning/behavior_path_avoidance_by_lane_change_module/package.xml b/planning/autoware_behavior_path_avoidance_by_lane_change_module/package.xml similarity index 95% rename from planning/behavior_path_avoidance_by_lane_change_module/package.xml rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/package.xml index 57e30bd628e08..3a75849931228 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/package.xml +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/package.xml @@ -1,7 +1,7 @@ - behavior_path_avoidance_by_lane_change_module + autoware_behavior_path_avoidance_by_lane_change_module 0.1.0 The behavior_path_avoidance_by_lane_change_module package diff --git a/planning/autoware_behavior_path_avoidance_by_lane_change_module/plugins.xml b/planning/autoware_behavior_path_avoidance_by_lane_change_module/plugins.xml new file mode 100644 index 0000000000000..848d978329866 --- /dev/null +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/plugins.xml @@ -0,0 +1,3 @@ + + + diff --git a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/data_structs.hpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/data_structs.hpp similarity index 79% rename from planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/data_structs.hpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/data_structs.hpp index d7fd8b82bd71e..01f2fd7f1ee52 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/data_structs.hpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/data_structs.hpp @@ -11,13 +11,15 @@ // 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 BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_ -#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_ +#ifndef DATA_STRUCTS_HPP_ +#define DATA_STRUCTS_HPP_ #include "autoware_behavior_path_static_obstacle_avoidance_module/data_structs.hpp" -namespace behavior_path_planner +namespace autoware::behavior_path_planner { +using ::behavior_path_planner::AvoidanceParameters; + struct AvoidanceByLCParameters : public AvoidanceParameters { // execute only when the target object longitudinal distance is larger than this param. @@ -30,6 +32,6 @@ struct AvoidanceByLCParameters : public AvoidanceParameters { } }; -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner -#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_ +#endif // DATA_STRUCTS_HPP_ diff --git a/planning/behavior_path_avoidance_by_lane_change_module/src/interface.cpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.cpp similarity index 92% rename from planning/behavior_path_avoidance_by_lane_change_module/src/interface.cpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.cpp index bae9112e6d840..c5070540152de 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/src/interface.cpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "behavior_path_avoidance_by_lane_change_module/interface.hpp" +#include "interface.hpp" #include "autoware_behavior_path_planner_common/interface/scene_module_interface.hpp" #include "autoware_behavior_path_planner_common/interface/scene_module_visitor.hpp" @@ -20,8 +20,11 @@ #include #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { +using ::behavior_path_planner::State; +using ::route_handler::Direction; + AvoidanceByLaneChangeInterface::AvoidanceByLaneChangeInterface( const std::string & name, rclcpp::Node & node, const std::shared_ptr & parameters, @@ -63,4 +66,4 @@ void AvoidanceByLaneChangeInterface::updateRTCStatus( uuid_map_.at(direction), isExecutionReady(), state, start_distance, finish_distance, clock_->now()); } -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner diff --git a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/interface.hpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.hpp similarity index 77% rename from planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/interface.hpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.hpp index 897956a392008..75413c4dccfa6 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/interface.hpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/interface.hpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_ -#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_ +#ifndef INTERFACE_HPP_ +#define INTERFACE_HPP_ -#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp" -#include "behavior_path_avoidance_by_lane_change_module/scene.hpp" #include "behavior_path_lane_change_module/interface.hpp" +#include "data_structs.hpp" +#include "scene.hpp" #include @@ -25,8 +25,12 @@ #include #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { +using ::behavior_path_planner::LaneChangeInterface; +using ::behavior_path_planner::ObjectsOfInterestMarkerInterface; +using ::behavior_path_planner::RTCInterface; + class AvoidanceByLaneChangeInterface : public LaneChangeInterface { public: @@ -45,6 +49,6 @@ class AvoidanceByLaneChangeInterface : public LaneChangeInterface protected: void updateRTCStatus(const double start_distance, const double finish_distance) override; }; -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner -#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_ +#endif // INTERFACE_HPP_ diff --git a/planning/behavior_path_avoidance_by_lane_change_module/src/manager.cpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.cpp similarity index 96% rename from planning/behavior_path_avoidance_by_lane_change_module/src/manager.cpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.cpp index 868b2585170f9..792f0e93ac1b7 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/src/manager.cpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "behavior_path_avoidance_by_lane_change_module/manager.hpp" +#include "manager.hpp" #include "autoware_behavior_path_static_obstacle_avoidance_module/parameter_helper.hpp" -#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp" +#include "data_structs.hpp" #include "tier4_autoware_utils/ros/parameter.hpp" #include "tier4_autoware_utils/ros/update_param.hpp" @@ -25,8 +25,10 @@ #include #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { +using ::behavior_path_planner::getParameter; +using ::behavior_path_planner::ObjectParameter; void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node) { @@ -191,9 +193,9 @@ AvoidanceByLaneChangeModuleManager::createNewSceneModuleInstance() objects_of_interest_marker_interface_ptr_map_); } -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner #include PLUGINLIB_EXPORT_CLASS( - behavior_path_planner::AvoidanceByLaneChangeModuleManager, - behavior_path_planner::SceneModuleManagerInterface) + autoware::behavior_path_planner::AvoidanceByLaneChangeModuleManager, + ::behavior_path_planner::SceneModuleManagerInterface) diff --git a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/manager.hpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.hpp similarity index 73% rename from planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/manager.hpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.hpp index 75fa67e7fe1a3..f921aa4d7e31c 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/manager.hpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/manager.hpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_ -#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_ +#ifndef MANAGER_HPP_ +#define MANAGER_HPP_ -#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp" -#include "behavior_path_avoidance_by_lane_change_module/interface.hpp" #include "behavior_path_lane_change_module/manager.hpp" +#include "data_structs.hpp" +#include "interface.hpp" #include @@ -26,9 +26,12 @@ #include #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { -using route_handler::Direction; +using ::behavior_path_planner::LaneChangeModuleManager; +using ::behavior_path_planner::LaneChangeModuleType; +using ::behavior_path_planner::SceneModuleInterface; +using ::route_handler::Direction; class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager { @@ -47,6 +50,6 @@ class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager private: std::shared_ptr avoidance_parameters_; }; -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner -#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_ +#endif // MANAGER_HPP_ diff --git a/planning/behavior_path_avoidance_by_lane_change_module/src/scene.cpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.cpp similarity index 96% rename from planning/behavior_path_avoidance_by_lane_change_module/src/scene.cpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.cpp index e0ebeebba955c..0647147dff0d0 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/src/scene.cpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "behavior_path_avoidance_by_lane_change_module/scene.hpp" +#include "scene.hpp" #include "autoware_behavior_path_planner_common/utils/drivable_area_expansion/static_drivable_area.hpp" #include "autoware_behavior_path_planner_common/utils/path_safety_checker/objects_filtering.hpp" @@ -28,13 +28,19 @@ #include #include +#include #include #include #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { -using behavior_path_planner::utils::lane_change::debug::createExecutionArea; +using ::behavior_path_planner::Direction; +using ::behavior_path_planner::LaneChangeModuleType; +using ::behavior_path_planner::ObjectInfo; +using ::behavior_path_planner::Point2d; +using ::behavior_path_planner::utils::lane_change::debug::createExecutionArea; +namespace utils = ::behavior_path_planner::utils; AvoidanceByLaneChange::AvoidanceByLaneChange( const std::shared_ptr & parameters, @@ -293,4 +299,4 @@ double AvoidanceByLaneChange::calcLateralOffset() const } return additional_lat_offset; } -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner diff --git a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/scene.hpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.hpp similarity index 76% rename from planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/scene.hpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.hpp index 4ef4c0673c0c5..6b39340da172a 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/scene.hpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.hpp @@ -12,19 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_ -#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_ +#ifndef SCENE_HPP_ +#define SCENE_HPP_ #include "autoware_behavior_path_static_obstacle_avoidance_module/helper.hpp" -#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp" #include "behavior_path_lane_change_module/scene.hpp" +#include "data_structs.hpp" #include -namespace behavior_path_planner +namespace autoware::behavior_path_planner { +using ::behavior_path_planner::DebugData; using AvoidanceDebugData = DebugData; -using helper::static_obstacle_avoidance::AvoidanceHelper; +using ::behavior_path_planner::AvoidancePlanningData; +using ::behavior_path_planner::LaneChangeParameters; +using ::behavior_path_planner::NormalLaneChange; +using ::behavior_path_planner::ObjectData; +using ::behavior_path_planner::ObjectDataArray; +using ::behavior_path_planner::PredictedObject; +using ::behavior_path_planner::helper::static_obstacle_avoidance::AvoidanceHelper; class AvoidanceByLaneChange : public NormalLaneChange { @@ -59,6 +66,6 @@ class AvoidanceByLaneChange : public NormalLaneChange double calcMinimumLaneChangeLength() const; double calcLateralOffset() const; }; -} // namespace behavior_path_planner +} // namespace autoware::behavior_path_planner -#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_ +#endif // SCENE_HPP_ diff --git a/planning/behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp b/planning/autoware_behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp similarity index 79% rename from planning/behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp rename to planning/autoware_behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp index 69ce87aabc7b4..ea7979958e49e 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp +++ b/planning/autoware_behavior_path_avoidance_by_lane_change_module/test/test_behavior_path_planner_node_interface.cpp @@ -23,7 +23,7 @@ #include #include -using behavior_path_planner::BehaviorPathPlannerNode; +using ::behavior_path_planner::BehaviorPathPlannerNode; using planning_test_utils::PlanningInterfaceTestManager; std::shared_ptr generateTestManager() @@ -52,26 +52,26 @@ std::shared_ptr generateNode() ament_index_cpp::get_package_share_directory("behavior_path_lane_change_module"); std::vector module_names; - module_names.emplace_back("behavior_path_planner::AvoidanceByLaneChangeModuleManager"); + module_names.emplace_back("autoware::behavior_path_planner::AvoidanceByLaneChangeModuleManager"); std::vector params; params.emplace_back("launch_modules", module_names); node_options.parameter_overrides(params); test_utils::updateNodeOptions( - node_options, - {planning_test_utils_dir + "/config/test_common.param.yaml", - planning_test_utils_dir + "/config/test_nearest_search.param.yaml", - planning_test_utils_dir + "/config/test_vehicle_info.param.yaml", - behavior_path_planner_dir + "/config/behavior_path_planner.param.yaml", - behavior_path_planner_dir + "/config/drivable_area_expansion.param.yaml", - behavior_path_planner_dir + "/config/scene_module_manager.param.yaml", - behavior_path_lane_change_module_dir + "/config/lane_change.param.yaml", - ament_index_cpp::get_package_share_directory( - "autoware_behavior_path_static_obstacle_avoidance_module") + - "/config/static_obstacle_avoidance.param.yaml", - ament_index_cpp::get_package_share_directory("behavior_path_avoidance_by_lane_change_module") + - "/config/avoidance_by_lane_change.param.yaml"}); + node_options, {planning_test_utils_dir + "/config/test_common.param.yaml", + planning_test_utils_dir + "/config/test_nearest_search.param.yaml", + planning_test_utils_dir + "/config/test_vehicle_info.param.yaml", + behavior_path_planner_dir + "/config/behavior_path_planner.param.yaml", + behavior_path_planner_dir + "/config/drivable_area_expansion.param.yaml", + behavior_path_planner_dir + "/config/scene_module_manager.param.yaml", + behavior_path_lane_change_module_dir + "/config/lane_change.param.yaml", + ament_index_cpp::get_package_share_directory( + "autoware_behavior_path_static_obstacle_avoidance_module") + + "/config/static_obstacle_avoidance.param.yaml", + ament_index_cpp::get_package_share_directory( + "autoware_behavior_path_avoidance_by_lane_change_module") + + "/config/avoidance_by_lane_change.param.yaml"}); return std::make_shared(node_options); } diff --git a/planning/behavior_path_avoidance_by_lane_change_module/plugins.xml b/planning/behavior_path_avoidance_by_lane_change_module/plugins.xml deleted file mode 100644 index 092d54c096ae9..0000000000000 --- a/planning/behavior_path_avoidance_by_lane_change_module/plugins.xml +++ /dev/null @@ -1,3 +0,0 @@ - - -