[ros-users] Webcam (usb_cam) issues.....

Martijn Hazenberg mhazenberg75 at gmail.com
Thu Sep 16 13:06:59 UTC 2010


Hi all,

For our developments we would like to hook up 2 webcams to Ros and make them
visible in our own gui.

From
http://www.iheartrobotics.com/2010/05/testing-ros-usb-camera-drivers.html we
learned that starting with USB_CAM package would be advised, so we did.
We started with a clean USB_CAM package.
When we started the package with  rosrun usb_cam usb_cam_node, we found that
we had select timeout, everytime we started it.
To overcome this we increased the timeout to app. 15 sec. since we read
somewhere that the driver init process takes quite a lot of time (somehow).
The new problem is, dat the package will fail most of time with the
following error:

:~/ros_packages/usb_cam/src/usb_cam_node$ rosrun usb_cam usb_cam_node
usb_cam video_device set to [/dev/video0]
usb_cam io_method set to [mmap]
usb_cam image_width set to [640]
usb_cam image_height set to [480]
usb_cam pixel_format set to [yuyv]
VIDIOC_S_FMT error 5, Input/output error
:~/ros_packages/usb_cam/src/usb_cam_node$

in dmesg the last entry then is:

[  595.814126] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).

When i change the image size in the usb_cam_node code from 640x480 to
800x600 I get:

:~/ros_packages/usb_cam/src/usb_cam_node$ rosrun usb_cam usb_cam_node
usb_cam video_device set to [/dev/video0]
usb_cam io_method set to [mmap]
usb_cam image_width set to [800]
usb_cam image_height set to [600]
usb_cam pixel_format set to [yuyv]
select timeout
:~/ros_packages/usb_cam/src/usb_cam_node$

or after another restart:

:~/ros_packages/usb_cam/src/usb_cam_node$ rosrun usb_cam usb_cam_node
usb_cam video_device set to [/dev/video0]
usb_cam io_method set to [mmap]
usb_cam image_width set to [800]
usb_cam image_height set to [600]
usb_cam pixel_format set to [yuyv]
VIDIOC_S_FMT error 5, Input/output error
:~/ros_packages/usb_cam/src/usb_cam_node$

again, dmesg provides the same message as before.

when i change the image size to 320x240 most of the times it will give me
the same error :

VIDIOC_S_FMT error 5, Input/output error

but sometimes it will correctly start :

:~/ros_packages/usb_cam/src/usb_cam_node$ rosrun usb_cam usb_cam_node
usb_cam video_device set to [/dev/video0]
usb_cam io_method set to [mmap]
usb_cam image_width set to [320]
usb_cam image_height set to [240]
usb_cam pixel_format set to [yuyv]
1 frames/sec at 1284642005.985820517
1 frames/sec at 1284642006.993781394
1 frames/sec at 1284642008.011523040

When it entually does work, we're able to see the image with rosrun
image_view image_view

rosrun image_view image_view image :=/usb_cam/image_raw

Any idea on what the problem is here ?

The camera is working, verified with guvcview under all different formats.

Thanks
Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100916/1da4de28/attachment-0002.html>


More information about the ros-users mailing list