luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

[BUG] {Streams have duplicate name 'detections'} #479

Closed FrederikeDurow closed 4 months ago

FrederikeDurow commented 5 months ago

Describe the bug I'd like to use my OAK camera with ros2 for yolo detection, so I tried to run the yolo example launch file. I get the error that Streams have duplicate name 'detections'.

I installed from ros binaries on humble, and am working with ubuntu 22.04.

The following work without any issues:

Screenshot from 2024-01-17 14-50-07 ros2 launch depthai_examples yolov4_publisher.launch.py [INFO] [launch]: All log files can be found below /home/frederike/.ros/log/2024-01-17-14-49-40-066898-frederike-Yoga-115126 [INFO] [launch]: Default logging verbosity is set to INFO Default resources path.............. /opt/ros/humble/share/depthai_examples/resources [INFO] [robot_state_publisher-1]: process started with pid [115136] [INFO] [yolov4_spatial_node-2]: process started with pid [115138] [robot_state_publisher-1] [INFO] [1705499380.317633749] [oak_state_publisher]: got segment oak-d-base-frame [robot_state_publisher-1] [INFO] [1705499380.317717707] [oak_state_publisher]: got segment oak-d_frame [robot_state_publisher-1] [INFO] [1705499380.317724640] [oak_state_publisher]: got segment oak_imu_frame [robot_state_publisher-1] [INFO] [1705499380.317729169] [oak_state_publisher]: got segment oak_left_camera_frame [robot_state_publisher-1] [INFO] [1705499380.317733687] [oak_state_publisher]: got segment oak_left_camera_optical_frame [robot_state_publisher-1] [INFO] [1705499380.317737865] [oak_state_publisher]: got segment oak_model_origin [robot_state_publisher-1] [INFO] [1705499380.317743295] [oak_state_publisher]: got segment oak_rgb_camera_frame [robot_state_publisher-1] [INFO] [1705499380.317747704] [oak_state_publisher]: got segment oak_rgb_camera_optical_frame [robot_state_publisher-1] [INFO] [1705499380.317751651] [oak_state_publisher]: got segment oak_right_camera_frame [robot_state_publisher-1] [INFO] [1705499380.317755518] [oak_state_publisher]: got segment oak_right_camera_optical_frame [yolov4_spatial_node-2] terminate called after throwing an instance of 'std::invalid_argument' [yolov4_spatial_node-2] what(): Streams have duplicate name 'detections' [ERROR] [yolov4_spatial_node-2]: process has died [pid 115138, exit code -6, cmd '/opt/ros/humble/lib/depthai_examples/yolov4_spatial_node --ros-args --params-file /tmp/launch_params_q5o9psju --params-file /tmp/launch_params_4uibd0_0 --params-file /tmp/launch_params_t7pp0qds --params-file /tmp/launch_params_vruddidf --params-file /tmp/launch_params_4xq62zeo --params-file /tmp/launch_params_as6uoun3 --params-file /tmp/launch_params_rvilgxsx'].

slowrunner commented 5 months ago

I get the same error

[yolov4_spatial_node-2]   what():  Streams have duplicate name 'detections'

launching in the luxonis/depthai-ros:humble-latest Docker image

BTW, adding spatial_camera:=false gets rid of the duplicate detections error but still fails: "exit code -11"

pi@WaLiPi5:~/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai $ ros2 launch depthai_examples yolov4_publisher.launch.py camera_model:=OAK-D-LITE spatial_camera:=false
[INFO] [launch]: All log files can be found below /home/pi/wali_pi5/c3ws/roslogs/2024-01-22-11-17-13-845120-WaLiPi5-1508
[INFO] [launch]: Default logging verbosity is set to INFO
Default resources path..............
/opt/ros/humble/share/depthai_examples/resources
[INFO] [robot_state_publisher-1]: process started with pid [1510]
[INFO] [yolov4_spatial_node-2]: process started with pid [1512]
[robot_state_publisher-1] [INFO] [1705940234.188302147] [oak_state_publisher]: got segment oak-d-base-frame
[robot_state_publisher-1] [INFO] [1705940234.188434554] [oak_state_publisher]: got segment oak-d_frame
[robot_state_publisher-1] [INFO] [1705940234.188449350] [oak_state_publisher]: got segment oak_left_camera_frame
[robot_state_publisher-1] [INFO] [1705940234.188459924] [oak_state_publisher]: got segment oak_left_camera_optical_frame
[robot_state_publisher-1] [INFO] [1705940234.188470165] [oak_state_publisher]: got segment oak_model_origin
[robot_state_publisher-1] [INFO] [1705940234.188480184] [oak_state_publisher]: got segment oak_rgb_camera_frame
[robot_state_publisher-1] [INFO] [1705940234.188490795] [oak_state_publisher]: got segment oak_rgb_camera_optical_frame
[robot_state_publisher-1] [INFO] [1705940234.188500850] [oak_state_publisher]: got segment oak_right_camera_frame
[robot_state_publisher-1] [INFO] [1705940234.188511721] [oak_state_publisher]: got segment oak_right_camera_optical_frame
[ERROR] [yolov4_spatial_node-2]: process has died [pid 1512, exit code -11, cmd '/opt/ros/humble/lib/depthai_examples/yolov4_spatial_node --ros-args --params-file /tmp/launch_params_dfqaco7b --params-file /tmp/launch_params_g22xe7d4 --params-file /tmp/launch_params_3_of5hc7 --params-file /tmp/launch_params_9n1bf458 --params-file /tmp/launch_params_6qeju9mb --params-file /tmp/launch_params_mm45dq71 --params-file /tmp/launch_params_0hrk6173'].
slowrunner commented 4 months ago

@FrederikeDurow Have you tried the latest build from sources humble branch?

ros2 launch depthai_examples yolov4_publisher.launch.py camera_model:=OAK-D-LITE spatial_camera:=false

is working for me after building from the humble sources (over Ubuntu 22.04 in Docker on Raspberry Pi 5)

Rodhaaret commented 4 months ago

It works now! It seems like the newer version of the package solved the issue.

FrederikeDurow commented 4 months ago

Yes, it works with the newest build from source, thanks!