From 8aecaa92ae8471b321e876622a4205075d5dd971 Mon Sep 17 00:00:00 2001 From: Ramon Wijnands Date: Tue, 30 Apr 2024 16:47:54 +0200 Subject: [PATCH] Rename package to ros2_socketcan_bridge --- CMakeLists.txt | 4 ++-- README.md | 2 +- .../socketcan_bridge.hpp | 4 ++-- .../socketcan_bridge_node.hpp | 6 +++--- package.xml | 2 +- src/socketcan_bridge.cpp | 6 +++--- src/socketcan_bridge_ee.cpp | 4 ++-- src/socketcan_bridge_node.cpp | 8 ++++---- test/benchmark.launch.xml | 4 ++-- test/comparison.launch.xml | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) rename include/{nobleo_socketcan_bridge => ros2_socketcan_bridge}/socketcan_bridge.hpp (94%) rename include/{nobleo_socketcan_bridge => ros2_socketcan_bridge}/socketcan_bridge_node.hpp (76%) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd2c47f..92c03f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.8) -project(nobleo_socketcan_bridge) +project(ros2_socketcan_bridge) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -37,7 +37,7 @@ target_link_libraries(socketcan_bridge_component fmt::fmt) rclcpp_components_register_node( socketcan_bridge_component - PLUGIN "nobleo_socketcan_bridge::SocketCanBridgeNode" + PLUGIN "ros2_socketcan_bridge::SocketCanBridgeNode" EXECUTABLE socketcan_bridge ) diff --git a/README.md b/README.md index 7123664..c7b6d83 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Copyright (C) 2024 Nobleo Technology B.V. SPDX-License-Identifier: Apache-2.0 --> -# nobleo_socketcan_bridge +# ros2_socketcan_bridge The packages provides functionality to expose CAN frames from SocketCAN to a ROS Topic. ## Overview diff --git a/include/nobleo_socketcan_bridge/socketcan_bridge.hpp b/include/ros2_socketcan_bridge/socketcan_bridge.hpp similarity index 94% rename from include/nobleo_socketcan_bridge/socketcan_bridge.hpp rename to include/ros2_socketcan_bridge/socketcan_bridge.hpp index a916471..ef3ae27 100644 --- a/include/nobleo_socketcan_bridge/socketcan_bridge.hpp +++ b/include/ros2_socketcan_bridge/socketcan_bridge.hpp @@ -17,7 +17,7 @@ class Node; class Clock; } // namespace rclcpp -namespace nobleo_socketcan_bridge +namespace ros2_socketcan_bridge { class SocketCanBridge { @@ -49,4 +49,4 @@ class SocketCanBridge std::jthread read_thread_; }; -} // namespace nobleo_socketcan_bridge +} // namespace ros2_socketcan_bridge diff --git a/include/nobleo_socketcan_bridge/socketcan_bridge_node.hpp b/include/ros2_socketcan_bridge/socketcan_bridge_node.hpp similarity index 76% rename from include/nobleo_socketcan_bridge/socketcan_bridge_node.hpp rename to include/ros2_socketcan_bridge/socketcan_bridge_node.hpp index 643ff24..170a04e 100644 --- a/include/nobleo_socketcan_bridge/socketcan_bridge_node.hpp +++ b/include/ros2_socketcan_bridge/socketcan_bridge_node.hpp @@ -4,10 +4,10 @@ #pragma once -#include "nobleo_socketcan_bridge/socketcan_bridge.hpp" #include "rclcpp/node.hpp" +#include "ros2_socketcan_bridge/socketcan_bridge.hpp" -namespace nobleo_socketcan_bridge +namespace ros2_socketcan_bridge { class SocketCanBridgeNode : public rclcpp::Node { @@ -19,4 +19,4 @@ class SocketCanBridgeNode : public rclcpp::Node SocketCanBridge bridge; rclcpp::Subscription::SharedPtr can_sub; }; -} // namespace nobleo_socketcan_bridge +} // namespace ros2_socketcan_bridge diff --git a/package.xml b/package.xml index 398a7e2..be6a39b 100644 --- a/package.xml +++ b/package.xml @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 --> - nobleo_socketcan_bridge + ros2_socketcan_bridge 0.0.0 Simple wrapper around SocketCAN Ramon Wijnands diff --git a/src/socketcan_bridge.cpp b/src/socketcan_bridge.cpp index c492338..edaf36a 100644 --- a/src/socketcan_bridge.cpp +++ b/src/socketcan_bridge.cpp @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "nobleo_socketcan_bridge/socketcan_bridge.hpp" +#include "ros2_socketcan_bridge/socketcan_bridge.hpp" #include #include @@ -15,7 +15,7 @@ #include "rclcpp/logging.hpp" -namespace nobleo_socketcan_bridge +namespace ros2_socketcan_bridge { std::ostream & operator<<(std::ostream & os, const can_msgs::msg::Frame & msg) { @@ -117,4 +117,4 @@ void SocketCanBridge::read_loop(std::stop_token stoken) RCLCPP_INFO(logger_, "Read loop stopped"); } -} // namespace nobleo_socketcan_bridge +} // namespace ros2_socketcan_bridge diff --git a/src/socketcan_bridge_ee.cpp b/src/socketcan_bridge_ee.cpp index 3e8dbd1..e5c9f6d 100644 --- a/src/socketcan_bridge_ee.cpp +++ b/src/socketcan_bridge_ee.cpp @@ -2,10 +2,10 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "nobleo_socketcan_bridge/socketcan_bridge_node.hpp" #include "rclcpp/experimental/executors/events_executor/events_executor.hpp" +#include "ros2_socketcan_bridge/socketcan_bridge_node.hpp" -using nobleo_socketcan_bridge::SocketCanBridgeNode; +using ros2_socketcan_bridge::SocketCanBridgeNode; int main(int argc, char * argv[]) { diff --git a/src/socketcan_bridge_node.cpp b/src/socketcan_bridge_node.cpp index f7c8c1f..93e392a 100644 --- a/src/socketcan_bridge_node.cpp +++ b/src/socketcan_bridge_node.cpp @@ -2,11 +2,11 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "nobleo_socketcan_bridge/socketcan_bridge_node.hpp" +#include "ros2_socketcan_bridge/socketcan_bridge_node.hpp" #include -namespace nobleo_socketcan_bridge +namespace ros2_socketcan_bridge { SocketCanBridgeNode::SocketCanBridgeNode(const rclcpp::NodeOptions & options) @@ -21,5 +21,5 @@ SocketCanBridgeNode::SocketCanBridgeNode(const rclcpp::NodeOptions & options) { } -} // namespace nobleo_socketcan_bridge -RCLCPP_COMPONENTS_REGISTER_NODE(nobleo_socketcan_bridge::SocketCanBridgeNode) +} // namespace ros2_socketcan_bridge +RCLCPP_COMPONENTS_REGISTER_NODE(ros2_socketcan_bridge::SocketCanBridgeNode) diff --git a/test/benchmark.launch.xml b/test/benchmark.launch.xml index 3dde09e..c748e27 100644 --- a/test/benchmark.launch.xml +++ b/test/benchmark.launch.xml @@ -9,11 +9,11 @@ SPDX-License-Identifier: Apache-2.0 - + - + diff --git a/test/comparison.launch.xml b/test/comparison.launch.xml index 494f006..2634a24 100644 --- a/test/comparison.launch.xml +++ b/test/comparison.launch.xml @@ -12,7 +12,7 @@ SPDX-License-Identifier: Apache-2.0 - +