fixed save left && right IR image

This commit is contained in:
Joe Dong
2023-09-11 17:57:02 +08:00
parent 25cd828076
commit a95389721b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -940,7 +940,8 @@ void OBCameraNode::saveImageToFile(const stream_index_pair &stream_index, const
auto image_to_save =
cv_bridge::toCvCopy(image_msg, sensor_msgs::image_encodings::BGR8)->image;
cv::imwrite(filename, image_to_save);
} else if (stream_index.first == OB_STREAM_IR) {
} else if (stream_index.first == OB_STREAM_IR || stream_index.first == OB_STREAM_IR_LEFT ||
stream_index.first == OB_STREAM_IR_RIGHT) {
cv::imwrite(filename, image);
} else {
RCLCPP_ERROR_STREAM(logger_, "Unsupported stream type: " << stream_index.first);
+1 -1
View File
@@ -146,7 +146,7 @@ OBLogSeverity OBCameraNodeDriver::obLogSeverityFromString(const std::string_view
void OBCameraNodeDriver::checkConnectTimer() {
if (!device_connected_.load()) {
RCLCPP_ERROR_STREAM(logger_,
RCLCPP_DEBUG_STREAM(logger_,
"checkConnectTimer: device " << serial_number_ << " not connected");
return;
} else if (!ob_camera_node_) {