From 9a5a0933db78aa5da127236e1362e0030ae82f75 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Mon, 24 Jun 2024 16:22:25 +0900 Subject: [PATCH] refactor: radar_tracks_msgs_converter library and node Signed-off-by: Taekjin LEE --- perception/radar_tracks_msgs_converter/CMakeLists.txt | 10 +++++----- .../radar_tracks_msgs_converter/node.hpp} | 10 +++++----- .../radar_tracks_msgs_converter_node.cpp => node.cpp} | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) rename perception/radar_tracks_msgs_converter/include/{radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp => autoware/radar_tracks_msgs_converter/node.hpp} (93%) rename perception/radar_tracks_msgs_converter/src/{radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp => node.cpp} (98%) diff --git a/perception/radar_tracks_msgs_converter/CMakeLists.txt b/perception/radar_tracks_msgs_converter/CMakeLists.txt index 766fb4b939904..d096c9b69f279 100644 --- a/perception/radar_tracks_msgs_converter/CMakeLists.txt +++ b/perception/radar_tracks_msgs_converter/CMakeLists.txt @@ -5,13 +5,13 @@ find_package(autoware_cmake REQUIRED) autoware_package() ## Targets -ament_auto_add_library(radar_tracks_msgs_converter_node_component SHARED - src/radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp +ament_auto_add_library(${PROJECT_NAME} SHARED + src/node.cpp ) -rclcpp_components_register_node(radar_tracks_msgs_converter_node_component - PLUGIN "radar_tracks_msgs_converter::RadarTracksMsgsConverterNode" - EXECUTABLE radar_tracks_msgs_converter_node +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN "autoware::radar_tracks_msgs_converter::RadarTracksMsgsConverterNode" + EXECUTABLE ${PROJECT_NAME}_node ) ## Tests diff --git a/perception/radar_tracks_msgs_converter/include/radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp b/perception/radar_tracks_msgs_converter/include/autoware/radar_tracks_msgs_converter/node.hpp similarity index 93% rename from perception/radar_tracks_msgs_converter/include/radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp rename to perception/radar_tracks_msgs_converter/include/autoware/radar_tracks_msgs_converter/node.hpp index 30d02c90b0594..feeaff088a390 100644 --- a/perception/radar_tracks_msgs_converter/include/radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp +++ b/perception/radar_tracks_msgs_converter/include/autoware/radar_tracks_msgs_converter/node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RADAR_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_ -#define RADAR_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_ +#ifndef AUTOWARE__RADAR_TRACKS_MSGS_CONVERTER__NODE_HPP_ +#define AUTOWARE__RADAR_TRACKS_MSGS_CONVERTER__NODE_HPP_ #include "autoware/universe_utils/ros/transform_listener.hpp" #include "rclcpp/rclcpp.hpp" @@ -32,7 +32,7 @@ #include #include -namespace radar_tracks_msgs_converter +namespace autoware::radar_tracks_msgs_converter { using autoware_perception_msgs::msg::DetectedObject; using autoware_perception_msgs::msg::DetectedObjectKinematics; @@ -114,6 +114,6 @@ class RadarTracksMsgsConverterNode : public rclcpp::Node uint8_t convertClassification(const uint16_t classification); }; -} // namespace radar_tracks_msgs_converter +} // namespace autoware::radar_tracks_msgs_converter -#endif // RADAR_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_ +#endif // AUTOWARE__RADAR_TRACKS_MSGS_CONVERTER__NODE_HPP_ diff --git a/perception/radar_tracks_msgs_converter/src/radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp b/perception/radar_tracks_msgs_converter/src/node.cpp similarity index 98% rename from perception/radar_tracks_msgs_converter/src/radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp rename to perception/radar_tracks_msgs_converter/src/node.cpp index 36f4d3cd3da90..deee50a0f118d 100644 --- a/perception/radar_tracks_msgs_converter/src/radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp +++ b/perception/radar_tracks_msgs_converter/src/node.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp" +#include "autoware/radar_tracks_msgs_converter/node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" #include "autoware/universe_utils/math/unit_conversion.hpp" @@ -56,7 +56,7 @@ bool update_param( } } // namespace -namespace radar_tracks_msgs_converter +namespace autoware::radar_tracks_msgs_converter { enum class RadarTrackObjectID { @@ -407,7 +407,7 @@ uint8_t RadarTracksMsgsConverterNode::convertClassification(const uint16_t class } } -} // namespace radar_tracks_msgs_converter +} // namespace autoware::radar_tracks_msgs_converter #include "rclcpp_components/register_node_macro.hpp" -RCLCPP_COMPONENTS_REGISTER_NODE(radar_tracks_msgs_converter::RadarTracksMsgsConverterNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::radar_tracks_msgs_converter::RadarTracksMsgsConverterNode)