Robotics StackExchange | Archived questions

Image_Transport Tutorial Problem

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/Tutorials/ExaminingImagePublisherSubscriber

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

What am I missing?

Asked by rosberrypi on 2017-07-18 06:52:42 UTC

Comments

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

Asked by lucasw on 2017-07-18 08:24:52 UTC

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.

Asked by rosberrypi on 2017-07-18 08:46:34 UTC

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.

Asked by lucasw on 2017-07-18 09:01:55 UTC

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

Asked by rosberrypi on 2017-07-18 09:21:21 UTC

Answers