Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovering from streaming timeout error (question) #27

Closed
digitologist opened this issue Feb 10, 2016 · 9 comments
Closed

Recovering from streaming timeout error (question) #27

digitologist opened this issue Feb 10, 2016 · 9 comments

Comments

@digitologist
Copy link

Running my app with 8 R200s, I found that individual cameras would start throwing timeout errors. The error handling allowed me to recognize and skip the future wait-for-frames call for the affected devices, but I wasn't able to find the correct way to recover the error without restarting the application.

This was a live installation so I didn't have the opportunity to stop & restart the app, let alone unplug/replug the device, so my number of active cameras simply dropped over time.

Is there a correct way to allow for a camera that's not returning frames to be closed, unplugged/replugged, and then recover streaming?

@ddiakopoulos
Copy link
Contributor

For R200 we have a few unpublished commits that let you reset the device after a frame timeout. Ping @sgorsten to push them in the next few days.

@Wollimayer
Copy link

How do you catch the timeout errors? I do use try-catch to wrap the code for wait-for-frames and frame capturing, but it looks like no error is thrown. The programm freezes while waiting for a frame and never gets back.

@ddiakopoulos
Copy link
Contributor

@digitologist do you have a snippit of code to share with @Wollimayer?

@digitologist
Copy link
Author

Here's how I do it:

for (int i = 0; i < deviceCount; ++i) {
    if (deviceAbort[i]) continue;
    try {
        deviceManager[i]->wait_for_frames();
    }
    catch (const rs::error & e) {
        deviceAbort[i] = true;
        cout << "Realsense Error: cam " << i << ": " << e.what() << endl;
    }
}

@Wollimayer
Copy link

@digitologist Thank you. I'm using the same construct right now, but no error is thrown.
It might be a different problem ( issue #29 ).

@ddiakopoulos
Copy link
Contributor

@Wollimayer - can you use one of the other sample apps to print out the firmware versions of each of your F200s?

@Wollimayer
Copy link

2.60.0.0 And two 2.50.0.0 .
The problem occurs on both versions.

@ddiakopoulos
Copy link
Contributor

@Wollimayer will discuss in #29, streaming timeouts and config timeouts are logically different issues.

For streaming timeouts, code on the the current dev branch should be able to reset a device fully at runtime after code like @digitologist detects a timeout.

@ddiakopoulos ddiakopoulos changed the title Recovering from timeout error (question) Recovering from streaming timeout error (question) Feb 13, 2016
furushchev pushed a commit to furushchev/librealsense that referenced this issue Jul 17, 2016
…y-enable-disable-streams

Rar 267 dynamically enable disable streams
@MFUHH
Copy link

MFUHH commented Jun 29, 2017

Hi, I also have problems with timeout of streaming. I can catch the error, stop and start the camera and then the stream is running. But the timestamps then are wrong. the get_frame_timestamp function gives numbers between -3 and 4. Is that a bug? How can I restart the camera properly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants