[ros-users] uvc_camera not publishing width and height on /camera_info topic

Patrick Goebel patrick at casbs.stanford.edu
Sat Dec 18 22:55:20 UTC 2010


Hello ROS fans,

I am trying the uvc_camera package (current git version) for the first 
time with a Logitech 9000 webcam and it appears that the width/height 
parameters I am setting in the launch file (see listing below) are not 
being published on the /camera_info topic which just show 0 for both. 
The /camera_info messages are definitely updating as evidenced by the 
incrementing seq numbers and time stamps.  And the /image_raw topic is 
working as I can verify using image_view.

I am using the latest C Turtle debian packages on Ubuntu 10.04.

When I execute my launch file, I get the following error at the end of 
the list of camera properties:

unable to set control: Input/output error
ERROR: could not set some settings.
  unable to set control
select timeout in grab

Note that my user name is part of the video group and just to be sure, I 
set permissions on /dev/video3 (the Logitech webcam) to 777.

I get the same error if I try a Philips SPC1300 USB cam or the built-in 
USB cam on my laptop.  The launch file I am using is:

<launch>
   <node pkg="uvc_camera" type="camera_node" name="uvc_camera" 
output="screen">
     <param name="width" type="int" value="640" />
     <param name="height" type="int" value="480" />
     <param name="frame" type="string" value="head_camera" />
     <param name="device" type="string" value="/dev/video3" />
   </node>
</launch>

A typical message from 'rostopic echo /camera_info' looks like this:

header:
   seq: 2323
   stamp:
     secs: 1292712061
     nsecs: 161250408
   frame_id: camera
height: 0
width: 0
roi:
   x_offset: 0
   y_offset: 0
   height: 0
   width: 0
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

where I would have expected height: 480 and width: 640 instead of 0.

And the full output from the launch file looks like this for the 
Logitech camera:

process[uvc_camera-1]: started with pid [6511]
opening /dev/video3
pixfmt 0 = 'MJPG' desc = 'MJPEG'
   discrete: 160x120:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 176x144:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 320x240:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 352x288:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 640x480:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 800x600:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 960x720:   1/15 1/10 1/5
pixfmt 1 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)'
   discrete: 160x120:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 176x144:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 320x240:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 352x288:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 640x480:   1/30 1/25 1/20 1/15 1/10 1/5
   discrete: 800x600:   1/25 1/20 1/15 1/10 1/5
   discrete: 960x720:   1/10 1/5
   discrete: 1600x1200:   1/5
   int (Brightness, 0, id = 980900): 0 to 255 (1)
   int (Contrast, 0, id = 980901): 0 to 255 (1)
   int (Saturation, 0, id = 980902): 0 to 255 (1)
   bool (White Balance Temperature, Auto, 0, id = 98090c): 0 to 1 (1)
   int (Gain, 0, id = 980913): 0 to 255 (1)
   menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1)
     0: Disabled
     1: 50 Hz
     2: 60 Hz
   int (White Balance Temperature, 0, id = 98091a): 0 to 10000 (10)
   int (Sharpness, 0, id = 98091b): 0 to 255 (1)
   int (Backlight Compensation, 0, id = 98091c): 0 to 2 (1)
   menu (Exposure, Auto, 0, id = 9a0901): 0 to 3 (1)
     0: Auto Mode
     1: Manual Mode
     2: Shutter Priority Mode
     3: Aperture Priority Mode
   int (Exposure (Absolute), 0, id = 9a0902): 1 to 10000 (1)
   bool (Exposure, Auto Priority, 0, id = 9a0903): 0 to 1 (1)
current value of 10094851 is 1
current value of 10094849 is 1
current value of 9963776 is 128
current value of 9963777 is 32
current value of 9963788 is 1
current value of 9963802 is 0
unable to set control: Input/output error
ERROR: could not set some settings.
  unable to set control
select timeout in grab
select timeout in grab
select timeout in grab

Patrick Goebel
Behavioral Sciences
Stanford University



More information about the ros-users mailing list