GithubHelp home page GithubHelp logo

libuvc_ros's People

Contributors

7675t avatar doofy avatar furushchev avatar jasonimercer avatar joshvillbrandt avatar k-okada avatar ktossell avatar mikaelarguedas avatar skohlbr avatar tfoote avatar v4hn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libuvc_ros's Issues

Error: e210fffc (The connection between the camera and Jetson becomes unstable.)

Error

The camera occasionally produces an Error: e210fffc, and upon executing the 'lsusb' command in the Jetson terminal,
it has been confirmed that the camera is not recognized. The log at the time of the issue is as follows:

Error: e210fffc
[ INFO] [1689308329.098251080]: [Camera] Camera closed
terminate called after throwing an instance of 'boost::wrapexcept<boost::lock_error>'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

Debug

camera_test.zip

Debugging code has been attached to demonstrate how to trace the issue when the error occurs.
Based on the observed circumstances, it is inferred that 'ptrGrabResult->GrabSucceeded()' is evaluating to False.

[ INFO] [1689322235.991963013]: trigger_num : 8
[ INFO] [1689322235.991984134]: A
[ INFO] [1689322235.992001638]: B
[ INFO] [1689322236.003959851]: [Camera] simulator recommend by stage 25, 23, 50
[ INFO] [1689322236.520937697]: [Camera] simulator recommend by stage 26, 24, 55
[ INFO] [1689322236.775835207]: C
Error: e210fffc
[ INFO] [1689322236.804900722]: [Camera] Camera closed

Additionally, it is noted that monitoring the camera temperature has been performed previously,
and it is unrelated to the current error.

About multicamera use

Hi,
I want to ask does anybody know how to change the launch file to make multicamera works?
I did not find any place to change ros ouput name field. Could somebody give some examples? Thanks!!!

I use the following launch file:








  <!-- 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>

change the first line's name does not work.

File Descriptor

Hi,

I am currently using libuvc for my camera. I would like to use the ioctl function to set the triggering mode for this camera and it requires the file descriptor to the open device. Unlike open() which returns the file descriptor of the open device, uvc_open() returns the handle to the open device. As such, I am unable to use the ioctl function to set the triggering mode.

Would appreciate for an advice on the above-mentioned issue.

Thanks

Regards
Kelvin

Undefined symbol: libusb_set_auto_detech_kernel_driver

I have installed it in Ubuntu 14.04 LTS. When I connect with a camera and execute rosrun libuvc_camera camera_node vendor:=xxx, the following error shows.

Opening camera with vendor=0x0, product=0x0, serial="", index=0
/opt/ros/indigo/lib/libuvc_camera/camera_node: symbol lookup error: /opt/ros/indigo/lib/libuvc.so: undefined symbol: libusb_set_auto_detach_kernel_driver

I've tried to install ros-indigo-libuvc, ros-indigo-libuvc-ros and ros-indigo-libuvc-camera, but it doesn't work. See if someone has experienced the same issue here.

Failed to load nodelet '/libuvc_camera` of type `libuvc_camera/driver` to manager `/nodelet_manager'

ROS version: Noetic, 1.15.14

