diff --git a/realsense2_camera/src/base_realsense_node.cpp b/realsense2_camera/src/base_realsense_node.cpp index 9870d3ac59..368d2f10c1 100755 --- a/realsense2_camera/src/base_realsense_node.cpp +++ b/realsense2_camera/src/base_realsense_node.cpp @@ -121,6 +121,9 @@ 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 42b823f3ac..14accf94f0 100644 --- a/realsense2_camera/src/parameters.cpp +++ b/realsense2_camera/src/parameters.cpp @@ -23,9 +23,6 @@ void BaseRealSenseNode::getParameters() ROS_INFO("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);