ros-perception / opencv_apps

http://wiki.ros.org/opencv_apps
64 stars 70 forks source link

contour_moments_nodelet: don't publish empty image #124

Closed k-okada closed 2 years ago

k-okada commented 2 years ago

The contour_moments_nodelet published an empty image if debug_image=false, which resulted in the following warnings during the tests:

$ rostest opencv_apps test-contour_moments.test gui:=false
[ WARN] [1574169943.572135233]: Couldn't save image, no data! (/wide_stereo/left/contour_moments_saver)

==

Kei: update: even if debug_image=true, we generete drawing image and publishes only when it is subscribed

based on https://github.com/ros-perception/opencv_apps/pull/101/commits/c8129d07e1087e9fb4b0fe49759cd319cbe6a450 (#101)