Image_Transport Tutorial Problem

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

ozangungor 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.

http://wiki.ros.org/image_transport/T...

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

Comments

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 -0500 )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.

ozangungor gravatar image ozangungor  ( 2017-07-18 08:46:34 -0500 )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 -0500 )edit

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

ozangungor gravatar image ozangungor  ( 2017-07-18 09:21:21 -0500 )edit