turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
96 stars 43 forks source link

OAK-D Camera Works Intermittently #110

Closed 4DJR closed 11 months ago

4DJR commented 1 year ago

Please provide the following information: OS Image: Using Ubuntu 20.04 ROS2 Galactic Turtlebot4 Lite image (0.1.3) provided from http://download.ros.org/downloads/turtlebot4/

Expected behaviour I am expecting the OAK-D camera to display the image when runnning Rviz2

Actual behaviour Sometimes the camera will work normally when the Turtlebot is initially turned on and I can see the image without issue. However, eventually the camera will stop displaying the image and even after unplugging and plugging it back in it does not return. Sometimes it also does not show up when the Turtlebot is initially turned on. It just seems like it works unreliably. I have tried using the provided camera cable and also several others with no improvement.

Any idea why the camera won't stay on as expected? How can this be fixed?

Thanks.

roni-kreinin commented 1 year ago

Can you call sudo journalctl -u turtlebot4 -r and see if the oakd node is showing any errors?

4DJR commented 1 year ago

So I rebooted the turtlebot this morning and everything was mostly working fine. I could see the image using the camera display in rviz, however, I could not see the image when using the image display. Now, later in the day, the camera is not working at all. Using that command you suggested I can see something regarding the rgb_stereo node but it looks like it's just defaulting to a different value and doesn't seem like it's crashing. Here's the output of "sudo journalctl -u turtlebot4 -r" since the last reboot when the camera display stopped showing anything:

Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [rgb_stereo_node-5] [1844301031E2E80F00] [1.1.2] [40.865] [MonoCamera(0)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [rgb_stereo_node-5] [1844301031E2E80F00] [1.1.2] [40.864] [MonoCamera(1)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.384952407] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.384933472] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Mouse'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.384859178] [GenericAnalyzer]: Analyzer 'Mouse' matches 'turtlebot4_diagnostics: /mouse topic status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.383183705] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.383163899] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'IMU'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.383081083] [GenericAnalyzer]: Analyzer 'IMU' matches 'turtlebot4_diagnostics: /imu topic status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.381057909] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer 'Camera'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.380978205] [GenericAnalyzer]: Analyzer 'Camera' matches 'turtlebot4_diagnostics: /color/preview/image topic status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.379311644] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer 'Camera'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.379240962] [GenericAnalyzer]: Analyzer 'Camera' matches 'turtlebot4_diagnostics: /stereo/depth topic status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.377520431] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer 'Lidar'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.377439838] [GenericAnalyzer]: Analyzer 'Lidar' matches 'turtlebot4_diagnostics: /scan topic status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.375495850] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.375473506] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Hazards'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.375396062] [GenericAnalyzer]: Analyzer 'Hazards' matches 'turtlebot4_diagnostics: Hazard Detections'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.374273257] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.374250931] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Dock'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.374166021] [GenericAnalyzer]: Analyzer 'Dock' matches 'turtlebot4_diagnostics: Dock Status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.372234076] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.372217401] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Wheels'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.372147850] [GenericAnalyzer]: Analyzer 'Wheels' matches 'turtlebot4_diagnostics: Wheel Status'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.371875592] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.371850525] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Battery'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.371773433] [GenericAnalyzer]: Analyzer 'Battery' matches 'turtlebot4_diagnostics: Battery Voltage'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.368274288] [AnalyzerGroup]: Group 'Turtlebot4' has a match with my analyzer '/Turtlebot4/Create3'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.368242403] [AnalyzerGroup]: Group '/Turtlebot4/Create3' has a match with my analyzer 'Battery'. Feb 15 22:39:54 ubuntu turtlebot4-start[1359]: [aggregator_node-2] [INFO] [1676500794.368125144] [GenericAnalyzer]: Analyzer 'Battery' matches 'turtlebot4_diagnostics: Battery Percentage'. Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.630001402] [rplidar_composition]: current scan mode: Sensitivity, max_distance: 12.0 m, Point number: 7.9K , angle_compensate: 2, flip_x_axis 0 Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.087072134] [rplidar_composition]: Start Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.086929116] [rplidar_composition]: RPLidar health status : '0' Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.085455319] [rplidar_composition]: Hardware Rev: 7 Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.085413602] [rplidar_composition]: Firmware Ver: 1.29 Feb 15 22:39:50 ubuntu turtlebot4-start[1359]: [rplidar_composition-4] [INFO] [1676500790.085257165] [rplidar_composition]: RPLIDAR S/N: DB90EDF9C7E29BD1A7E39EF24B43431B -- Reboot --

roni-kreinin commented 1 year ago

The camera display is the correct one to use in RViz.

Can you try restarting the turtlebot4 service by calling sudo systemctl restart turtlebot4 when the camera dies?

Fran-FC commented 1 year ago

I use the latest packages and Ros Humble.

Hello, I don't know if it is a common issue but I have a problem with the stereo depth camera. I am able to visualize the rgb image of the oakd but not the stereo image.

The journalctl output is the following:

May 16 10:50:17 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234217.187016479] [turtlebot4_node]:
May 16 10:50:17 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234217.186865463] [turtlebot4_node]: oakd/start_camera service got results: Success
May 16 10:50:17 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234217.163598715] [oakd]: Camera ready!
May 16 10:50:16 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234216.931298612] [oakd]: Finished setting up pipeline.
May 16 10:50:16 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234216.925024997] [oakd]: Pipeline type: RGB
May 16 10:50:16 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234216.917032135] [oakd]: Device type: OAK-D-PRO-AF
May 16 10:50:16 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234216.894643797] [oakd]: USB SPEED: SUPER
May 16 10:50:16 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234216.892880846] [oakd]: Camera with MXID: 1844301061E3641200 and Name: 1.1.1 connected!
May 16 10:50:15 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234215.086007026] [turtlebot4_node]: start_motor service completed.
May 16 10:50:15 ubuntu turtlebot4-start[2649]: [rplidar_composition-5] [INFO] [1684234215.084876583] [rplidar_composition]: Ingnoring start_motor request because rplidar_node is in 'auto standby' mode
May 16 10:50:14 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234214.924497874] [turtlebot4_node]: start_motor service available, sending request
May 16 10:50:14 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234214.920183356] [oakd]: No ip/mxid specified, connecting to the next available device.
May 16 10:50:14 ubuntu turtlebot4-start[2649]: [component_container-6] [INFO] [1684234214.920011229] [oakd]: Starting camera.
May 16 10:50:14 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234214.919433331] [turtlebot4_node]: oakd/start_camera service available, sending request
May 16 10:50:13 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234213.919253824] [turtlebot4_node]: RPLIDAR started
May 16 10:50:13 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234213.919093586] [turtlebot4_node]: OAKD started
May 16 10:50:13 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234213.338870051] [turtlebot4_node]:
May 16 10:50:13 ubuntu turtlebot4-start[2649]: [turtlebot4_node-1] [INFO] [1684234213.338722479] [turtlebot4_node]: oakd/stop_camera service got results: Success

The only topic that seems available is /oakd/rgb/preview/image_raw/compressedDepth and does not publish anything...

turtlebot@turtlebot4PC:~$ ros2 topic hz /oakd/rgb/preview/image_raw/compressedDepth 
WARNING: topic [/oakd/rgb/preview/image_raw/compressedDepth] does not appear to be published yet
hilary-luo commented 11 months ago

This issue is being closed due to inactivity. If you are still experiencing the issue, feel free to reopen this ticket when you are ready to continue the troubleshooting process.