Documentation Status

Cannot load information on name: libuvc_camera, distro: electric, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: libuvc_camera, distro: fuerte, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
libuvc_ros: libuvc_camera

Package Summary

Documented

USB Video Class camera driver

libuvc_ros: libuvc_camera

Package Summary

Released Continuous integration Documented

USB Video Class camera driver

libuvc_ros: libuvc_camera

Package Summary

Released Continuous integration Documented

USB Video Class camera driver

  • Maintainer status: developed
  • Maintainer: Ken Tossell <ken AT tossell DOT net>, ROS Orphaned Package Maintainers <ros-orphaned-packages AT googlegroups DOT com>
  • Author:
  • License: BSD
  • Source: git https://github.com/ktossell/libuvc_ros.git (branch: master)
libuvc_ros: libuvc_camera

Package Summary

Released Continuous integration Documented

USB Video Class camera driver

libuvc_ros: libuvc_camera

Package Summary

Released Continuous integration Documented

USB Video Class camera driver

  • Maintainer status: unmaintained
  • Maintainer: Ken Tossell <ken AT tossell DOT net>, ROS Orphaned Package Maintainers <ros-orphaned-packages AT googlegroups DOT com>
  • Author:
  • License: BSD
  • Source: git https://github.com/ros-drivers/libuvc_ros.git (branch: master)

Overview

This package provides a ROS interface for digital cameras meeting the USB Video Class standard (UVC) using libuvc. Most webcams are UVC-compliant.

Limitations

Some controls are missing, though the most common ones (focus, exposure and others) are supported. There is no support for UVC extension units, which are sometimes used to implement behavior such as pan-tilt and zoom.

Features

Current features include:

Usage

Permissions

Under Linux, the user that runs camera_node must have write permissions to the /dev/bus/usb/... device that corresponds to the camera. You may run the node as root:

$ sudo -E rosrun libuvc_camera camera_node vendor:=...

This command gives information on the webcam's vendor and product ID's:

   lsusb -v

However, use of udev rules is recommended. In /etc/udev/rules.d/99-uvc.rules, to give every user camera access:

# UVC cameras
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="08cc", MODE="0666"
# ^ Change the vendor and product IDs to match your camera.

To give only one user access:

# UVC cameras
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="08cc", OWNER="myuser"
# ^ Change the owner and the vendor and product IDs to match your camera.

Alternatively, set GROUP="mygroup" to grant access for any user in that group.

The following rule works with any Logitech camera:

#UVC cameras
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", MODE="0666"

These settings will be applied the next time the camera is connected.

REMINDER: For Ubuntu 12.04 and above the udev rules syntax changed! Replace SYSFS{...} with ATTRS{...}

Or, run the following before starting the camera. It gets access to the USB device:

sudo chmod o+w /dev/bus/usb/001/024 <-- where 024 is port# from the error code

Running the driver

You may need to disable your operating system's builtin USB video or audio drivers. On Linux, the snd-usb-audio and uvcvideo modules conflict with libuvc. Try unloading them with sudo rmmod snd-usb-audio; sudo rmmod uvcvideo and consider blacklisting them -- e.g., add the lines blacklist uvcvideo and blacklist snd-usb-audio to an /etc/modprobe.d/uvc.conf file. (Applications that don't use libuvc will be unable to stream from the camera.)

Get started with the following launch file. If you need assistance with your webcam's supported resolutions and frame rates, try:

   v4l2-ctl --list-formats-ext

<launch>
  <group ns="camera">
    <node pkg="libuvc_camera" type="camera_node" name="mycam">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x0"/>
      <param name="product" value="0x0"/>
      <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/mjpeg -->
      <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"/> <!-- use aperture_priority auto exposure -->
      <param name="auto_white_balance" value="false"/>
    </node>
  </group>
</launch>

ROS API

Wiki: libuvc_camera (last edited 2017-09-20 01:25:52 by RyosukeTajima)