-
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
[ERROR] "RuntimeError: Frame didn't arrive within 5000" #6628
Comments
Hi @Kimminsu-94 There was another case of a user of the Python wrapper who also experienced the "Frame didn't arrive within 5000" error and had to unplug and replug the camera to make align_depth2color.py work. They found that the cause was using their own choice of USB cable. Are you using the official short USB cable supplied with the camera or your own choice of cable, please? |
thank you for your advice. is there any other way? |
Do you experience problems when using the camera with non-Python RealSense programs in Ubuntu such as the RealSense Viewer please, or is the problem only with Python programs? |
I did it. but the result is still the same |
If an unplug-replug of the camera corrects the problem but you do not want to have to do that each time that program is used, an alternative may be to insert a hardware_reset() instruction into your script before the pipeline start, so that it resets the camera once when the script launches. Here is some example Python code for doing so: ctx = rs.context() |
import pyrealsense2 as rs
=======================================================================
======================================================================= |
MartyG-RealSense Your advice is very reliable and I am very grateful. But the results are still bad. |
I should emphasise that Pyrealsense2 coding is not one of my advanced skills, so I apologise in advance for any errors. There is an alternative reset script for Pyrealsense2 in the link below: If this script was adapted for the first of the scripts that you posted, then I believe that you could change this line: depth_sensor = profile.get_device().first_depth_sensor() And use these 3 lines instead: device = profile.get_device() So the start of the script, if your original reset code is taken out, may look like this: import pyrealsense2 as rs pipeline = rs.pipeline() config = rs.config() profile = pipeline.start(config) device = profile.get_device() |
Thanks to your advice, there have been some changes. However, a new type of error appears. The process is as follows. Like the previous act, I succeed when I try first. But not from the second. However, I continued to compile and succeeded in the fourth. But this is not perfect either. The result is only one frame, not video output. this is code & ERROR
Depth Scale is: 0.0010000000474974513 Depth Scale is: 0.0010000000474974513 |
In this time, i had run this code several times. and i got this error. Depth Scale is: 0.0010000000474974513 |
Doronhi the RealSense ROS wrapper developer once did an investigation of the possible cause of RuntimeError: Error occurred during execution of the processing block! His conclusion was that it may be related to a problem with the computer hardware having difficulty with handling the processing demand. This may be due to the computer being a lower-specification computer device such as a Raspberry Pi board, or because something is currently putting a heavy load on the computer's CPU and it is busy. |
I read about "IntelRealSense/realsense-ros#652 (comment)".
|
Officially, the RealSense 400 Series cameras are validated to work with any Intel or ARM processor. Unofficially, there have been a few documented cases of the cameras working with AMD Ryzen and Threadripper but the success rate of how well it works may depend upon the particular AMD computer. So although Ryzen 7 is a powerful processor, AMD compatibility with RealSense 400 Series cameras is not as certain as it is with Intel and ARM based computers / computing devices. |
As you said, it was a compatibility issue. I agree. Thanks for the answer. |
Thanks so much for the update! |
This error has made my life miserable. I have tried all the solutions given above. I am trying to run frame_queue_example.py from official repo. I am using D435i realsense camera with NVIDIA Xavier (NX). |
Hi @danial880 If you are able to use the RealSense Viewer program in Ubuntu, would it be possible please to go to the More option at the top of the Viewer's options side-panel and update the camera's firmware driver to the newest 5.12.6 version by selecting Install Recommended Firmware from the More option's drop-down menu? |
For anyone ending up here like me, in a multiprocessing application I was doing:
and I solved it in this way
check the |
Thanks so much @StefanoBerti for sharing your multiprocessing solution with the RealSense community! |
Plug-and-unplug works for me though. Might want to check the solutions below if I no longer want to manually do it. |
@MartyG-RealSense I notice that I get this error when the camera USB cable runs closer to power cables (source of EMI), and if I move the camera USB cable away from any source of EMI, the video feed is proper without this error. Always check if there are any external sources of EMI (like power cables) near the camera USB cable and try to reroute them. |
Hi @svrkrishnavivek The camera hardware should not be affected by an EM field, though the USB cable may be a different matter if it is not sufficiently shielded. |
In my case, this error occurred when I used videocaptur in opencv and wait_for_frames in realsenese together. |
Hi @adrian1875 Did you solve your error or do you still have a problem, please? |
besause of stecking the plug into usb 3.0 port to slow, the sytem considers the interface as USB 2.0. I tried, plug it off, and plug in quickly, it works again. This situation happed several times by me. |
Thanks so much for sharing your experience, @andyhebiao That is correct, a slow insertion instead of a firm, quick insertion motion increases the chances of a USB 2 mis-detection occurring. |
I can also confirm that the problem is due to the cables used.
only the 2 cameras with USB3.0 cables works. Here is the updated code to view multiple depth cameras (RGB & Depth).
|
Thanks so much @ibrahim810 for sharing your experience and your code! There was also a recent case at the link below where a RealSense user had problems with using USB2 with multicam. https://support.intelrealsense.com/hc/en-us/community/posts/19732914930579 |
thank you! I finally solve this problem thank to your advice " plug in quickly" |
Wanted to say this issue for me was caused because I set up an rs.config() object, but I forgot to pass it to pipe.start(). So essentially I had:
Then I tried to read self.data_pipe.wait_for_frames(), and it gave the error. When I made sure to pass in the config data, the error went away |
Thanks so much @hatfield-c for sharing what worked for you! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
Addr = ("librealsense/wrappers/python/examples/align-depth2color.py ")
When i run this code Addr as once, then it works very well. but if i run this code again, then i got a
this error
ERROR MSG = ["RuntimeError: Frame didn't arrive within 5000"]
so... i found some solution. but these are not correct answer.
As i mentioned that these are not fundamental solution. can you tell me how to fix it.
if anybody who can solve this problem, help me plz. thanks.
The text was updated successfully, but these errors were encountered: