ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

libuvc_camera Can't Make instalation or Give Camera ID Values to prebuilt Instalation

asked 2016-10-05 20:30:29 -0500

rmrafferty gravatar image

Hi ROS Answers,

I wanted to see, could I get some help with using the libuvc_camera package? My end goal is to get a setup where I am publishing image data from two webcams (or a stereo topic using the two cameras).

I have been trying two methods of installing the libraries, both having issues. In the first I can't run make my custom installation and in the second I can't give the needed camera ID values for my installation I got with apt-get.

First, I did the typical create a workspace, clone the repository, and then ran catkin_make. However this caused a problem where configuration files could not be found, with the terminal output being:

CMake Error at libuvc_ros/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.

I then downloaded dependencies and made the files again, this just gave me a long list of errors ending with:

Invoking "make -j4 -l4" failed

So second, I removed the installation and installed the package directly with:

sudo apt-get install ros-indigo-libuvc-camera

This got the package successfully, but in trying the next step on the package main page

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

I can not get a vendor or product id that the node will except. Here is the information from my camera's configuration file:

idVendor           0x045e Microsoft Corp.
idProduct          0x075d LifeCam Cinema

I tried giving the command the hex values, but it tells me the are invalid and that the values must only contain a-z,/,and _ . I tried giving it the text versions, but it then tells me it is using the default values of 0x0 and 0x0, which results in it trying to contact USB bus 002 Device 003, which is not my camera. I could not even find the files to try and hard-code the correct values in as a test.

So, my questions are:

  1. What do I need to do to get the second method I tried to work? How do I tell it what vendor and or product ID to look for?
  2. Is there something I missed in the first method that would be better to look at?
  3. I am using Ubuntu Trusty 14.04 with ROS Indigo with an AMD 64 bit processor. The main libuvc_camera page says that "devel ubuntu trusty amd64" is failing its build tests and that there hasn't been any new builds in a long time. Is this an issue?

Thanks a lot for your time, and please let me know if there's anymore information I ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-06 01:54:34 -0500

gvdhoorn gravatar image

updated 2016-10-06 02:08:25 -0500

This is really two separate issues, and it would be better to create two separate questions for them. As it is now:

I then downloaded dependencies and made the files again, this just gave me a long list of errors ending with:

Invoking "make -j4 -l4" failed

This does not seem like a full error message. Please add the relevant parts, as without it we can only guess.

In general: cloning just a package's repository is almost never enough to successfully build a it. Please see Installing package from source in Indigo for the general procedure to build things from source. Note the rosdep install .. command: it will try and install all required dependencies for the package that you are trying to build.

This got the package successfully, but in trying the next step on the package main page

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

Don't ever run ros nodes as root (sudo), it's very rarely really needed. See Rosrun as super user for an earlier Q&A about that.

As to the parameter problem: only private parameters can be passed on the command line, using the _param_name:=value syntax (see rosbash - Command line utilities - rosrun). Without the underscore, you're giving rosrun a remapping argument, which is not what you want.

Using a launch file is probably the easiest way to set parameters that are not meant to be private.


Edit: just noticed that the libuvc_camera/Permissions section does give running as root as one possibility to use the node, but it also continues that section with:

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

I would tend to agree.

I also noticed that the vendor:=.. syntax is suggested on that page. I'm not sure why that is. Afaik, that won't work.

edit flag offensive delete link more

Comments

Thanks a lot for your help @gvdhoorn! got setup using uvc_camera, but it is depreciated, so I would like to get libuvc_camera working at some point, I will follow your suggestions for correctly installing the package and using it when I shift back to it.

rmrafferty gravatar image rmrafferty  ( 2016-11-17 16:39:30 -0500 )edit

Good to hear you got it to work.

If you feel your questions were answered, could I ask you to mark it as such by ticking the checkbox to the left of the answer? That would make it clear for future users that you've resolved your issue.

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-18 00:25:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-05 20:30:29 -0500

Seen: 1,365 times

Last updated: Oct 06 '16