IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.53k stars 4.81k forks source link

"Frames didn’t arrive within 5 seconds" – Intermittent Issue with RealSense Camera on Linux #13365

Open nurietarc opened 4 hours ago

nurietarc commented 4 hours ago
Required Info
Camera Model D455
Firmware Version 2.55.1
Operating System & Version Linux (Ubuntu 22.04.5)
Kernel Version (Linux Only) 6.5.0-44-generic / 6.8.-44 (see explanation)
Platform PC (Thinkpad L390)
SDK Version Intel® RealSense™ SDK 2.0
Language ROS2 Humble
Segment Robotics

Context

I am using the Intel RealSense camera for robotics applications and trying to implement the ROS Wrapper for Intel (link here) but having issues getting it to work.

Steps followed and errors (and how to reproduce them)

Attempt 1:

Attempt 3:

uvcvideo.ko: Running module version sanity check.

videodev.ko: Running module version sanity check.

uvc.ko: Running module version sanity check.

depmod.... Building initial module for 6.8.0-44-generic Error! The /var/lib/dkms/librealsense2-dkms/1.3.27/6.8.0-44-generic/x86_64/dkms.conf for module librealsense2-dkms includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch. The /var/lib/dkms/librealsense2-dkms/1.3.27/6.8.0-44-generic/x86_64/dkms.conf for module librealsense2-dkms includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. Skipped.

Loading the modified modules into kernel... complete Current status: librealsense2-dkms/1.3.27, 6.5.0-44-generic, x86_64: installed mod: videodev version: realsense-1.3.27 mod: uvcvideo version: 1.1.1-realsense-1.3.27 mod: uvc version: realsense-1.3.27



## Tests on other machines
* The issue with the RealSense Viewer does not occur when connecting the camera to the RealSense Viewer on Windows using the same cable.
* The issue with the RealSense Viewer does not occur when connecting the camera to the RealSense Viewer on a desktop running Ubuntu (without ROS) using the same cable with the following specs:

| Required Info                         |                                                                |
|---------------------------------|------------------------------------------- |
| Firmware Version                   | 2.55.1 | 
| Operating System & Version |   Linux (Ubuntu 22.04.5)  | 
| Kernel Version (Linux Only)    | 6.8                                   | 
| Platform                                 | Intel Core i7-7700 CPU |
| SDK Version                            |  Intel® RealSense™ SDK 2.0  | 

* The issue does not occur on another ThinkPad L390 with the same specifications, even though the kernel version (6.8.0-44) is theoretically incompatible. Installation was done using Option 1 for the SDK and Option 2 for the wrapper.
* The issue with ROS2 does occur on another ThinkPad L390 with the same specifications (kernel 6.8.0-44, which is theoretically incompatible). Installation was done using Option 2 for the SDK (without the RealSense Viewer) and Option 2 for the wrapper.
* This same camera worked on another machine around 3–4 months ago, which I no longer have access to. The setup involved Ubuntu, the SDK, and the ROS2 wrapper, but occasionally experienced the same or similar transport errors that could be fixed by changing cables, reconnecting the camera, or restarting ROS2. It did not have any issues with the RealSense Viewer.

### Prior attempts to resolve the issue
* Tried different cables of varying quality to rule out cable issues, as suggested in various issues, but the error persists.
* The laptop (ThinkPad L390) has USB 3.1 ports on the motherboard.
* Updated the camera firmware as recommended in the RealSense Viewer. The same error occurred before and after the firmware update.
* Lowered the frame rate and resolution of the camera to reduce the data load.
* Uninstalled and reinstalled the SDK and wrapper several times.
* Attempted to install the SDK following the backend installation tutorial (link [here](https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md)), but the same errors occurred.
* Tried launching the node with the` initial_reset` parameter.

## The problem
Even though the camera works on some machines, we cannot pinpoint the root cause of the issue or why the error occurs intermittently between different computers, and even on the same machines, where it may "magically" stop working after a few days without any apparent reason. This makes the camera unreliable for robotics applications, as we never know when the next unexpected error might appear. Any suggestions?

Many thanks!
MartyG-RealSense commented 3 hours ago

Hi @nurietarc The error Failed to read busnum/devnum is a very rare one. Usually when it has occurred, it has been related to a problem in the USB system, such as insufficient power being provided to the camera by the USB port to meet its power-draw needs.

Frames didn't arrived within 5 seconds would also suggest that new camera frames have stopped arriving at the computer from the USB port.

RealSense 400 Series cameras can run indefinitely so long as they remain within recommended operating temperature tolerances (not more than 35 degrees C internal temperature and not less than 0 degrees C).

If a problem does occur in a long-run session (3 to 4 days before the problem occurs), it is likely to be related to the computer hardware, its operating system or the USB hardware (port / hub / controller / cable) rather than a fault with the camera hardware.

If a computer has a USB power-saving plan set then I would recommend disabling that to ensure that there is not a situation where the computer may reduce USB port power and make the camera unable to operate.