Rosanswers logo

I'm using uvcdynctrl to control my Logitech Quickcam Orbit AF webcam and using libuvc_camera as the driver for the webcam. I have a launch file that starts the camera node and runs image_view to display the camera feed.

When I type "uvcdynctrl -s 'Pan Reset' 1" in the terminal by itself, the camera moves as it is supposed to. But if I run the same command while the libuvc_camera node is running, I get the error "[libwebcam] Unable to open device 'video0'. Device not found."

The launch file that runs the camera node works on its own as well. It seems that there is some issue when both the ros node and uvcdynctrl are trying to access the same device.

My launch file that opens the libuvc_camera node is as follows:

  <group ns="camera">
    <node pkg="libuvc_camera" type="camera_node" name="mycam">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x046d"/>
      <param name="product" value="0x0994"/>
      <param name="serial" value=""/>
      <!-- If the above parameters aren't unique, choose the first match: -->
      <param name="index" value="0"/>

      <!-- Image size and type -->
      <param name="width" value="640"/>
      <param name="height" value="480"/>
      <!-- choose whichever uncompressed format the camera supports: -->
      <param name="video_mode" value="uncompressed"/> <!-- or yuyv/nv12/jpeg -->
      <param name="frame_rate" value="15"/>

      <param name="timestamp_method" value="start"/> <!-- start of frame -->
      <param name="camera_info_url" value="file:///tmp/cam.yaml"/>

      <param name="auto_exposure" value="3"/> 
      <param name="auto_white_balance" value="false"/>

      <param name="auto_focus" value="True"/>
      <param name="brightness" value="1000"/>


   <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen" >
      <remap from="image" to="/camera/image_raw"/>
      <param name="autosize" value="true" />

Originally posted by pgigioli on ROS Answers with karma: 354 on 2016-04-20

Post score: 0

Original comments

Comment by lucasw on 2016-04-20:
You could try usb_cam instead, I use it and v4l2ucp (v4l2ctrl provides command line settings control) at the same time time, I haven't tried it recently but uvcdynctrl should work well with it also.

Comment by pgigioli on 2016-04-20:
I'll try it out. How do I switch back to the usb_cam driver? I used to use it but I switched to the uvc driver and I think I turned off the usb module with "sudo rmmod uvcvideo"

Comment by lucasw on 2016-04-20:
Try unplugging and replugging the webcam, or rebooting.

Comment by pgigioli on 2016-04-20:
Ah, the usb_cam driver worked with uvcdynctrl. Thank you! I'll mark this question as solved and credit you.


1 Answer 1


Rosanswers logo

Thanks to lucasw I was able to figure it out. It seems there is something buggy about the uvc driver that doesn't let you access a single device using multiple processes. Using the usb_cam driver allowed me to use uvcdynctrl to access pan/tilt functions while streaming the video with openCV. I'll be using uvcdynctrl in code to implement face tracking. If anyone is interested, feel free to reach out.

Originally posted by pgigioli with karma: 354 on 2016-04-20

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by lucasw on 2016-04-21:
You might be interested in https://github.com/lucasw/v4l2ucp - it has exposes all the uvc camera controls as rostopics so you can control it from another computer, and also there is a rqt plugin that turns all those rostopics into sliders and checkboxes.

Comment by pgigioli on 2016-04-21:
Thanks, I'll check it out!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.