Skip to content

Commit f2b781b

Browse files
image_view: sleep if no new image (backport #1082) (#1083)
Possible fix for #1060<hr>This is an automatic backport of pull request #1082 done by [Mergify](https://mergify.com). Co-authored-by: Michael Ferguson <[email protected]>
1 parent d840667 commit f2b781b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

image_view/src/image_view_node.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ void ImageViewNode::windowThread()
296296
cv::imshow(window_name_, image->image);
297297
shown_image_.set(image);
298298
cv::waitKey(1);
299+
} else {
300+
rclcpp::sleep_for(std::chrono::milliseconds(20));
299301
}
300302
}
301303

0 commit comments

Comments
 (0)