Error:
[ INFO] [1655832145.573988779]: Loading nodelet /libuvc_camera of type libuvc_camera/driver to manager /nodelet_manager with the following remappings:
[ INFO] [1655832145.576714841]: waitForService: Service [/nodelet_manager/load_nodelet] could not connect to host [192.168.10.102:40781], waiting...
[ INFO] [1655832145.603768486]: Initializing nodelet with 8 worker threads.
[ INFO] [1655832145.618246063]: waitForService: Service [/nodelet_manager/load_nodelet] is now available.
free(): invalid pointer
[FATAL] [1655832145.815128191]: Failed to load nodelet '/libuvc_cameraof typelibuvc_camera/driverto manager/nodelet_manager'
[nodelet_manager-1] process has died [pid 247536, exit code -6, cmd /opt/ros/noetic/lib/nodelet/nodelet manager __name:=nodelet_manager __log:=/home/.....

Unable to run camera node, rosservice shows services running and some topics too.

UVC Extension Units

Hi,

I am aware that the libuvc currently does not support uvc extension units. However, I need to to set the triggering mode of the camera. I am just wondering of there are any recommendations or suggestions for me to do so?

Thanks

Regards
Kelvin

Unable to connect to multiple cameras simultaneously using index

I implemented the missing index functionality (libuvc #36, libuvc_ros #27) and am able to select a camera with an index. However, when I try to launch two instances of libuvc_camera simultaneously, the libuvc_camera instance that was started second always gets hung up somewhere in uvc_start_streaming(). Any ideas?

My launch file looks like this:

<?xml version="1.0"?>

<launch>
  <arg name="width" default="1280" />
  <arg name="height" default="720" />
  <arg name="video_mode" default="mjpeg" />
  <arg name="frame_rate" default="60" />

  <!-- start the left camera -->
  <node pkg="libuvc_camera" type="camera_node" name="left" ns="stereo/left">

    <!-- Parameters used to find the camera -->
    <param name="vendor" value="0x05a3"/>
    <param name="product" value="0x9230"/>
    <param name="index" value="0"/>

    <!-- Image size and type -->
    <param name="width" value="$(arg width)"/>
    <param name="height" value="$(arg height)"/>
    <param name="video_mode" value="$(arg video_mode)"/>
    <param name="frame_rate" value="$(arg frame_rate)"/>
  </node>

  <!-- start the right camera -->
  <node pkg="libuvc_camera" type="camera_node" name="right" ns="stereo/right">

    <!-- Parameters used to find the camera -->
    <param name="vendor" value="0x05a3"/>
    <param name="product" value="0x9230"/>
    <param name="index" value="1"/>

    <!-- Image size and type -->
    <param name="width" value="$(arg width)"/>
    <param name="height" value="$(arg height)"/>
    <param name="video_mode" value="$(arg video_mode)"/>
    <param name="frame_rate" value="$(arg frame_rate)"/>
  </node>
</launch>

Connecting Multiple Camera

I am trying to stream from 6 camera using this ros package. I am getting data from 5 cameras but the 6th camera is not sending any data at all. Every time it's launched, a different camera wouldn't stream data. i.e at any time only 5 camera are being streamed.

Specs:

  1. CPU: i7-8700 CPU @ 3.20GHz
  2. OS: Ubuntu 16.04
  3. Have added a PCI-USB card to increase USB bandwidth

Is there any limitation on the library?

Default brightness setting makes image very dark for my integrated camera

The default brightness setting of 0 (defined here) makes the image from my integrated camera very dark. I have a Lenovo ThinkPad T490 with an Acer integrated camera (5986:2113), and v4l2-ctl -l reports the brightness range is [0, 255] with a default value of 128.

I'm able to work around this by just setting the brightness when I launch a libuvc_camera node, but I'm posting this in case anyone else runs into it, and on the off-chance that it'd be feasible to use the system defaults instead of hard-coded defaults that might not be appropriate for all systems.

Permission denied issues

Permission denied error should print which /dev/bus/usb/ device

Need example udev rule

SUBSYSTEM=="usb", ATTRS{idVendor}=="f00f", ATTRS{idProduct}=="f0f0", GROUP="video"

Missing config files?

Hello,

I'm trying to use this package but I get this message when I do the catkin_make:

CMake Error at libuvc_ros-master/libuvc_camera/CMakeLists.txt:9 (find_package):
By not providing "Findlibuvc.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libuvc", but
CMake did not find one.

Could not find a package configuration file provided by "libuvc" with any
of the following names:

libuvcConfig.cmake
libuvc-config.cmake

Add the installation prefix of "libuvc" to CMAKE_PREFIX_PATH or set
"libuvc_DIR" to a directory containing one of the above files. If "libuvc"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!
See also "/home/paulo/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/paulo/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Missing config files?

uvc_find_device: No such device (-4) error with Ricoh Theta S

lsusb -v shows:

Bus 003 Device 011: ID 05ca:0366 Ricoh Co., Ltd 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x05ca Ricoh Co., Ltd
  idProduct          0x0366 
  bcdDevice            1.00
  iManufacturer           1 Ricoh Company, Ltd.
  iProduct                2 RICOH THETA S
  iSerial                 3 00237095
  bNumConfigurations      1

/etc/udev/rules.d/99-uvc.rules:

# UVC cameras
`SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="05ca", ATTRS{idProduct}=="0366", MODE="0666"`

launch file:

<launch>
  <group ns="camera">
    <node pkg="libuvc_camera" type="camera_node" name="mycam">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x05ca"/>
      <param name="product" value="0x0366"/>
      <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="1920"/>
      <param name="height" value="1080"/>
      <!-- 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>

I also added blacklist uvcvideo and blacklist snd-usb-audio to /etc/modprobe.d/uvc.conf.

Calling v4l2-ctl --list-formats-ext gives me Failed to open /dev/video0: No such file or directory

ros libuvc_camera stopped working

I am using the rosrun on Nvidia Ubuntu 14.04 platform and i have USB Camera ( UVC Complaint ), i ran the following,

roscore rosrun libuvc_camera camera_node

It worked fine, then i started installing the other components like kinect, stereo camera drivers ( some more components )

after that it stopped working,

root@tegra-ubuntu:/home/ubuntu# rosrun --debug libuvc_camera camera_node

[rosrun] Looking in catkin libexec dirs: /opt/ros/indigo/lib/libuvc_camera

[rosrun] Looking in rospack dir: /opt/ros/indigo/share/libuvc_camera

[rosrun] Searching for camera_node with permissions /111

[rosrun] Running /opt/ros/indigo/lib/libuvc_camera/camera_node

uvc_start_iso_streaming: Busy (-6)

before running this command, i have two video nodes video0 & video1 and i could able to see both videos using luvcview.

After i ran this command, i got only the video0 only ( also it seems that earlier video1 node becomes video0 )

Please share your inputs

patch releases

Heya, you just merged all three requests for libuvc and libuvc_ros.
Thanks for that!
Could you please do new patch releases for both modules to get those things fixed in ros-hydro?

Arducam/ardushield

Hi !
I can not figure out why I can't use this library with the usb-connected arducam (using ardushield for usb connection)

Can you help me out ?
Thanks!

scanning_mode has very large values, and dynamic reconfiguration isn't possible

I've been trying the very latest libuvc and libuvc_camera with ros jade on Ubuntu 14.04 and either a Logitech C930e or a Webcam 9000 Pro and I can't reconfigure the camera. The scanning_mode initial value is very large and often negative, and appears random on every launch of the camera_node. Trying to change most other parameters triggers an attempt to set scanning_mode to a sane value which fails- and sometimes makes the setting of the other value fail.

rqt_reconfigure doesn't like the big numbers and generates a ValueError.

I have more details here:

http://answers.ros.org/question/220560/dynamic-reconfigure-with-libuvc_camera-in-jade/

uvc_get_stream_ctrl_format_size: Invalid mode (-51)

Hi,

I am trying to use a Logitech c920 Pro camera in ROS.
I installed everything, usb_cam driver is working fine, but the FPS is low.
I have some issues with libuvc_ros with the camera. It is working with the attached launch file, but I can not increase the FPS for fullhd resolution. The supported modes is in this file:
modes.txt

It is working only if the video_mode is uncompressed or yuyv and the frame_rate is 5. In the modes, I can see jpeg video_mode, where the frame_rate is 30, but if I try to set it up, I get -51 error.

Where should I search for the problem?

Launch file:

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

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

      <param name="timestamp_method" value="start"/> <!-- start of frame -->
      <param name="camera_info_url" value="file:///home/ubuntu/src/libuvc/cameras/logitech_hd_pro_920.txt"/>

      <param name="auto_exposure" value="3"/> <!-- use aperture_priority auto exposure -->
      <param name="auto_white_balance" value="false"/>
    </node>
  </group>
</launch>

Add libuvc_ros to ROS Kinetic main repository

There is actually no usb cam driver cam as binary for Kinetic.
Please add this package to Kinetic main repository, so we can install via:

sudo apt-get install ros-kinetic-libuvc-ros

Missing README file!

I'm trying tofigure out the relationship between this and the variious other ros uvc packages. It would be great if there was a README file that explained what this was, what the status for this was ... and what the corresponding ros package/node was.

I posted some more inter-related questions here: ros-drivers/camera_umd#16

Thanks !

uvc_get_stream_ctrl_format_size: Invalid mode

Hello I'm having some issues in running libuvc_camera.
I've done as described in the wiki, but i still have some issue, roslaunch it's returning terminating with uvc_get_stream_ctrl_format_size: Invalid mode

I've being double checking vendor, product, serial, res, format and fps but it looks good, any advice ?

Thank you :)

lsusb

Bus 001 Device 007: ID 0ac8:3410 Z-Star Microelectronics Corp. 
Bus 001 Device 006: ID 0ac8:3420 Z-Star Microelectronics Corp. Venus USB2.0 Camera

v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUV 4:2:2 (YUYV)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 176x144
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 160x120
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)

