Image_Transport Tutorial Problem

asked 2017-07-18 06:52:42 -0600

rosberrypi gravatar image

Hi everyone,

I am planning to use ROS and openCV for an image processing project and also I am quite new to ROS environment so I'm simply trying to follow the tutorials.

I would like to publish and subscribe an image first but could't make it run. Catkin_make has completed without an error but can't display anything after running the publisher and subscriber nodes. After running "my_subscriber" a window is quickly opening and closing at the same time and it's written init done in the console.

What am I missing?

edit retag flag offensive close merge delete


Did rostopic list -v or rosrun rqt_graph rqt_graph work as shown in the tutorial?

lucasw gravatar image lucasw  ( 2017-07-18 08:24:52 -0600 )edit

Thanks for the comment. For rqt_graph yes, for rostopic list, yes what it's written in tutorial and some extras as well. I have edited the cpp code waitKey(0); at the end and now I'm able to see the window, however it's all black.

rosberrypi gravatar image rosberrypi  ( 2017-07-18 08:46:34 -0600 )edit

You should try running rqt_image_view, if that works then the problem is only in the subscriber and not the publisher. I assume your source image is not itself all black.

lucasw gravatar image lucasw  ( 2017-07-18 09:01:55 -0600 )edit

rqt_image_view shows the image so my publisher is just fine I guess can't subscribe it!

rosberrypi gravatar image rosberrypi  ( 2017-07-18 09:21:21 -0600 )edit