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

Revision history [back]

You only need to subscribe to the image topic once, do not put this line within the main while loop of your code.

What you're telling ROS to do is re-subscribe to the same topic every iteration of the loop, this is not going to work well at all.

Move the subscribe line outside of the loop, then it should start working as you expect.