ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The problem is caused by cv2.waitKey(0)
in you image callback. If you pass zero to waitKey it will pause until you press a key with the window focused, and block execution of your program.
If you change this :
cv2.waitKey(50)
This instead it will wait for 50 milliseconds or until you press a key and then continue execution, allowing your code to receive and display more images.