IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.53k stars 1.75k forks source link

realsense2_camera node stops working occasionally #2428

Closed robotdream closed 2 years ago

robotdream commented 2 years ago

I met this weird issue when I was testing a vslam algorithm with realsense D455 using the realsense2-ros package.

The following is the output from bringing up rs_camera.launch. It almost always gives warning or error messages as shown below. The weird part is that if the robot is kept still, the node works fine (~12h in a row) without any problems in spite of the error messages. However, when the ground robot moves in a general way that I assume will introduce some vibrations and more computational cost from localization and navigation nodes, the camera node fails to stream image data occasionally.

This might be caused by usb cable connection, usb cable length, or any issues with the realsense node? Any suggestions would be appreciated. Thanks.

Environment setting: ubuntu 16.04 LTS,ros1 kinetic

executed command and output: roslaunch realsense2_camera rs_camera.launch ... logging to /home/jw/.ros/log/2f08cb20-0d4f-11ed-a20e-00e75c682c66/roslaunch-jw-Default-string-16079.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.100.11:42993/

SUMMARY

PARAMETERS

NODES /camera/ realsense2_camera (nodelet/nodelet) realsense2_camera_manager (nodelet/nodelet)

ROS_MASTER_URI=http://192.168.100.11:11311

process[camera/realsense2_camera_manager-1]: started with pid [16096] process[camera/realsense2_camera-2]: started with pid [16097] [ INFO] [1658904722.128149030]: Initializing nodelet with 4 worker threads. [ INFO] [1658904722.175622211]: RealSense ROS v2.3.0 [ INFO] [1658904722.175650594]: Built with LibRealSense v2.45.0 [ INFO] [1658904722.175668710]: Running with LibRealSense v2.45.0 [ INFO] [1658904722.204355394]:
[ INFO] [1658904722.532494824]: Device with serial number 151422254849 was found.

[ INFO] [1658904722.532547088]: Device with physical ID 2-4.1-13 was found. [ INFO] [1658904722.532575224]: Device with name Intel RealSense D455 was found. [ INFO] [1658904722.533651477]: Device with port number 2-4.1 was found. [ INFO] [1658904722.533743489]: Device USB type: 3.2 [ INFO] [1658904722.533815513]: Resetting device... [ INFO] [1658904728.592074283]:
[ INFO] [1658904728.763248414]: Device with serial number 151422254849 was found.

[ INFO] [1658904728.763290051]: Device with physical ID 2-4.1-14 was found. [ INFO] [1658904728.763314519]: Device with name Intel RealSense D455 was found. [ INFO] [1658904728.763856055]: Device with port number 2-4.1 was found. [ INFO] [1658904728.763887244]: Device USB type: 3.2

[ INFO] [1658904728.898468949]: JSON file is not provided [ INFO] [1658904728.898499672]: ROS Node Namespace: camera [ INFO] [1658904728.898547175]: Device Name: Intel RealSense D455 [ INFO] [1658904728.898566754]: Device Serial No: 151422254849 [ INFO] [1658904728.898590485]: Device physical port: 2-4.1-14 [ INFO] [1658904728.898613210]: Device FW version: 05.12.07.150 [ INFO] [1658904728.898636147]: Device Product ID: 0x0B5C [ INFO] [1658904728.898655168]: Enable PointCloud: Off [ INFO] [1658904728.898672319]: Align Depth: On [ INFO] [1658904728.898690244]: Sync Mode: On [ INFO] [1658904728.898757201]: Device Sensors: [ INFO] [1658904728.918467825]: Stereo Module was found. [ INFO] [1658904728.939643467]: RGB Camera was found. [ INFO] [1658904728.939986001]: Motion Module was found. [ INFO] [1658904728.940047319]: (Confidence, 0) sensor isn't supported by current device! -- Skipping... [ INFO] [1658904728.940616981]: num_filters: 1 [ INFO] [1658904728.940665360]: Setting Dynamic reconfig parameters. [ INFO] [1658904729.437551670]: Done Setting Dynamic reconfig parameters. [ INFO] [1658904729.438213652]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16 [ INFO] [1658904729.439945426]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8

[ INFO] [1658904729.450683294]: Expected frequency for depth = 30.00000 [ INFO] [1658904729.505132005]: Expected frequency for color = 30.00000 [ INFO] [1658904729.552237477]: Expected frequency for aligned_depth_to_color = 30.00000

