ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

usb_cam low FPS from webcam

asked 2011-12-03 00:23:17 -0500

Rosia Nicolae gravatar image

Hello, I found out I can use usb_cam to publish images from my webcam. I tested it with my laptop's webcam and it performs poorly, only 7 FPS.

OS: Ubuntu 11.10 Oneric

ROS: Electric (installed via apt-get)

dmesg output regarding webcam:

[ 7209.629430] usb 2-1: USB disconnect, device number 3 [ 7211.188071] usb 2-1: new high speed USB device number 6 using ehci_hcd [ 7211.383400] uvcvideo: Found UVC 1.00 device CNF7231 (04f2:b073) [ 7211.395092] input: CNF7231 as /devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/input/input11

I downloaded and compiled it using rosmake. Compilation log:

As you can see it complains about libswscale (although I have it installed) but it managed to compile it.

Starting usb_cam gives the following output:

Any ideas?

Thanks in advance.

edit retag flag offensive close merge delete


Have you tried other webcam software? Webcam support in linux best. Do guvcview, or cheese, or similar, give you better behavior? It's not necessarily ROS' fault...

Mac gravatar image Mac  ( 2012-02-16 05:07:24 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-02-16 01:21:26 -0500

Stephan gravatar image

Maybe you can try another pixel format, my launch file for my usb webcam looks like this:

  <node name="usb_cam" pkg="usb_cam" type="usb_cam_node">
    <param name="video_device" value="/dev/video0" />
    <param name="image_width" value="640" />
    <param name="image_height" value="480" />
    <param name="pixel_format" value="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap" />


edit flag offensive delete link more

answered 2012-02-15 23:54:19 -0500

Thomas gravatar image

You can also try with: This one has a~fps parameter to set the framerate.

edit flag offensive delete link more

Question Tools


Asked: 2011-12-03 00:23:17 -0500

Seen: 3,060 times

Last updated: Feb 16 '12