camera.launch

<launch>
  <group ns="rosbot">
    <node pkg="libuvc_camera" type="camera_node" name="left">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x0ac8"/>
      <param name="product" value="0x3410"/>
      <param name="serial" value="0"/>
      <!-- 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="yuyv"/> <!-- 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:///home/cesare/.ros/camera_info/left_camera.yaml"/>

      <!-- <param name="auto_exposure" value="3"/> --> <!-- use aperture_priority auto exposure -->
      <!-- <param name="auto_white_balance" value="false"/> -->
    </node>
  </group>
</launch>

roslaunch camera.launch

... logging to /home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/roslaunch-cesare-6762.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ros_master:56671/

SUMMARY
========

PARAMETERS
 * /rosbot/left/camera_info_url: file:///home/cesa...
 * /rosbot/left/frame_rate: 15
 * /rosbot/left/height: 480
 * /rosbot/left/index: 0
 * /rosbot/left/product: 0x3410
 * /rosbot/left/serial: 0
 * /rosbot/left/timestamp_method: start
 * /rosbot/left/vendor: 0x0ac8
 * /rosbot/left/video_mode: yuyv
 * /rosbot/left/width: 640
 * /rosdistro: indigo
 * /rosversion: 1.11.10

NODES
  /rosbot/
    left (libuvc_camera/camera_node)

