Example3.2 - Wrong source code in the tutorial of OpenCv in ROS

Hello,
In the example 3.2, the file called example_video.py, there are several issues: 1. rospy.onespine() is not an official ros command (I searched for it and I couldn’t find any). the code shows me the video for less than a second and then it disappears. 3. he logic seems awkward, why we need to have a while loop when we can use ros.spine()?

Spinonce and spin work differently. Normally, we use spinonce to force callback processing once and do it at a rate that we want. Spin will just block everything, process the callbacks. Depending on the application, we use one or another. If we want to do other things besides processing callbacks, spinonce is the way to go.

But why is it not mentioned in ROS documentation. Anyway thanks for the reply. I have another issue thus: The callback is getting interrupted (the error I keep getting is ssize is empty or something similar to that) after a while and the video runs only for 1 second or two while the length of the video is 5 seconds.

Can you send some code , some details on the units an dso on so we can check it and maybe help you further?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.