Skip to content

Commit 339cc06

Browse files
authored
Merge pull request #96 from ros-drivers/lower_rosout_when_fail_to_capture
In order to avoid a log bomb throttle the error/warn prints
2 parents 0339c05 + 118dbc8 commit 339cc06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/video_stream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ virtual void do_capture() {
123123
continue;
124124
}
125125
if (!cap->read(frame)) {
126-
NODELET_ERROR_STREAM("Could not capture frame (frame_counter: " << frame_counter << ")");
126+
NODELET_ERROR_STREAM_THROTTLE(1.0, "Could not capture frame (frame_counter: " << frame_counter << ")");
127127
if (latest_config.reopen_on_read_failure) {
128-
NODELET_WARN("trying to reopen the device");
128+
NODELET_WARN_STREAM_THROTTLE(1.0, "trying to reopen the device");
129129
unsubscribe();
130130
subscribe();
131131
}

0 commit comments

Comments
 (0)