ROS_MASTER_URI=http://ros_master:11311
core service [/rosout] found
process[rosbot/left-1]: started with pid [6780]
uvc_get_stream_ctrl_format_size: Invalid mode (-51)
[rosbot/left-1] process has died [pid 6780, exit code 255, cmd /opt/ros/indigo/lib/libuvc_camera/camera_node __name:=left __log:=/home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/rosbot-left-1.log].
log file: /home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/rosbot-left-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Release on noetic

Is it possible to release this package on noetic ? It works fine on Ubuntu 20.04 with libuvc-dev (PR in rosdep ros/rosdistro#28285)

I can help to release it if needed.

Compilation with Clang fails

Hello,

Compilation with Clang under OSX fails due to:

/Users/tatsch/catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp/Users/tatsch/catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp::128128::55:: errorerror: : use useof ofundeclared undeclaredidentifier 'uvc_set_focus_auto';identifier did
'uvc_set_focus_auto'; youdid
mean you'uvc_set_focus_abs'? mean
'uvc_set_focus_abs'?

When the incriminating line is commented:

//PARAM_INT(auto_focus, focus_auto, new_config.auto_focus ? 1 : 0);

I still can't compile due to:

make[2]: *** No rule to make target /usr/local/Cellar/libuvc/0.0.3/lib/libuvc.so', needed by/Users/tatsch/catkin_ws/devel/lib/libuvc_camera/camera_node'. Stop.
make[1]: *** [libuvc_ros/libuvc_camera/CMakeFiles/camera_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target /usr/local/Cellar/libuvc/0.0.3/lib/libuvc.so', needed by/Users/tatsch/catkin_ws/devel/lib/liblibuvc_camera_nodelet.dylib'. Stop.
make[1]: *** [libuvc_ros/libuvc_camera/CMakeFiles/libuvc_camera_nodelet.dir/all] Error 2

But I guess that is libuvc's fault? Or can somebody give me some hints?

libuvc_camera install fails, OS X 10.11.12, ROS Indigo

Hi, I cloned the most recent version of the libuvc_ros repo (master) into my src folder and ran catkin_make_isolated --pkg libuvc_camera --install , and then I got an error while building, I reproduced the error, as suggested, and got:

<== Failed to process package 'libuvc_camera':
Command '['/Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /Users/gunshigupta/ros_catkin_ws/build_isolated/libuvc_camera && /Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh make -j4 -l4

Command failed, exiting.
yguns-MacBook-Pro:ros_catkin_ws gunshigupta$ cd /Users/gunshigupta/ros_catkin_ws/build_isolated/libuvc_camera && /Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh make -j4 -l4
[ 14%] Built target libuvc_camera_gencfg
[ 42%] Building CXX object CMakeFiles/libuvc_camera_nodelet.dir/src/camera_driver.cpp.o
[ 42%] Building CXX object CMakeFiles/camera_node.dir/src/camera_driver.cpp.o
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:193:/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp28::193 :28: error: error:
use
ofuse undeclaredof identifierundeclared 'uvc_mjpeg2rgb'identifier
'uvc_mjpeg2rgb'
uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_); uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_);

                       ^
                       ^

