Realsense D435: "RuntimeError: Frame didn't arrive within 5000"
Hi,
I use RealSense D435 on an AGV for environment recognition.
When the AGV is runnning and there is an impact, the camera stream sometimes freezes and I get a this error,
ERROR MSG = ["RuntimeError: Frame didn't arrive within 5000"]
At this time, the camera stream cannot be restarted unless the RealSense Type-C connector is replugged and the program is restarted.
When this error occurred, I checked the usb connection list on the PC by “lsusb -t” and found that the real RealSense was unmounted. However, during the stream, forcibly releasing the RealSense USB connection with the Linux command did not cause the same symptoms, and the stream resumed automatically.
I would like to resume streaming without unplugging and replugging.
if anybody who can solve this problem, help me please. thanks.
- Operating System & Version : Ubuntu 18.04 LTS
- Platform : PC
- SDK : pyrealsense2
- Language : python
-
Hi Yuya Okada
If the RealSense SDK stops receiving new frames from the camera because of a disconnection then streaming will resume automatically if re-connection occurs within 5 seconds. If a new frame is not received for 5 seconds then the program time-outs and the error RuntimeError: Frame didn't arrive within 5000 is generated..
When cameras are attached to mobile robots or vehicles, motion may cause the camera's USB cable to move in the USB port and cause disconnection. Use of a USB cable with screw-locks on its connector can help to avoid this. On the micro-sized USB port on the side of the camera there are a pair of small holes either side of the port for receiving screw-lock threads.
In mobile applications where the vehicle that the camera is attached to is traversing rough terrain, such as agricultural land, using vibration dampening pads on the camera mounting point may help to dampen severe vibration.
-
Hi MartyG,
Thank you for your solution to my problem.
I will try to use USB cable with screw-locks.
I have an additional question.
If that error occurs, is it possible to resume the camera stream by executing pyrealsense2 or LINUX commands?
I am considering a command-based recovery when this error occurs and have tried various methods, but have not been successful.
If you know of a solution, please let me know.
-
A couple of possible approaches are to reset the entire USB port with an Ubuntu bash script such as 'usbreset', or to initiate a reset of the camera specifically if the RuntimeError occurs. Both approaches are discussed for Python at the link below.
Please sign in to leave a comment.
Comments
3 comments