Open BryanBetancur opened 2 weeks ago
Hi @BryanBetancur Does it make a difference if you add initial_reset:=true to the launch instruction to reset the camera at launch, please?
Thanks for your quick response, I will check it during the day.
It continues happening with the initial_reset:=true. Last time I got:
[nav_top-3] [INFO] [1730996836.209927038] [gary.cameras.nav_top]: Starting Sensor: RGB Camera
[nav_top-3] [INFO] [1730996836.426728644] [gary.cameras.nav_top]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 15
[nav_top-3] 07/11 16:27:16,726 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:27:16,737 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:27:16,752 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:27:17,647 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:28:07,483 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:29:08,795 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:32:05,723 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:32:21,334 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:33:02,965 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:34:43,170 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:35:13,259 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:35:45,483 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:39:41,320 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:40:24,819 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:40:36,028 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:40:50,571 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:41:48,746 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] [INFO] [1730997726.231472188] [gary.cameras.nav_top]: Stopping Sensor: RGB Camera
[nav_top-3] [INFO] [1730997726.231711840] [gary.cameras.nav_top]: Stop Sensor: RGB Camera
[nav_top-3] [INFO] [1730997726.231785729] [gary.cameras.nav_top]: Close Sensor.
[nav_top-3] [INFO] [1730997727.742850137] [gary.cameras.nav_top]: Close Sensor - Done.
[nav_top-3] [INFO] [1730997870.889564946] [gary.cameras.nav_top]: Stopping Sensor: RGB Camera
[nav_top-3] [INFO] [1730997870.910164796] [gary.cameras.nav_top]: Starting Sensor: RGB Camera
[nav_top-3] [INFO] [1730997871.131990332] [gary.cameras.nav_top]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 15
[nav_top-3] 07/11 16:44:31,462 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:45:51,873 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:46:40,175 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:46:58,256 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:49:19,627 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:50:47,689 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:54:45,862 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:54:50,331 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] 07/11 16:56:40,144 WARNING [281471604476208] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[nav_top-3] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[LAUNCH ERROR] [nav_top-3.launch]: process has died [pid 45381, exit code -11, cmd '/robot/additional_ros_packages/install/lib/realsense2_camera/realsense2_camera_node --ros-args -r __node:=nav_top -r __ns:=/gary/cameras --params-file /robot/build/ros_pkgs/install/gary_cameras/share/gary_cameras/config/gary_cameras.yaml --params-file /robot/config/general.config.yaml --params-file /robot/config/cameras/cameras.config.yaml -r /gary/cameras/nav_top/depth/color/points:=/gary/cameras/nav_top/points'].
[LAUNCH WARNING] [nav_top-3.launch]: Respawning...
[LAUNCH INFO] [nav_top-3.launch]: process started with pid [888226]
[nav_top-3] [INFO] [1730998749.335814170] [gary.cameras.nav_top]: RealSense ROS v4.56.3
[nav_top-3] [INFO] [1730998749.338386067] [gary.cameras.nav_top]: Built with LibRealSense v2.56.3
[nav_top-3] [INFO] [1730998749.338562839] [gary.cameras.nav_top]: Running with LibRealSense v2.56.3
[nav_top-3] [INFO] [1730998750.462962969] [gary.cameras.nav_top]: Device with serial number 046222070575 was found.
[nav_top-3] [INFO] [1730998750.463121884] [gary.cameras.nav_top]: Device with physical ID 2-1.3-11 was found.
[nav_top-3] [INFO] [1730998750.463157501] [gary.cameras.nav_top]: Device with name Intel RealSense D435I was found.
[nav_top-3] [INFO] [1730998750.466836430] [gary.cameras.nav_top]: Device with port number 2-1.3 was found.
[nav_top-3] [INFO] [1730998751.710910016] [gary.cameras.nav_top]: Device with serial number 207122078101 was found.
[nav_top-3] [INFO] [1730998751.712142843] [gary.cameras.nav_top]: Device with physical ID 2-3.2-10 was found.
[nav_top-3] [INFO] [1730998751.713234099] [gary.cameras.nav_top]: Device with name Intel RealSense D435I was found.
[nav_top-3] [INFO] [1730998751.718102365] [gary.cameras.nav_top]: Device with port number 2-3.2 was found.
[nav_top-3] [INFO] [1730998751.719703264] [gary.cameras.nav_top]: Device USB type: 3.2
[nav_top-3] [INFO] [1730998751.721035677] [gary.cameras.nav_top]: Resetting device...
[nav_top-3] [INFO] [1730998758.550678620] [gary.cameras.nav_top]: Device with serial number 046222070575 was found.
[nav_top-3] [INFO] [1730998758.550825727] [gary.cameras.nav_top]: Device with physical ID 2-1.3-11 was found.
[nav_top-3] [INFO] [1730998758.550865632] [gary.cameras.nav_top]: Device with name Intel RealSense D435I was found.
[nav_top-3] [INFO] [1730998758.554860439] [gary.cameras.nav_top]: Device with port number 2-1.3 was found.
[nav_top-3] [INFO] [1730998759.347111553] [gary.cameras.nav_top]: Device with serial number 207122078101 was found.
[nav_top-3] [INFO] [1730998759.347268996] [gary.cameras.nav_top]: Device with physical ID 2-3.2-10 was found.
[nav_top-3] [INFO] [1730998759.347303685] [gary.cameras.nav_top]: Device with name Intel RealSense D435I was found.
[nav_top-3] [INFO] [1730998759.350680462] [gary.cameras.nav_top]: Device with port number 2-3.2 was found.
[nav_top-3] [INFO] [1730998759.350794833] [gary.cameras.nav_top]: Device USB type: 3.2
[nav_top-3] [INFO] [1730998760.011321788] [gary.cameras.nav_top]: getParameters...
[nav_top-3] [INFO] [1730998760.147916863] [gary.cameras.nav_top]: JSON file is not provided
[nav_top-3] [INFO] [1730998760.149199131] [gary.cameras.nav_top]: Device Name: Intel RealSense D435I
[nav_top-3] [INFO] [1730998760.149958955] [gary.cameras.nav_top]: Device Serial No: 207122078101
[nav_top-3] [INFO] [1730998760.150022061] [gary.cameras.nav_top]: Device physical port: 2-3.2-10
[nav_top-3] [INFO] [1730998760.150052333] [gary.cameras.nav_top]: Device FW version: 5.16.0.1
[nav_top-3] [INFO] [1730998760.150076078] [gary.cameras.nav_top]: Device Product ID: 0x0B3A
[nav_top-3] [INFO] [1730998760.150100206] [gary.cameras.nav_top]: Sync Mode: Off
[nav_top-3] [WARN] [1730998765.241663287] [gary.cameras.nav_top]: re-enable the stream for the change to take effect.
[nav_top-3] [WARN] [1730998765.250972098] [gary.cameras.nav_top]: re-enable the stream for the change to take effect.
[nav_top-3] [WARN] [1730998766.110442700] [gary.cameras.nav_top]: re-enable the stream for the change to take effect.
[nav_top-3] [INFO] [1730998766.333801798] [gary.cameras.nav_top]: Stopping Sensor: RGB Camera
[nav_top-3] [INFO] [1730998766.425976218] [gary.cameras.nav_top]: Starting Sensor: RGB Camera
[nav_top-3] [INFO] [1730998766.481471697] [gary.cameras.nav_top]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 15
[nav_top-3] [INFO] [1730998766.550470829] [gary.cameras.nav_top]: RealSense Node Is Up!
Would it be possible for you to check Ubuntu's htop system monitoring tool to see whether the available memory capacity of the computer reduces after each start-stop? If it does then this is called a 'memory leak' and once enough of the memory has been consumed then a program can become unstable or freeze / exit.
Hi Marty,
I replicated the issue while monitoring the memory and CPU usage of the container where the cameras are running. Here are the results:
Memory usage remains relatively stable overall, with the exception of a noticeable spike at 10:36:14. The blue arrow indicates the exact moment when the node crashes, showing the error: libusb: debug [libusb_submit_transfer] transfer 0xffff3939c848.
In this test, I was enabling and disabling the color, depth, and point cloud sensors of two cameras simultaneously. Could the simultaneous access of both cameras to the USB be causing this issue?
Any insights you have on this would be very helpful.
Thanks!
Are the cameras plugged into USB ports on the computer or plugged into a USB hub? The ports on a computer should have individual USB controllers for each port. On a hub though, a single USB controller might be processing two of the hub's ports simultaneously.
I initially had both cameras connected to a USB hub, but I also tested connecting them directly to the Jetson, carefully selecting ports to avoid internal Jetson hubs. Unfortunately, the issue still occurs under both setups.
Additionally, I tried connecting only one camera. While this setup took longer to fail, the issue eventually reappeared.
As another test, I activated the color, depth, and point cloud streams for one camera without performing continuous stop/start cycles—simply enabling them once and leaving them active. Even in this configuration, the problem reemerged after several hours with the difference of after the node respawn the camera doesn't stream correctly, the node shows the prints of the sensor starts but never send frames.
Let me know if there are any other troubleshooting steps I should try.
Does the launch have less problems if you use ros2 run instead of ros2 launch?
ros2 run realsense2_camera realsense2_camera_node --ros-args -p pointcloud.enable:=true
Hi Marty,
It seems the issue is related to setting parameters. I conducted the following tests:
First Test:
false
After the nodes launched successfully, I enabled the three sensors by setting parameters (color, depth, and pointcloud).Second Test:
true
from the start.It appears that the issue might be triggered by enabling the sensors dynamically, rather than having them set to true
from the beginning. Let me know if you need further details on the setup or if there’s anything else you'd like me to try.
I do not have further suggestions of things to try. If your project allows you to set the sensors to true from the start instead of changing them dynamically during runtime and it works for you then I would certainly recommend continuing with that method.
Hello
Issue Description
After enabling and disabling the camera multiple times, the following errors occur randomly, causing the node to crash and subsequently respawn. I've documented three different cases (but all related with libusb), which I'll outline below: