image_view not showing image from web cam

asked 2018-10-05 08:14:12 -0500

Drkstr gravatar image

I am having trouble displaying images from my web_cam using ROS.

I am running the node usb_cam_node

rosrun usb_cam usb_cam_node _pixel_format:=yuyv

Except for these warnings, it seems to be working fine:

[ WARN] [1538744812.140648914]: Camera calibration file /home/rakshak/.ros/camera_info/head_camera.yaml not found.

[ WARN] [1538744812.204086017]: unknown control 'white_balance_temperature_auto'

[ WARN] [1538744812.209835393]: unknown control 'focus_auto'

I can see it publishing into the /usb_cam/image_raw topic using

rostopic echo /usb_cam/image_raw

and it is publishing at apx 30hz.

But when I run

rosrun image_view image_view image:=/usb_cam/image_raw

all I am seeing in this

image description

Environment details:

Running Ubuntu 16.04 in a VM

The host is a Mac, OSX version 10.14

ROS version: Kinetic.

I have confirmed the VM has access to the webcam using the Cheese Webcam Booth.

edit retag flag offensive close merge delete

Comments

Alternatively, You can use RViz to visualize the camera image. Just open RViz, add the topic /usb_cam/image_raw to image. From the image_view screen shot you shared, it seems like an issue of mismatch between the color format. It seems like image_view is expecting an RGB.

vijayaganesh gravatar image vijayaganesh  ( 2018-10-07 14:15:31 -0500 )edit

Thanks for replying! Can you elaborate on what you mean by 'mismatch between the color format'? And how do I get image_view to read the topic and display the image? Cheers.

Drkstr gravatar image Drkstr  ( 2018-10-08 02:08:37 -0500 )edit

Hi! Did you find a solution? I have exactly the same issue. Same system (MAC + Ubuntu 16.04 in a VM). A python code to access the camera via the VM is working.

rolfb gravatar image rolfb  ( 2018-12-31 03:59:49 -0500 )edit

Mine was a vm issue. It sorted itself out when i switched from vmware to parallels.

Drkstr gravatar image Drkstr  ( 2019-01-23 05:36:29 -0500 )edit