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

Revision history [back]

click to hide/show revision 1
initial version

Your code works, you are only interpreting the return value wrong. "ret" is set if the capturing worked!

If you add a cv2.waitKey(1) after the imshow, the image is also shown. You should also only create publishers or subscribers after you created the nodehandle.