Skip to content

Commit

Permalink
Update realsense_node_factory.cpp
Browse files Browse the repository at this point in the history
Fixes #2711
  • Loading branch information
danielhonies authored Apr 25, 2023
1 parent f18ca43 commit 8fab7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion realsense2_camera/src/realsense_node_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void RealSenseNodeFactory::init()
_reconnect_timeout = declare_parameter("reconnect_timeout", 6.0);

// A ROS2 hack: until a better way is found to avoid auto convertion of strings containing only digits to integers:
if (_serial_no.front() == '_') _serial_no = _serial_no.substr(1); // remove '_' prefix
if (!_serial_no.empty() && _serial_no.front() == '_') _serial_no = _serial_no.substr(1); // remove '_' prefix

std::string rosbag_filename(declare_parameter("rosbag_filename", rclcpp::ParameterValue("")).get<rclcpp::PARAMETER_STRING>());
if (!rosbag_filename.empty())
Expand Down

0 comments on commit 8fab7a4

Please sign in to comment.