Show EOL distros:
Package Summary
USB Video Class camera driver
- Maintainer: Ken Tossell <ken AT tossell DOT net>
- Author:
- License: BSD
- Source: git https://github.com/ktossell/libuvc_ros.git (branch: master)
Package Summary
USB Video Class camera driver
- Maintainer: Ken Tossell <ken AT tossell DOT net>
- Author:
- License: BSD
- Source: git https://github.com/ktossell/libuvc_ros.git (branch: master)
Package Summary
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)
Package Summary
USB Video Class camera driver
- 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)
Package Summary
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)
Package Summary
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)
Package Summary
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)
Package Summary
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)
Contents
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:
- Dynamic reconfiguration and monitoring of the camera's control settings
Camera calibration (camera_info_manager)
Image pipeline integration (image_transport)
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/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"/> <!-- use aperture_priority auto exposure --> <param name="auto_white_balance" value="false"/> </node> </group> </launch>
ROS API
camera_node
UVC webcam driver.Published Topics
image_raw (sensor_msgs/Image)- A stream of images from the camera.
- Camera intrinsics for images published on camera/image_raw with matching time stamps and frame IDs. If CameraInfo calibration is not available or is incompatible with the current video_mode, uncalibrated data will be provided instead.
Services
set_camera_info (sensor_msgs/SetCameraInfo)- Set the camera's calibration.
Parameters
Dynamically Reconfigurable Parameters
See the dynamic_reconfigure package for details on dynamically reconfigurable parameters.- Vendor ID, hex digits including '0x' ex: '0x046d'(use camera of any vendor if null).
- Product ID, hex digits including '0x' ex: '0x0809' (use camera of any model if null).
- Serial number, arbitrary string (use camera of any serial number if null).
- Index into the list of cameras that match the above parameters. Range: 0 to 2147483647
- Image width. Range: 0 to 2147483647
- Image height. Range: 0 to 2147483647
- Format of video stream from camera. Possible values are: uncompressed (uncompressed): Use any uncompressed format, yuyv (yuyv): YUYV, uyvy (uyvy): UYVY, rgb (rgb): RGB, jpeg (jpeg): JPEG/MJPEG
- Camera speed, frames per second. Range: 0.1 to 1000.0
- Method for determining the timestamp. Possible values are: PubTime (pub): Time of publication, FrameStartTime (start): Time when raw frame capture began, FrameStopTime (stop): Time when raw frame capture ended, HostReceiptTime (hostrcpt): Time when camera-to-host transfer completed
- ROS tf frame of reference, resolved with tf_prefix unless absolute.
- Path to camera calibration file.
- Scanning mode. Possible values are: Interlaced (0): , Progressive (1):
- Auto exposure mode. Possible values are: Manual (0): Manual exposure, manual iris, Auto (1): Auto exposure, auto iris, Shutter_Priority (2): manual exposure, auto iris, Aperture_Priority (3): auto exposure, manual iris
- In auto mode or shutter priority mode, allow the device to vary frame rate. Range: 0 to 1
- Length of exposure, seconds. Range: 0.0001 to 10.0
- Aperture, f. Range: 0.0 to 655.35
- Maintain focus automatically.
- Absolute focal distance, millimeters. Range: 0 to 65536
- Pan (clockwise), arc seconds. Range: -648000 to 648000
- Tilt (up), arc seconds. Range: -648000 to 648000
- Roll (clockwise), degrees. Range: -180 to 180
- Image capture disabled.
- Backlight compensation, device-dependent (zero for none, increasing compensation above zero). Range: 0 to 65536
- Brightness, device dependent. Range: -32768 to 32767
- Contrast, device dependent. Range: -32768 to 32767
- Gain, device dependent. Range: 0 to 65536
- Power line frequency anti-flicker processing. Possible values are: Disabled (0): Disabled, Freq_50 (1): 50 Hz, Freq_60 (1): 60 Hz
- Automatic hue control.
- Hue, degrees. Range: -180.0 to 180.0
- Saturation, device dependent (zero for grayscale). Range: 0 to 65536
- Image sharpness, device dependent. Range: 0 to 65536
- Gamma. Range: 0.01 to 5.0
- Automatic white balance.
- White balance temperature, degrees. Range: 0 to 65536
- Blue or U component of white balance, device-dependent. Range: 0.0 to 65536.0
- Red or V component of white balance, device-dependent. Range: 0.0 to 65536.0