ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Transport Image tutorial issue: subscriber doesn't show image

asked 2017-05-15 09:57:17 -0500

Hello everyone,

I tried to do the tutorial " Running the Simple Image Publisher and Subscriber with Different Transports " image_transport/Tutorials but I encountered an issue.

When I run the publisher everything seems to work:

rostopic echo /camera returns a matrix and

rostopic hz /camera proves that something is being published frequently

But then, when I want to use the subscriber which aims to display what is sent to /camera I only have a window(with my wallpaper on it) and then it crashes. I saw I was not the only one with this issue but couldn't find a solution.

So please if you have any idea how to help me it could be great. :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-16 02:43:16 -0500

I found out what the error was: you have to add

 cv::waitKey(30);

after the imshow in the my_subscriber.cpp, otherwise, windows will just pop infinitely with nothing inside.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-15 09:57:17 -0500

Seen: 380 times

Last updated: May 16 '17