camshift Python example not working with kinetic
Hi, Had the 'ROS by example' camshift example working fine with Indigo on Linux Mint 17.1, including doing pan and tilt head tracking.
I have recently updated to kinetic and the python camshift based node starts up with no errors, and creates the windows but nothing in the windows except a copy of the upper left section of the desktop. I dropped back to the camshift example I started with and that behaves the same way.
It appears that the image processing callback is only called once at startup, with a frame width of None, so that is probably the issue. But I haven't been able to determine the cause yet.
I'm able to rosrun image_view image_view image:/camera/rgb/image_raw to view the output of the camera and that works fine. Also a C++ camshift example works fine and I can select the object and track it fine in the C++ version.
But the Python version is a non-starter. Has anyone else seen this? Did I miss installing something, or is this a subtle API difference between Indigo and Kinetic?
Thanks, Burt
ros-kinetic-vision-opencv is the newest version.
A little more information. I found a camshift python example (not integrated with ROS) and that works fine using cv2.VideoCapture() to access the WebCam.
My code is NOT getting /camera/rgb/image_raw topic messages even though I can use rostopic echo to see that the messages ARE flowing from the usb_cam driver.
More info. launch file is doing <remap from="input_rgb_image" to="/camera/rgb/image_raw"/> Code is doing: self.image_sub = rospy.Subscriber("input_rgb_image", Image, self.image_callback, queue_size=1)
But with the sub to input_rgb_image the input_rgb_image topic does not appear in the topic list. I guess I'll have to move back to Indigo and try to figure out what is broken with this on kinetic
Is the code you're using hosted somewhere, and you could provide a link?
Code is not currently hosted anywhere external. I've done some more digging and there is something strange happening. the processing function is sub-classed and when it is called under kinetic it doesn't see the correct class members and as mentioned I'm not getting video topic data
Since this fails with the unmodified ROS by example code here's a github URL to the code. https://github.com/pirobot/rbx1.git You can try the rbx1_vision cv_bridge_demo.launch to see if you can duplicate what I'm seeing.
A bit more information. Something appears to have changed between what I have with Indigo and Kinetic. That is in the callback imshow() doesn't appear to return. Of course waitKey(n) has to be called after imshow() but since imshow() doesn't return that can't happen.