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

Frame didn't arrived within 5000 #9693

Closed
yuzewang1998 opened this issue Aug 26, 2021 · 5 comments
Closed

Frame didn't arrived within 5000 #9693

yuzewang1998 opened this issue Aug 26, 2021 · 5 comments

Comments

@yuzewang1998
Copy link

yuzewang1998 commented Aug 26, 2021


Required Info
Camera Model D455
Firmware Version 05.12.14.50
Operating System & Version Win10
Platform PC
Language python

Hi team,I developed a project with RealSense D455 .I have learned this tutorial([https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/python-tutorial-1-depth.py]).And I also coded a simple script that can save images:

1
It can also run successfully.And then I want to run the script faster ,so that I append the image into a list first and save the list at end of the code :
2

And it returns the error:
frames = pipeline.wait_for_frames() RuntimeError: Frame didn't arrive within 5000

I try to delete either colorArr.append(color_image) or depthArr.append(depth_image),it can works successfully.It looks like only one List stream can be appended into the memory in the loop.(but two steam can be saved into the disk)

I am aware of other issues about this error (#9417,#9270, #8691, #5181, #2168, #6628, and #927) but none of the proposed solutions have worked for us.So I am looking forward to your suggestion.
Thank you.

@MartyG-RealSense
Copy link
Collaborator

Hi @novasky0709 An approach that a RealSense user took in #4934 (comment) was to save a color PNG using cv2.imwrite (which I see that you do in your own script) and saved the depth data as an .npy file.

Given that most of the depth information is lost when saving the depth stream to PNG image file format, saving an array to .npy may be a useful route to choose if you anticipate needing to retrieve the depth data at a later time after saving.

Another RealSense Python user in #2731 (comment) took the alternative approach of saving depth and color as avi video files.

If you need to be able to save both depth and color as PNG, you could also try separating depth and color into two separate pipelines to see whether that allows both streams to be saved from their respective individual pipeline.

#5628 (comment)

In general - as described in #946 - I would recommend being wary about appending a Python array, as you may encounter a RuntimeError after 15 frames. Using the SDK's Keep() instruction to store frames in memory is a method that can be used to work around this limitation.

@yuzewang1998
Copy link
Author

Hi @MartyG-RealSense ,
Thanks so much for your reply.Your suggestion is useful. I actually encounter a RuntimeError after 15 frames.I will read your answer carefully and reply to you,Thank you.

@MartyG-RealSense
Copy link
Collaborator

Hi @novasky0709 Do you have an update about this case that you can provide, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Hi @novasky0709 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

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

2 participants