Skip to content

Commit

Permalink
Fixed: invalid module name format for ROS (IntelRealSense#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-wong authored and doronhi committed Dec 17, 2018
1 parent eb46122 commit 06122e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions realsense2_camera/src/base_realsense_node.cpp
Expand Up @@ -257,6 +257,7 @@ void BaseRealSenseNode::registerDynamicReconfigCb(ros::NodeHandle& nh)
for(rs2::sensor sensor : _dev_sensors)
{
std::string module_name = sensor.get_info(RS2_CAMERA_INFO_NAME);
std::replace( module_name.begin(), module_name.end(), '-', '_');
std::replace( module_name.begin(), module_name.end(), ' ', '_'); // replace all ' ' to '_'
ROS_DEBUG_STREAM("module_name:" << module_name);
registerDynamicOption(nh, sensor, module_name);
Expand Down

0 comments on commit 06122e0

Please sign in to comment.