From 64abc78ad8a1bafb51d64d76f09689bd9a4e736b Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 10 Jan 2025 16:11:18 +0800 Subject: [PATCH] Namespace, file renaming, copyright Signed-off-by: Luca Della Vedova --- nexus_visualization/CMakeLists.txt | 4 ++-- ...ateVisualizer.cpp => workcell_state_visualizer.cpp} | 7 +++++-- ...ateVisualizer.hpp => workcell_state_visualizer.hpp} | 10 ++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) rename nexus_visualization/src/{WorkcellStateVisualizer.cpp => workcell_state_visualizer.cpp} (97%) rename nexus_visualization/src/{WorkcellStateVisualizer.hpp => workcell_state_visualizer.hpp} (93%) diff --git a/nexus_visualization/CMakeLists.txt b/nexus_visualization/CMakeLists.txt index b434266..a3c2eeb 100644 --- a/nexus_visualization/CMakeLists.txt +++ b/nexus_visualization/CMakeLists.txt @@ -22,7 +22,7 @@ foreach(pkg ${dep_pkgs}) endforeach() #=============================================================================== -add_library(workcell_state_visualizer SHARED src/WorkcellStateVisualizer.cpp) +add_library(workcell_state_visualizer SHARED src/workcell_state_visualizer.cpp) target_link_libraries(workcell_state_visualizer PUBLIC @@ -45,7 +45,7 @@ target_include_directories(workcell_state_visualizer target_compile_features(workcell_state_visualizer INTERFACE cxx_std_17) rclcpp_components_register_node(workcell_state_visualizer - PLUGIN "WorkcellStateVisualizer" + PLUGIN "workcell_state_visualizer" EXECUTABLE workcell_state_visualizer_node) #=============================================================================== diff --git a/nexus_visualization/src/WorkcellStateVisualizer.cpp b/nexus_visualization/src/workcell_state_visualizer.cpp similarity index 97% rename from nexus_visualization/src/WorkcellStateVisualizer.cpp rename to nexus_visualization/src/workcell_state_visualizer.cpp index fbcc11c..b8d4b6e 100644 --- a/nexus_visualization/src/WorkcellStateVisualizer.cpp +++ b/nexus_visualization/src/workcell_state_visualizer.cpp @@ -17,10 +17,12 @@ #include -#include "WorkcellStateVisualizer.hpp" +#include "workcell_state_visualizer.hpp" using namespace std::chrono_literals; +namespace nexus::visualization { + //============================================================================== WorkcellStateVisualizer::WorkcellStateVisualizer(const rclcpp::NodeOptions& options) : Node("workcell_state_visualizer", options), @@ -217,7 +219,8 @@ void WorkcellStateVisualizer::timer_cb() if (!marker_array->markers.empty()) _marker_pub->publish(std::move(marker_array)); } +} #include -RCLCPP_COMPONENTS_REGISTER_NODE(WorkcellStateVisualizer) +RCLCPP_COMPONENTS_REGISTER_NODE(nexus::visualization::WorkcellStateVisualizer) diff --git a/nexus_visualization/src/WorkcellStateVisualizer.hpp b/nexus_visualization/src/workcell_state_visualizer.hpp similarity index 93% rename from nexus_visualization/src/WorkcellStateVisualizer.hpp rename to nexus_visualization/src/workcell_state_visualizer.hpp index e12754f..fb85ebd 100644 --- a/nexus_visualization/src/WorkcellStateVisualizer.hpp +++ b/nexus_visualization/src/workcell_state_visualizer.hpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Open Source Robotics Foundation + * Copyright (C) 2025 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ * */ -#ifndef SRC__WORKCELLSTATEVISUALIZER_HPP -#define SRC__WORKCELLSTATEVISUALIZER_HPP +#ifndef SRC__WORKCELL_STATE_VISUALIZER_HPP +#define SRC__WORKCELL_STATE_VISUALIZER_HPP #include @@ -31,7 +31,8 @@ #include #include -#include + +namespace nexus::visualization { //============================================================================== class WorkcellStateVisualizer : public rclcpp::Node @@ -80,5 +81,6 @@ class WorkcellStateVisualizer : public rclcpp::Node std::unordered_map _workcell_states; }; +} #endif // SRC__WORKCELLSTATEVISUALIZER_HPP