Skip to content

Commit

Permalink
getting camera_name dynamically in ROS2 wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-Prasad-V committed Sep 11, 2023
1 parent fd9a686 commit b958ca1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,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};
}
Expand Down
3 changes: 0 additions & 3 deletions realsense2_camera/src/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ void BaseRealSenseNode::getParameters()
ROS_INFO("getParameters...");

std::string param_name;
param_name = std::string("camera_name");
_camera_name = _parameters->setParam<std::string>(param_name, "camera");
_parameters_names.push_back(param_name);

param_name = std::string("publish_tf");
_publish_tf = _parameters->setParam<bool>(param_name, PUBLISH_TF);
Expand Down

0 comments on commit b958ca1

Please sign in to comment.