From d2549b1a533239c66bf4bf6241f6aa2d1d5fd556 Mon Sep 17 00:00:00 2001 From: Arun-Prasad-V Date: Wed, 4 Oct 2023 22:55:50 +0530 Subject: [PATCH] Revert 'Updating _camera_name with RS node's name' --- realsense2_camera/src/base_realsense_node.cpp | 3 --- realsense2_camera/src/parameters.cpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/realsense2_camera/src/base_realsense_node.cpp b/realsense2_camera/src/base_realsense_node.cpp index 368d2f10c1..9870d3ac59 100755 --- a/realsense2_camera/src/base_realsense_node.cpp +++ b/realsense2_camera/src/base_realsense_node.cpp @@ -121,9 +121,6 @@ BaseRealSenseNode::BaseRealSenseNode(rclcpp::Node& node, ROS_INFO("Intra-Process communication enabled"); } - // Get node name - _camera_name = _node.get_name(); - initializeFormatsMaps(); _monitor_options = {RS2_OPTION_ASIC_TEMPERATURE, RS2_OPTION_PROJECTOR_TEMPERATURE}; } diff --git a/realsense2_camera/src/parameters.cpp b/realsense2_camera/src/parameters.cpp index 14accf94f0..72523cb801 100644 --- a/realsense2_camera/src/parameters.cpp +++ b/realsense2_camera/src/parameters.cpp @@ -24,6 +24,10 @@ void BaseRealSenseNode::getParameters() std::string param_name; + param_name = std::string("camera_name"); + _camera_name = _parameters->setParam(param_name, "camera"); + _parameters_names.push_back(param_name); + param_name = std::string("publish_tf"); _publish_tf = _parameters->setParam(param_name, PUBLISH_TF); _parameters_names.push_back(param_name);