[ INFO] [1658904729.630202710]: insert Depth to Stereo Module [ INFO] [1658904729.630298023]: insert Color to RGB Camera [ INFO] [1658904729.701127541]: SELECTED BASE:Depth, 0 [ INFO] [1658904729.722378992]: RealSense Node Is Up! [ WARN] [1658904729.819533271]: 27/07 14:52:09,820 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:09,870 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,021 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,094 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,146 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,196 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,248 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,298 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,449 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 14:52:10,499 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 27/07 15:23:30,416 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:43,246 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:43,297 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:44,347 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:44,398 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:50,450 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:50,500 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:55,554 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:55,604 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:56,661 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:56,711 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:46:57,612 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:46:58,613 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:46:59,615 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:47:44,784 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:08,017 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:11,068 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:11,119 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:13,172 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:13,222 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:16,273 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:16,323 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:19,374 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:19,424 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:41,484 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:54:41,534 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:55:17,601 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:55:17,651 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Resource temporarily unavailable, number: b 27/07 15:55:20,707 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:55:24,906 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:55:25,906 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:55:26,906 ERROR [140699630561024] (ds5-options.cpp:88) Asic Temperature value is not valid! 27/07 15:57:27,825 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 15:57:27,876 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 18:35:35,940 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 19:03:00,882 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 19:03:00,932 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 27/07 19:37:47,952 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 02:39:16,835 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:05,712 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:11,772 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:11,822 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:12,872 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:12,922 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:28,980 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:29,031 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:32,516 ERROR [140699930846976] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130 28/07 08:27:33,087 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:48,143 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:48,194 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:52,834 ERROR [140699930846976] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130 28/07 08:27:53,245 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:27:54,412 ERROR [140699974498048] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132 28/07 08:28:00,740 ERROR [140699974498048] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132 28/07 08:28:04,163 ERROR [140699930846976] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130 28/07 08:28:05,303 WARNING [140700167431936] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 28/07 08:28:26,726 ERROR [140699974498048] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132

MartyG-RealSense commented 2 years ago

Hi @robotdream If the camera is functioning normally when the robot is still then I would not expect cable length to be a factor in the problem, as the data will be travelling along the same cable length and at the same resolution / FPS speed no matter whether the robot is stationary or in motion.

The stereo depth algorithm of RealSense 400 Series cameras is robust against vibration, so it would take severe vibration such as travelling over rough agricultural land or being attached to a robot / drone that was transmitting vibration through its body framework to have a negative effect on the camera.

If the cable is moving around and bending during robot motion then the connector may move in the USB port and cause a temporary disconnection. Using a USB cable with a screw-lock connector to firmly fix the micro-sized end of the cable into the side of the camera may help to avoid this.

image

robotdream commented 2 years ago

Thanks for the timely replay, @MartyG-RealSense. I did use a cable with a screw-lock connector similar to the one in the left figure when I was doing the tests. Considering your response, now I think the problem might be caused by the USB side connected to the PC. I am also wondering if it is necessary to use an official cable from Intel Realsense or a similar cable from a third-party manufacturer should also work. Thanks!

MartyG-RealSense commented 2 years ago

Third-party cables can be used with RealSense cameras. If the cable is 2 meters or longer then it is important that the cable is high quality due to the high volume of data typically transmitted along the cable by the camera, otherwise degraded performance or disconnections may occur.

Newnex are a company that supply RealSense-validated industrial grade USB equipment.

https://www.newnex.com/realsense-3d-camera-connectivity.php

https://www.youtube.com/watch?v=GLQgR1jT04M

Another brand of cable that has been recommend by RealSense users in the past is OCP.

https://www.ocp.com/product/usb-3-0-3-1-cable-type-c-to-a-gen1-5g-black-intel-d435-realsense-camera-62-00214/

robotdream commented 2 years ago

Thanks! The cable I used was about 4m or even longer. Will try another cable and see if it will work.

MartyG-RealSense commented 2 years ago

Hi @robotdream Have you been able to test with another cable yet, please? Thanks!

robotdream commented 2 years ago

Hi @MartyG-RealSense, I changed to a shorter cable but the issue still happened occasionally. Have changed to the cable that came with the realsense cam and will do more tests and see if it was a cable issue. Thanks!

MartyG-RealSense commented 2 years ago

Thanks very much for the update. I look forward to your next test results. Good luck!

MartyG-RealSense commented 2 years ago

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

MartyG-RealSense commented 2 years ago

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

MartyG-RealSense commented 2 years ago

Case closed due to no further comments received.