mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
fixed save left && right IR image
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user