Ask Your Question
1

Using two webcam for uvc_camera stereo_node

asked 2011-03-24 06:29:13 -0600

ss_robotics gravatar image

updated 2011-03-24 21:05:28 -0600

tfoote gravatar image

Hi,

In all I have three camera. two external webcam and 1 integrated webcam on laptop.

When I run the command $rosrun uvc_camera stereo_node

using the integrated webcam and either of the external webcam everything works fine and I get required topics published.

I am facing difficulty get the two external webcam running together. The node would crash. I get the following error at the end

unable to set control: Invalid argument

ERROR: could not set some settings.  
 unable to set control 
terminate called after throwing an instance of 'std::runtime_error'
  what():  unable to start capture
/opt/ros/cturtle/ros/bin/rosrun: line 35:  5770 Aborted                 $exepath "$@"

The complete message

root@robot-laptop:/opt/ros/cturtle/ros# rosrun uvc_camera stereo_node  _left/device:="/dev/video0" _right/device:="/dev/video1" _width=320 _height=240
opening /dev/video0
pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)'
  discrete: 640x480:   1/30 1/15 1/10 1/5 
  discrete: 352x288:   1/30 1/15 1/10 1/5 
  discrete: 320x240:   1/30 1/15 1/10 1/5 
  discrete: 176x144:   1/30 1/15 1/10 1/5 
  discrete: 160x120:   1/30 1/15 1/10 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)
  int (Hue, 0, id = 980903): -128 to 127 (1)
  int (Gamma, 0, id = 980910): 1 to 16 (1)
  int (Gain, 0, id = 980913): 0 to 65535 (1)
  menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1)
    0: Disabled
    1: 50 Hz
    2: 60 Hz
  int (Sharpness, 0, id = 98091b): 1 to 64 (1)
  int (Backlight Compensation, 0, id = 98091c): 1 to 16 (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 1001 (1)
unable to set control: Invalid argument
ERROR: could not set some settings.  
 unable to set control 
opening /dev/video1
pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)'
  discrete: 640x480:   1/30 1/15 1/10 1/5 
  discrete: 352x288:   1/30 1/15 1/10 1/5 
  discrete: 320x240:   1/30 1/15 1/10 1/5 
  discrete: 176x144:   1/30 1/15 1/10 1/5 
  discrete: 160x120:   1/30 1/15 1/10 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)
  int (Hue, 0, id = 980903): -128 to 127 (1)
  int (Gamma, 0, id = 980910): 1 to 16 (1)
  int (Gain, 0, id = 980913): 0 to 65535 (1)
  menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1)
    0: Disabled
    1: 50 Hz
    2: 60 Hz
  int (Sharpness, 0, id = 98091b): 1 to 64 (1)
  int (Backlight Compensation, 0, id = 98091c): 1 to 16 (1)
  menu (Exposure, Auto, 0, id = 9a0901): 0 to 3 (1)
    0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-06-08 12:50:12 -0600

fergs gravatar image

Not sure if you've found the answer to this yet (just noticed this question) -- but your problem is with USB bandwidth. Error 28 means there is no space left on the bus.

The reason you see this issue with the two external cameras, but not when using the internal one, is because the internal one probably has a better choice of microframe sizes for your current resolution than the external cameras.

Unfortunately, your only options are to either A) use different cameras, B) drop the resolution or C) hack the driver (maybe) if the microframe calculation is off (which it can be for devices that aren't entirely supported -- the uvc developers mailing list may have relevant information).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-03-24 06:29:13 -0600

Seen: 2,076 times

Last updated: Jun 08 '11