/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:242::24259::59 : warning: warning:

        formatformat  specifiesspecifies  typetype  'unsigned int''unsigned int'  butbut  thethe  argumentargument  hashas  typetype  'size_t''size_t'

        (aka 'unsigned long')(aka 'unsigned long')  [-Wformat][-Wformat]

     status_class, event, selector, status_attribute, data_en);
     status_class, event, selector, status_attribute, data_len);                                                          ^~~~~~~~

                                                      ^~~~~~~~

/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:245:13: warning: /Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp
: 245enumeration: 13value: 'UVC_STATUS_CLASS_CONTROL' notwarning : handled in
switch enumeration
value[-Wswitch] 'UVC_STATUS_CLASS_CONTROL'
not handled in switch
[-Wswitch]
switch (status_class) {
^
switch (status_class) {
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:323:26: error:
use of undeclared identifier 'uvc_find_devices'; did you mean
'uv_find_device'?
uvc_error_t find_err = uvc_find_devices(
^~~~~~~~~~~~~~~~
uv_find_device
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:371:13: note:
'uvc_find_device' declared here
uvc_error_t uvc_find_device(
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:323:26: error:
use of undeclared identifier 'uvc_find_devices'; did you mean
'uv_find_device'?
uvc_error_t find_err = uvc_find_devices(
^~~~~~~~~~~~~~~~
uv_find_device
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:371:13: note:
'uvc_find_device' declared here
uvc_error_t uvc_find_device(
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp324::32411::11 : errorerror: :

        cannotcannot  initializeinitialize  aa  parameterparameter  ofof  typetype  'uvc_device_t **''uvc_device_t **'

        (aka 'uvc_device **')(aka 'uvc_device **')  withwith  anan  rvaluervalue  ofof  typetype  'uvc_device_t ***''uvc_device_t ***'

        (aka 'uvc_device ***')(aka 'uvc_device ***')

ctx_, &devs,    ctx_, &devs,

      ^~~~~          ^~~~~

/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:373:20: note: passing
argument to parameter 'dev' here
uvc_device_t *_dev,
^
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:373:20: note: passing
argument to parameter 'dev' here
uvc_device_t *_dev,
^
2 warnings and 3 errors generated.
2 warnings and 3 errors generated.
make[2]: *** [CMakeFiles/camera_node.dir/src/camera_driver.cpp.o] Error 1
make[2]: *** [CMakeFiles/libuvc_camera_nodelet.dir/src/camera_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/camera_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/libuvc_camera_nodelet.dir/all] Error 2
make: *** [all] Error 2

What do I do to fix it?
Thanks!

"env: python2: No such file or directory" on OSX 10.11

The first line of libuvc_ros/libuvc_camera/cfg/UVCCamera.cfg is
#! /usr/bin/env python2 this results in the following error
env: python2: No such file or directory
I simply changed the first line of the file to #! /usr/bin/env python, it worked, however I am not sure if that is a right solution.

Compilation issue: "camera_driver.cpp:<line> error: <xxx> was not declared in this scope"

I am getting a bunch of errors trying to compile the code all in the following format:

"camera_driver.cpp: error: was not declared in this scope"
if (uvc_set_##fn(devh_, val)) { \

For example:

libuvc_ros/libuvc_camera/src/camera_driver.cpp:117:34: error: 'uvc_set_gain' was not declared in this scope
if (uvc_set_##fn(devh_, val)) {

I have installed libuvc from https://github.com/ktossell/libuvc
compiling with catkin build libuvc_ros

Permission denied opening /dev/bus/usb/003/004

Hey there,

I want to use a logitech camera c930e with libuvc_ros. I currently have this launch file:

<launch>
  <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="0x0843"/>
      <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="mjpeg"/> <!-- or yuyv/nv12/mjpeg -->
      <param name="frame_rate" value="30"/>

      <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>

This is my device lsusb -v:

Bus 003 Device 004: ID 046d:0843 Logitech, Inc. Webcam C930e
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0x0843 Webcam C930e
  bcdDevice            0.13
  iManufacturer           0 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength         2547
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              0 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength          215
        dwClockFrequency       30.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00020a2e
          Auto-Exposure Mode

and I also created this file: /etc/udev/rules.d

# UVC cameras
`SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0843", MODE="0666"`

If I launch the above launch file with camera connected I get this error:

[ERROR] [1551621905.341226531]: Permission denied opening /dev/bus/usb/003/004
[camera/mycam-2] process has died [pid 9685, exit code 255, cmd /opt/ros/kinetic/lib/libuvc_camera/camera_node __name:=mycam __log

any ideas what I did wrong?!

MJPEG support for released package

I believe Motion JPEG(mjpeg) cameras are not supported in current released ROS packages. Is it correct?

I think the remedy is to release libuvc newly (v.0.0.6). It will resolve all problem related to mjpeg.
I'm not sure the backward compatibility of libuvc to v.0.0.5. Are there any difficulties to release libuvc v0.0.6 ? @ktossell

Thank you.

Build issue: uvc_mjpeg2rgb’ was not declared in this scope; did you mean ‘uvc_any2rgb

Hello, I'm one of the ros melodic Arch maintainers and I currently face this issue:
catkin 0.7.19

/build/src/libuvc_ros-0.0.10/libuvc_camera/src/camera_driver.cpp: In member function ‘void libuvc_camera::CameraDriver::ImageCallback(uvc_frame_t*)’:
/build/src/libuvc_ros-0.0.10/libuvc_camera/src/camera_driver.cpp:203:28: error: ‘uvc_mjpeg2rgb’ was not declared in this scope; did you mean ‘uvc_any2rgb’?
  203 |     uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_);
      |                            ^~~~~~~~~~~~~
      |                            uvc_any2rgb
/build/src/libuvc_ros-0.0.10/libuvc_camera/src/camera_driver.cpp: In member function ‘void libuvc_camera::CameraDriver::ImageCallback(uvc_frame_t*)’:
/build/src/libuvc_ros-0.0.10/libuvc_camera/src/camera_driver.cpp:203:28: error: ‘uvc_mjpeg2rgb’ was not declared in this scope; did you mean ‘uvc_any2rgb’?
  203 |     uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_);
      |                            ^~~~~~~~~~~~~
      |                            uvc_any2rgb
make[2]: *** [CMakeFiles/camera_node.dir/build.make:76: CMakeFiles/camera_node.dir/src/camera_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:156: CMakeFiles/camera_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/libuvc_camera_nodelet.dir/build.make:76: CMakeFiles/libuvc_camera_nodelet.dir/src/camera_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/libuvc_camera_nodelet.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Support for Y16 Grayscale

I have a stereo camera which outputs video in the Y16 grayscale format equivalent to V4L2_PIX_FMT_Y16.

I am trying to figure out how to adapt the libuvc_camera driver to support this and would be grateful for any suggestions on what would be the best way to go about this.

Image not rendered correctly

Hi,
I would like to test a USB camera on ROS. I have followed the procedure to setup libuvc but the image on the raw topic is not rendered well.

This is a capture of the image on the topic /camera/image_raw, as you will see the image seems to be duplicated.
libuvc_problem

This is the output of the v4l2-ctl --list-formats-ext command:

ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'UYVY'
	Name        : UYVY 4:2:2
		Size: Discrete 640x480
			Interval: Discrete 0.017s (60.000 fps)
			Interval: Discrete 0.022s (45.000 fps)
		Size: Discrete 960x540
			Interval: Discrete 0.017s (58.000 fps)
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x960
			Interval: Discrete 0.029s (34.000 fps)
			Interval: Discrete 0.044s (22.500 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.022s (45.000 fps)
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.067s (15.000 fps)

And this is my launch file:

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

      <!-- Image size and type -->
      <param name="width" value="960"/>
      <param name="height" value="540"/>
      <!-- choose whichever uncompressed format the camera supports: -->
      <param name="video_mode" value="uyvy"/> <!-- or uncompressed/ yuyv/nv12/mjpeg -->
      <param name="frame_rate" value="30"/>

      <param name="timestamp_method" value="start"/> <!-- start of frame -->
      <param name="camera_info_url" value="package://robot/config/cam0_calib.yaml"/>

      <param name="auto_exposure" value="3"/> <!-- use aperture_priority auto exposure -->
      <param name="auto_white_balance" value="false"/>
    </node>
  </group>
</launch>

Do you see something wrong?

My configuration is a computer running Ubuntu 16.04 with ROS Kinetic.

Thanks in advance,
Yoann.

No time stamp

There is no time stamp in /image_raw/header when I run rosrun libuvc_camera camera_node. I'm using Orbbec Astra Pro camera in Ubuntu16.04 and ROS Kinectic.

Here is one of example of /image_raw/header.

seq: 35
stamp:
secs: 0
nsecs: 0
frame_id: camera

Device not found

Hi,

I'm having a problem with my PS3 eye camera, getting a device not found error (-4).

dmesg output for the camera:

[ 1096.865989] usb 2-1.6: USB disconnect, device number 5
[ 1098.343289] usb 2-1.6: new high-speed USB device number 6 using ehci-pci
[ 1098.437941] usb 2-1.6: New USB device found, idVendor=1415, idProduct=2000
[ 1098.437946] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1098.437949] usb 2-1.6: Product: USB Camera-B4.09.24.1
[ 1098.437952] usb 2-1.6: Manufacturer: OmniVision Technologies, Inc.
[ 1098.438363] gspca_main: ov534-2.14.0 probing 1415:2000

My launch file:

  <!-- 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="yuyv"/> <!-- or yuyv/nv12/jpeg -->
  <param name="frame_rate" value="30"/>

  <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>

Execution output:

SUMMARY

PARAMETERS

  • /rosdistro: indigo
  • /rosversion: 1.11.9
  • /uas1/camera/auto_exposure: 3
  • /uas1/camera/auto_white_balance: False
  • /uas1/camera/camera_info_url: file:///tmp/cam.yaml
  • /uas1/camera/frame_rate: 30
  • /uas1/camera/height: 480
  • /uas1/camera/product: 0x2000
  • /uas1/camera/serial: 0
  • /uas1/camera/timestamp_method: start
  • /uas1/camera/vendor: 0x1415
  • /uas1/camera/video_mode: yuyv
  • /uas1/camera/width: 640

NODES
/uas1/
camera (libuvc_camera/camera_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[uas1/camera-1]: started with pid [10087]
uvc_find_device: No such device (-4)
[uas1/camera-1] process has died [pid 10087, exit code 255, cmd /home/rmw/devel/ros/devel/lib/libuvc_camera/camera_node __name:=camera __log:=/home/rmw/.ros/log/0432b43a-3e7a-11e4-b1a0-a0b3ccfb07e5/uas1-camera-1.log].
log file: /home/rmw/.ros/log/0432b43a-3e7a-11e4-b1a0-a0b3ccfb07e5/uas1-camera-1*.log
all processes on machine have died, roslaunch will exit

Any help would be appreciated.

Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j12 -l12" failed

I just git clone the packages and catkin_make, I got such error.

My ROS verision is kinetic

CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::~CameraDriver()': camera_driver.cpp:(.text+0x4a4): undefined reference to uvc_free_frame'
camera_driver.cpp:(.text+0x4c7): undefined reference to uvc_exit' CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::Start()':
camera_driver.cpp:(.text+0x67f): undefined reference to uvc_init' camera_driver.cpp:(.text+0x6a0): undefined reference to uvc_perror'
CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::Stop()': camera_driver.cpp:(.text+0x847): undefined reference to uvc_exit'
CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::ReconfigureCallback(libuvc_camera::UVCCameraConfig&, unsigned int)': camera_driver.cpp:(.text+0xa0d): undefined reference to uvc_set_scanning_mode'
camera_driver.cpp:(.text+0xba5): undefined reference to uvc_set_ae_mode' camera_driver.cpp:(.text+0xd32): undefined reference to uvc_set_ae_priority'
camera_driver.cpp:(.text+0xeda): undefined reference to uvc_set_exposure_abs' camera_driver.cpp:(.text+0x107e): undefined reference to uvc_set_focus_auto'
camera_driver.cpp:(.text+0x120c): undefined reference to uvc_set_focus_abs' camera_driver.cpp:(.text+0x1399): undefined reference to uvc_set_gain'
camera_driver.cpp:(.text+0x1538): undefined reference to uvc_set_iris_abs' camera_driver.cpp:(.text+0x16c0): undefined reference to uvc_set_brightness'
camera_driver.cpp:(.text+0x1860): undefined reference to uvc_set_pantilt_abs' CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::ImageCallback(uvc_frame*)':
camera_driver.cpp:(.text+0x1ee0): undefined reference to uvc_uyvy2bgr' camera_driver.cpp:(.text+0x1f01): undefined reference to uvc_perror'
camera_driver.cpp:(.text+0x2192): undefined reference to uvc_yuyv2bgr' camera_driver.cpp:(.text+0x21b3): undefined reference to uvc_perror'
camera_driver.cpp:(.text+0x2266): undefined reference to uvc_mjpeg2rgb' camera_driver.cpp:(.text+0x2287): undefined reference to uvc_perror'
camera_driver.cpp:(.text+0x2327): undefined reference to uvc_any2bgr' camera_driver.cpp:(.text+0x2348): undefined reference to uvc_perror'
CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::OpenCamera(libuvc_camera::UVCCameraConfig&)': camera_driver.cpp:(.text+0x301c): undefined reference to uvc_find_devices'
camera_driver.cpp:(.text+0x303d): undefined reference to uvc_perror' camera_driver.cpp:(.text+0x30de): undefined reference to uvc_unref_device'
camera_driver.cpp:(.text+0x3236): undefined reference to uvc_open' camera_driver.cpp:(.text+0x3330): undefined reference to uvc_get_device_address'
camera_driver.cpp:(.text+0x3349): undefined reference to uvc_get_bus_number' camera_driver.cpp:(.text+0x345f): undefined reference to uvc_strerror'
camera_driver.cpp:(.text+0x3478): undefined reference to uvc_get_device_address' camera_driver.cpp:(.text+0x3491): undefined reference to uvc_get_bus_number'
camera_driver.cpp:(.text+0x34f8): undefined reference to uvc_unref_device' camera_driver.cpp:(.text+0x351f): undefined reference to uvc_set_status_callback'
camera_driver.cpp:(.text+0x35a5): undefined reference to uvc_get_stream_ctrl_format_size' camera_driver.cpp:(.text+0x35d6): undefined reference to uvc_perror'
camera_driver.cpp:(.text+0x35ec): undefined reference to uvc_close' camera_driver.cpp:(.text+0x3602): undefined reference to uvc_unref_device'
camera_driver.cpp:(.text+0x3721): undefined reference to uvc_print_diag' camera_driver.cpp:(.text+0x3755): undefined reference to uvc_start_streaming'
camera_driver.cpp:(.text+0x3776): undefined reference to uvc_perror' camera_driver.cpp:(.text+0x378c): undefined reference to uvc_close'
camera_driver.cpp:(.text+0x37a2): undefined reference to uvc_unref_device' camera_driver.cpp:(.text+0x37d0): undefined reference to uvc_free_frame'
camera_driver.cpp:(.text+0x37fd): undefined reference to uvc_allocate_frame' CMakeFiles/camera_node.dir/src/camera_driver.cpp.o: In function libuvc_camera::CameraDriver::CloseCamera()':
camera_driver.cpp:(.text+0x39ab): undefined reference to uvc_close' camera_driver.cpp:(.text+0x39cd): undefined reference to uvc_unref_device'
collect2: error: ld returned 1 exit status
libuvc_ros/libuvc_camera/CMakeFiles/camera_node.dir/build.make:192: recipe for target '/home/ur5/ur5_ws/devel/lib/libuvc_camera/camera_node' failed
make[2]: *** [/home/ur5/ur5_ws/devel/lib/libuvc_camera/camera_node] Error 1
CMakeFiles/Makefile2:8705: recipe for target 'libuvc_ros/libuvc_camera/CMakeFiles/camera_node.dir/all' failed
make[1]: *** [libuvc_ros/libuvc_camera/CMakeFiles/camera_node.dir/all] Error 2

Could you tell me how to fix such error?

Using multiple cameras efficiently

Hi!

I've been trying to figure out this one for quite a while now. I have 3 cameras (same manufacturer and model), when checking the settings the 3 parameters of vendor, product and serial are the same. The only way I can launch different cameras is by modifying the index parameter.

Is there any way I can have a control of the camera index? Ideally I would like to prefix my camera names according to the robot placement (forward, left, right). If the driver used the device path (/dev/video0 etc) then I would create a symlink based on the USB port the device is connected to.

Any tips how could I solve this particular problem? I know uvc_camera node can take a device path but I would prefer to stick with libuvc_ros if possible.

camera freezes when trying to set dynamic_parameters

Hi,

I would like to change resolution and frame rate when it is running. I see that it is possible to do it with dynamic paramters.

In my launch file I am starting the camera 5FPS FullHd yuyv, but with the above script I would like to set 640x480 resolution and 20FPS:

rosrun dynamic_reconfigure dynparam set /camera/c920 "{'width':640, 'height':480, 'frame_rate': 20}" 

The code runs just fine (without error), but the image stops and I have to restart libuvc camera driver to be able to use again.

Am I doing anything wrong?

Thanks!

Image is all green

When using libuvc, I am having an issue that the image is all green when saturated (instead of all white). I believe this is because the image is being interpreted as the wrong type. When using OpenCV, I can see the correct image by recoloring it as such:

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) proc = cv2.cvtColor(gray, cv2.COLOR_BayerBG2BGR)
How do I solve this problem in libuvc_ros ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.