leggedrobotics / darknet_ros

YOLO ROS: Real-Time Object Detection for ROS
BSD 3-Clause "New" or "Revised" License
2.23k stars 1.18k forks source link

Cannot open darknet_ros/detection_image in rqt_image_viewer #255

Open kubs0ne opened 4 years ago

kubs0ne commented 4 years ago

Hi, I'm trying to integrate ROS with YOLO, and I want to be able to play the darknet_ros/detection_image topic from bag and visualise it. The problem is that when I open rqt_image_viewer and select this topic, some artefacts are visible. I tried to change formats in YoloObjectDetector.cpp but it didn't help. I'm using yolo_v4.launch to initialize. What can I do to resolve the issue? Maybe I'm using the wrong visualiser (rqt_image_viewer)? I can also add that when I launch the file, YOLO window displays correctly and detect objects. I would be grateful for any help.

MingheCao commented 4 years ago

Same issue. The images cannot be visualized by rqt_image_viewer when I set 'enable_opencv' to false. But works fine when opencv window displayed.

RDaneelOlivav commented 3 years ago

Same issue here. Getting these strange artifacts when launching the yolo_v3.launch

Screenshot from 2021-03-01 17-27-59

Tried alsoin RVIZ and same issue. Any ideas? Is there something wrong:

bool YoloObjectDetector::publishDetectionImage(const cv::Mat& detectionImage) { if (detectionImagePublisher_.getNumSubscribers() < 1) return false; cv_bridge::CvImage cvImage; cvImage.header.stamp = ros::Time::now(); cvImage.header.frame_id = "detection_image"; cvImage.encoding = sensor_msgs::imageencodings::BGR8; cvImage.image = detectionImage; detectionImagePublisher.publish(*cvImage.toImageMsg()); ROS_DEBUG("Detection image has been published."); return true; }

?

iamrajee commented 3 years ago

Same issue here!

idochi commented 2 years ago

I use rviz and just have a frozen image from my camera with no bounding boxes.

GavinGaoYan commented 2 years ago

me too

huangxiaoxiao-5 commented 2 years ago

我使用rviz,只是从我的相机中获得了一个没有边界框的冻结图像。

me too,Did you solve the problem?

SergioFerrando commented 1 year ago

mee to, did you know how to solve the problem?

GavinGaoYan commented 1 year ago

mee to, did you know how to solve the problem?

Just disable the darknet's UI. Then it will be OK.

SergioFerrando commented 1 year ago

how do i do it?

GavinGaoYan commented 1 year ago

how do i do it?

in config/ros.yaml

`image_view:

enable_opencv: true wait_key_delay: 1 enable_console_output: true`

set enable_opencv=false