-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
D435i timeouts Python #3460
Comments
Hi @tRosenflanz |
Confirmed that it uses the correct path by doing |
@dorodnic any possible updates? We can try to switch to C++ but I am wondering if the pip version of pyrealsense was not properly updated |
Some more information:
I was fairly sure that this worked fine before but maybe I missed something.
Can you reproduce the same bug on your side? |
Is there any update on this? Can you guys just try to reproduce it with d435i with python and enable all the streams? |
I couldn't get all the streams to open, but I still haven't found the cause |
Hi tRosenflanz, Sorry for coming to this issue late. Also I have no issue with Ubuntu 16.04 as well. Thanks! Attachment(s): |
@RealSenseCustomerSupport Could you share what you needed to modify the code? |
Hi tRosenflanz, You may try this script. And I only saw 1~3 seconds delay printed out. import pyrealsense2 as rs def initialize_camera(): t0 = time.time() try:
finally:
|
The delay you print out is for pipeline starting - there is no issue there (it does take a couple seconds but not a real issue). The problem is in first call to The actual code we use, streams the frames to the .bag file and when we try to open it via realsense viewer it errors on every frame (viewer quickly skips through the file showing white frames) |
Ok, here is what I have for streaming first few frames, with the same script but added time check around wait_for_frames(). 1.51300416946 Can you try it? Thanks! |
I tested the code posted here except updating print to print (..), and I got timeout. 0.49139833450317383 seconds elapsed Given that you used Thanks. |
just fyi, I've just tried it on python 2.7 as well, still got the same time out error. |
After further testing, this appears to be an initialization issue, adding a call to |
I will double check but I have tried p.wait_forframes(1000) before without any luck. Also in the final code we stream to .bag so it starts filling up with corrupted frames right away |
You can grab the recording device from the pipeline profile and pause
recording for the first couple of seconds until the stream stabilizes
|
We confirmed that putting a manual short sleep after pipeline start doesn't solve the issue for us. Did this consistently work on your side or just once? |
Just to reply to what you asked last time: With my test code, off my windows 10, python3 has no issue. Neither for same test off Ubutnu16.04. C:\rs_2.19.1\wrappers\python\examples>python3 d435i_test.py3 Thanks! |
We discovered that specifically 848x480 resolution doesn't work for us (neither 15 nor 30 FPS). It doesn't work in realsense-viewer either, Possibly a camera issue? |
Hi tRosenflanz, Thanks for the update. BTW, do you still have the timeout issue with python? Thanks! |
Yes this is D435i exclusively, with no issues on 2 other D435 we have. FW 5.1.14 and RS 2.20 Issues in both Python and RS with 848x480 depth channel exclusively. All other settings work fine and we have switched D435i to collect in 640x480 for now |
Hi tRosenflanz, Can you run the built-in rs-enumerate-devices tool and share the output? Thanks! |
Firmware is 5.1.4 (not 5.1.14 as I posted before) As before: this is an issue on both Windows and Ubuntu machines (2 different machines, not even dual boot) |
Hi tRosenflanz, Thanks for the update. From the dump, it looks like that there is nothing wrong, and 848x480 is there. ++++++++++++++++++ Stream Profiles supported by Stereo Module What about 848x480 with other frame rate? Thanks! |
Hi tRosenflanz, Wonder if there is any update on this one? Thanks! |
Hi tRosenflanz, Any update on this one? Thanks! |
Apologies for disappearing for a bit. It was hard to find a good 3rd machine to test on. I will update back soon |
Hi: I'm using C++ on windows 10. Below is my setting: Camera Model | D435i And my realsense initialization is as below: when i used the python code provided by RealSenseCustomerSupport, it works. Is their any solution to this? |
Hi r06631001, A quick test from me (by plugging in following lines to the built-in example (rs-capture) with Rs 2.21.0 release) shows that no issue to run it. rs2::config config; Thanks! |
Hi, Thanks a lot! |
Hi r06631001, Thanks for the update and confirming the result off VisualStudio. Thanks! |
Hi r06631001, For issues off Qt, double check again, is it the case that built lib files for python wrapper do NOT work as built lib files for python wrapper off VisutalStudio? Or it is something else? Thanks! |
Hi r06631001, Any updates on this one? Or if you still need help? Thanks! |
I found using python that if I put the imu (accel, gyro) streams in their own pipeline (leaving rgb and depth to share another pipeline) that there was usually no delay, but once in a while it would error on the first frame using the default 5 second timeout. See code in issue 5628 |
I found when I cranked the frame wait time to 100ms for frames after the first frame that is worked well (if it started, which it mostly did), but if I moved the mouse there was a decent chance of it timing out. If it did not move the mouse, all was well. I'm asking for 30 frames per second for image and depth, 63 for accel and 200 for gyro; I'm getting good frame rates. The mouse driver might suck, but it's probably worth noting. |
Hello, I tried your code : import pyrealsense2 as rs def initialize_camera(): pipeline = initialize_camera() try:
finally:
but I get this error: Traceback (most recent call last): File ~\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec File c:\users\nimar\desktop\test.py:25 File c:\users\nimar\desktop\test.py:21 in initialize_camera RuntimeError: Couldn't resolve requests |
Hi @Nimaro76 The error Couldn't resolve requests means that your 'conf' stream configuration instructions are requesting a configuration that the camera is unable to provide. An example of why this may occur is if the camera is being detected as being on a USB 2.1 connection instead of USB 3.2, as USB2 supports a more limited range of resolution and FPS combinations than a USB3 connection. It is likely that it is the IMU frequencies that are causing the problem. The IMU component inside the camera was changed from around April 2022 onwards and the minimum supported Accel rate of that updated IMU is different to the original IMU component. Old cameras: use 63 Accel, 200 gyro If you need the script to be able to work with any D435i model regardless of its age then you could try removing the FPS definition and allow the camera to automatically use the default supported Accel and Gyro minimums of that particular camera.
|
I tried these options but I still have the same error: File c:\users\nimar\desktop\untitled0.py:24 File c:\users\nimar\desktop\untitled0.py:21 in initialize_camera RuntimeError: Couldn't resolve requests |
And the same error occurs if you put the values directly into the conf instructions?
You can test whether the conf instructions are the cause of the error by removing conf from the pipe start instruction so that the script ignores the conf lines and applies the camera's default configuration for the streams instead.
|
my issue got resolved, thank you |
It's great to hear that your issue was resolved, @Nimaro76 - thanks very much for the update! |
@Nimaro76 How did you resolve the issue? I am facing the same problem, I cannot stream IMU with depth and color streams. |
When multiple streams are enabled with gyroscope/acceloremeter, pipeline takes very long time to synchronize frames. If all 3 (depth/color/infrared) are enabled this didn't return for over 5 minutes for me
Both SDK and the apt packages updated.
Returns in 30 seconds.
Related issue it appears: #3108
Works fine in realsense-viewer though
The text was updated successfully, but these errors were encountered: