From 54494d62f39282fc1f2c9e7ddf8732fefe9cccb9 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Thu, 27 Jun 2024 15:37:31 +0900 Subject: [PATCH] refactor(object_velocity_splitter)!: fix namespace and directory structure (#7646) * refactor: refactor object_velocity_splitter_node component Signed-off-by: Taekjin LEE * refactor: fix the node name Signed-off-by: Taekjin LEE * refactor: move header file to src Signed-off-by: Taekjin LEE --------- Signed-off-by: Taekjin LEE --- perception/object_velocity_splitter/CMakeLists.txt | 8 ++++---- .../object_velocity_splitter_node.cpp | 8 ++++---- .../object_velocity_splitter_node.hpp | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) rename perception/object_velocity_splitter/src/{object_velocity_splitter_node => }/object_velocity_splitter_node.cpp (93%) rename perception/object_velocity_splitter/{include/object_velocity_splitter => src}/object_velocity_splitter_node.hpp (85%) diff --git a/perception/object_velocity_splitter/CMakeLists.txt b/perception/object_velocity_splitter/CMakeLists.txt index 68e87a3355f86..afad278e383d8 100644 --- a/perception/object_velocity_splitter/CMakeLists.txt +++ b/perception/object_velocity_splitter/CMakeLists.txt @@ -6,12 +6,12 @@ find_package(autoware_cmake REQUIRED) autoware_package() # Targets -ament_auto_add_library(object_velocity_splitter_node_component SHARED - src/object_velocity_splitter_node/object_velocity_splitter_node.cpp +ament_auto_add_library(${PROJECT_NAME} SHARED + src/object_velocity_splitter_node.cpp ) -rclcpp_components_register_node(object_velocity_splitter_node_component - PLUGIN "object_velocity_splitter::ObjectVelocitySplitterNode" +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN "autoware::object_velocity_splitter::ObjectVelocitySplitterNode" EXECUTABLE object_velocity_splitter_node ) diff --git a/perception/object_velocity_splitter/src/object_velocity_splitter_node/object_velocity_splitter_node.cpp b/perception/object_velocity_splitter/src/object_velocity_splitter_node.cpp similarity index 93% rename from perception/object_velocity_splitter/src/object_velocity_splitter_node/object_velocity_splitter_node.cpp rename to perception/object_velocity_splitter/src/object_velocity_splitter_node.cpp index e15871d18840f..a10692faeff1e 100644 --- a/perception/object_velocity_splitter/src/object_velocity_splitter_node/object_velocity_splitter_node.cpp +++ b/perception/object_velocity_splitter/src/object_velocity_splitter_node.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "object_velocity_splitter/object_velocity_splitter_node.hpp" +#include "object_velocity_splitter_node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" @@ -40,7 +40,7 @@ bool update_param( } } // namespace -namespace object_velocity_splitter +namespace autoware::object_velocity_splitter { using autoware_perception_msgs::msg::DetectedObject; using autoware_perception_msgs::msg::DetectedObjects; @@ -110,7 +110,7 @@ rcl_interfaces::msg::SetParametersResult ObjectVelocitySplitterNode::onSetParam( return result; } -} // namespace object_velocity_splitter +} // namespace autoware::object_velocity_splitter #include "rclcpp_components/register_node_macro.hpp" -RCLCPP_COMPONENTS_REGISTER_NODE(object_velocity_splitter::ObjectVelocitySplitterNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::object_velocity_splitter::ObjectVelocitySplitterNode) diff --git a/perception/object_velocity_splitter/include/object_velocity_splitter/object_velocity_splitter_node.hpp b/perception/object_velocity_splitter/src/object_velocity_splitter_node.hpp similarity index 85% rename from perception/object_velocity_splitter/include/object_velocity_splitter/object_velocity_splitter_node.hpp rename to perception/object_velocity_splitter/src/object_velocity_splitter_node.hpp index 2180b467dbbcf..ca0a9a9e65f3c 100644 --- a/perception/object_velocity_splitter/include/object_velocity_splitter/object_velocity_splitter_node.hpp +++ b/perception/object_velocity_splitter/src/object_velocity_splitter_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_VELOCITY_SPLITTER__OBJECT_VELOCITY_SPLITTER_NODE_HPP_ -#define OBJECT_VELOCITY_SPLITTER__OBJECT_VELOCITY_SPLITTER_NODE_HPP_ +#ifndef OBJECT_VELOCITY_SPLITTER_NODE_HPP_ +#define OBJECT_VELOCITY_SPLITTER_NODE_HPP_ #include "rclcpp/rclcpp.hpp" @@ -24,7 +24,7 @@ #include #include -namespace object_velocity_splitter +namespace autoware::object_velocity_splitter { using autoware_perception_msgs::msg::DetectedObject; using autoware_perception_msgs::msg::DetectedObjects; @@ -62,6 +62,6 @@ class ObjectVelocitySplitterNode : public rclcpp::Node NodeParam node_param_{}; }; -} // namespace object_velocity_splitter +} // namespace autoware::object_velocity_splitter -#endif // OBJECT_VELOCITY_SPLITTER__OBJECT_VELOCITY_SPLITTER_NODE_HPP_ +#endif // OBJECT_VELOCITY_SPLITTER_NODE_HPP_