diff --git a/realsense2_camera/src/ros_sensor.cpp b/realsense2_camera/src/ros_sensor.cpp index 635424d8c5..8156aab9bd 100644 --- a/realsense2_camera/src/ros_sensor.cpp +++ b/realsense2_camera/src/ros_sensor.cpp @@ -153,7 +153,7 @@ void RosSensor::set_sensor_parameter_to_ros(rs2_option option) { std::string module_name = create_graph_resource_name(rs2_to_ros(get_info(RS2_CAMERA_INFO_NAME))); const std::string option_name(module_name + "." + create_graph_resource_name(rs2_option_to_string(option))); - float value = get_option(option); + int value = get_option(option); _params.getParameters()->setRosParamValue(option_name, &value); }