From 49f86e2b4afec85be693a07c5ef4c479bd64bd45 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Wed, 27 Mar 2024 16:07:01 +0100 Subject: [PATCH] build(behavior_velocity_planner): prefix package and namespace with autoware_ Signed-off-by: Esteve Fernandez --- planning/behavior_velocity_planner/CMakeLists.txt | 4 ++-- .../launch/behavior_velocity_planner.launch.xml | 2 +- planning/behavior_velocity_planner/package.xml | 4 ++-- planning/behavior_velocity_planner/src/node.cpp | 5 ++++- planning/behavior_velocity_planner/src/node.hpp | 7 +++++-- planning/behavior_velocity_planner/src/planner_manager.cpp | 7 +++++-- planning/behavior_velocity_planner/src/planner_manager.hpp | 3 +++ .../test/src/test_node_interface.cpp | 2 +- 8 files changed, 23 insertions(+), 11 deletions(-) diff --git a/planning/behavior_velocity_planner/CMakeLists.txt b/planning/behavior_velocity_planner/CMakeLists.txt index ee7dd7c07a77a..37a02b844dfe9 100644 --- a/planning/behavior_velocity_planner/CMakeLists.txt +++ b/planning/behavior_velocity_planner/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(behavior_velocity_planner) +project(autoware_behavior_velocity_planner) find_package(autoware_cmake REQUIRED) find_package(rosidl_default_generators REQUIRED) @@ -19,7 +19,7 @@ ament_auto_add_library(${PROJECT_NAME}_lib SHARED ) rclcpp_components_register_node(${PROJECT_NAME}_lib - PLUGIN "behavior_velocity_planner::BehaviorVelocityPlannerNode" + PLUGIN "autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode" EXECUTABLE ${PROJECT_NAME}_node ) diff --git a/planning/behavior_velocity_planner/launch/behavior_velocity_planner.launch.xml b/planning/behavior_velocity_planner/launch/behavior_velocity_planner.launch.xml index c1631fdb739de..2b8431d17dfee 100644 --- a/planning/behavior_velocity_planner/launch/behavior_velocity_planner.launch.xml +++ b/planning/behavior_velocity_planner/launch/behavior_velocity_planner.launch.xml @@ -30,7 +30,7 @@ - + diff --git a/planning/behavior_velocity_planner/package.xml b/planning/behavior_velocity_planner/package.xml index 1357b555f0ba4..573d862f1725b 100644 --- a/planning/behavior_velocity_planner/package.xml +++ b/planning/behavior_velocity_planner/package.xml @@ -1,9 +1,9 @@ - behavior_velocity_planner + autoware_behavior_velocity_planner 0.1.0 - The behavior_velocity_planner package + The autoware_behavior_velocity_planner package Mamoru Sobue Takayuki Murooka diff --git a/planning/behavior_velocity_planner/src/node.cpp b/planning/behavior_velocity_planner/src/node.cpp index aa9613a35dd7c..f040c5d359a0a 100644 --- a/planning/behavior_velocity_planner/src/node.cpp +++ b/planning/behavior_velocity_planner/src/node.cpp @@ -52,6 +52,8 @@ rclcpp::SubscriptionOptions createSubscriptionOptions(rclcpp::Node * node_ptr) } } // namespace +namespace autoware +{ namespace behavior_velocity_planner { namespace @@ -476,6 +478,7 @@ void BehaviorVelocityPlannerNode::publishDebugMarker( debug_viz_pub_->publish(output_msg); } } // namespace behavior_velocity_planner +} // namespace autoware #include -RCLCPP_COMPONENTS_REGISTER_NODE(behavior_velocity_planner::BehaviorVelocityPlannerNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode) diff --git a/planning/behavior_velocity_planner/src/node.hpp b/planning/behavior_velocity_planner/src/node.hpp index dd6edf6ae0bc0..20fac2feb4928 100644 --- a/planning/behavior_velocity_planner/src/node.hpp +++ b/planning/behavior_velocity_planner/src/node.hpp @@ -44,11 +44,13 @@ #include #include +namespace autoware +{ namespace behavior_velocity_planner { using autoware_auto_mapping_msgs::msg::HADMapBin; -using behavior_velocity_planner::srv::LoadPlugin; -using behavior_velocity_planner::srv::UnloadPlugin; +using autoware::behavior_velocity_planner::srv::LoadPlugin; +using autoware::behavior_velocity_planner::srv::UnloadPlugin; using tier4_planning_msgs::msg::VelocityLimit; class BehaviorVelocityPlannerNode : public rclcpp::Node @@ -135,5 +137,6 @@ class BehaviorVelocityPlannerNode : public rclcpp::Node std::unique_ptr published_time_publisher_; }; } // namespace behavior_velocity_planner +} // namespace autoware #endif // NODE_HPP_ diff --git a/planning/behavior_velocity_planner/src/planner_manager.cpp b/planning/behavior_velocity_planner/src/planner_manager.cpp index cb491920c87d4..a646b66c727f3 100644 --- a/planning/behavior_velocity_planner/src/planner_manager.cpp +++ b/planning/behavior_velocity_planner/src/planner_manager.cpp @@ -19,6 +19,8 @@ #include #include +namespace autoware +{ namespace behavior_velocity_planner { namespace @@ -50,7 +52,7 @@ diagnostic_msgs::msg::DiagnosticStatus makeStopReasonDiag( } // namespace BehaviorVelocityPlannerManager::BehaviorVelocityPlannerManager() -: plugin_loader_("behavior_velocity_planner", "behavior_velocity_planner::PluginInterface") +: plugin_loader_("behavior_velocity_planner", "autoware::behavior_velocity_planner::PluginInterface") { } @@ -82,7 +84,7 @@ void BehaviorVelocityPlannerManager::removeScenePlugin( { auto it = std::remove_if( scene_manager_plugins_.begin(), scene_manager_plugins_.end(), - [&](const std::shared_ptr plugin) { + [&](const std::shared_ptr plugin) { return plugin->getModuleName() == name; }); @@ -129,3 +131,4 @@ diagnostic_msgs::msg::DiagnosticStatus BehaviorVelocityPlannerManager::getStopRe return stop_reason_diag_; } } // namespace behavior_velocity_planner +} // namespace autoware diff --git a/planning/behavior_velocity_planner/src/planner_manager.hpp b/planning/behavior_velocity_planner/src/planner_manager.hpp index 7485e5faba8bf..02c343f82a7b9 100644 --- a/planning/behavior_velocity_planner/src/planner_manager.hpp +++ b/planning/behavior_velocity_planner/src/planner_manager.hpp @@ -36,6 +36,8 @@ #include #include +namespace autoware +{ namespace behavior_velocity_planner { class BehaviorVelocityPlannerManager @@ -57,5 +59,6 @@ class BehaviorVelocityPlannerManager std::vector> scene_manager_plugins_; }; } // namespace behavior_velocity_planner +} // namespace autoware #endif // PLANNER_MANAGER_HPP_ diff --git a/planning/behavior_velocity_planner/test/src/test_node_interface.cpp b/planning/behavior_velocity_planner/test/src/test_node_interface.cpp index 935530b52e175..5b180d514638a 100644 --- a/planning/behavior_velocity_planner/test/src/test_node_interface.cpp +++ b/planning/behavior_velocity_planner/test/src/test_node_interface.cpp @@ -23,7 +23,7 @@ #include #include -using behavior_velocity_planner::BehaviorVelocityPlannerNode; +using autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode; using planning_test_utils::PlanningInterfaceTestManager; std::shared_ptr generateTestManager()