python subscriber to a uvc_camera non-compressed Image?
I've previously used this tutorial to get a CompressImage from a web camera: http://wiki.ros.org/rospy_tutorials/T...
Now I'm using a webcamera through uvc_camera, and it isn't publishing a compressed image. If I substitute Image for CompressedImage in the python code the cv_image comes out as None.
...
# subscribed Topic
self.subscriber = rospy.Subscriber("/camera/image_raw",
Image, self.callback, queue_size = 1)
....
def callback(self, ros_data):
...
#### direct conversion to CV2 ####
np_arr = np.fromstring(ros_data.data, np.uint8)
image_np = cv2.imdecode(np_arr, cv2.CV_LOAD_IMAGE_COLOR)
np_arr at this point is a (widthheight3, ) array, but image_np comes out None
.
The camera otherwise works fine in rqt_image_view. Is there any way to get uvc_camera to compress, another node to add that will compress for me, or get the np/cv2 commands to process the non-compressed data properly?