0
$\begingroup$

Rosanswers logo

Hi all,

What is the best webcam driver for ROS Kinetic? I've looked around and it appears libuvc_ros might be OK, but will this work with integrated laptop camera too?

Thanks in advance!

Regards, Martin


Originally posted by MartinW on ROS Answers with karma: 464 on 2016-11-18

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

That driver will work with any UVC compatible camera, so if your laptop camera is a USB camera that is UVC compatible (and almost all of them are these days), then I'd expect it to work.

Under Ubuntu (and probably other distributions as well), you can use guvcview to check: if that works with your camera, then libuvc_cam should as well.


Originally posted by gvdhoorn with karma: 86574 on 2016-11-18

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by MartinW on 2016-11-18:
Thank you for the reply, gvdhoorn.

I tried installing guvcview and got an error saying no device found. I have a latitude E6540, would you happen to know what driver I could use to get it up and running with ROS?

Comment by gvdhoorn on 2016-11-19:
guvcview has nothing to do with ROS, it's a Linux tool for interfacing with UVC compatible cameras. The only reason I mentioned it is because you can use it to make sure your camera is UVC compatible. The fact that guvcview can't find your camera suggests it is not. But ..

Comment by gvdhoorn on 2016-11-19:
.. do you still have Windows on this machine? If so, does the webcam work there? It's rare for webcams to not be USB devices these days, but it is still possible. Try to find out what kind of webcam it is (look at the hardware properties fi), then you could try to set it up under Linux.

Comment by gvdhoorn on 2016-11-19:
Also: a "driver" for ROS is nothing more than a small program that on one side knows how to 'speak ROS', and on the other side can talk to the real, OS-level, driver of your hardware. So the first thing to do is make sure your OS can work with your device. Then worry about ROS.

Comment by gvdhoorn on 2016-11-19:
According to this pdf it should be a Creative Labs Integrated Webcam. The driver seems to suggest it's a USB cam. Don't know about UVC.

Comment by gvdhoorn on 2016-11-19:
Finally: what is the output of ls -al /dev | grep -i video?

Comment by MartinW on 2016-11-21:
Thank you for all the informaio gvdhoorn, the output of the line mentioned above is:

crw-rw----   1 root video    29,   0 Nov 21 14:44 fb0

And it does work in Windows using a program like Picasa. I will try Bluehash's response below!

Comment by gvdhoorn on 2016-11-22:
It very much looks like you don't have any video device, which would explain why you can't get any of the nodes to work (the fb0 device is an output device, not a camera). The usb_cam package suggested by @bluehash essentially does the same things as libuvc_cam, so also won't work.

Comment by gvdhoorn on 2016-11-22:
I would suggest using the Ubuntu support forums to get your camera to work under Ubuntu. After that, we will be more than happy to help you sort out the ROS side of things.

Comment by Orhan on 2017-04-21:
The pointgrey one appears as fb0, not video1. I can use both cameras in ros but opencv uses pointgrey automatically when I plugged it. (by cv::VideoCapture(0))

crw-rw----   1 root video      29,   0 Nis 21 10:55 fb0
crw-rw----+  1 root video      81,   0 Nis 21 10:55 video0

Comment by Orhan on 2017-04-21:
How can I correct this? Need to install ros driver for it?

$\endgroup$
0
$\begingroup$

Rosanswers logo

I can help a little on the ROS side.

I've used usb_cam. The best way to test it on your laptop is to clone the github repo to a src folder in your catkin workspace. Change the video port in the launch file to whatever port your webcam is on. If an integrated camera is used, /dev/video0 should work. I use an external one, for which I use /dev/video1

All you have to do is a catkin_make and launch the node via:

roslaunch launch/usb_cam-test.launch

A video window should open. There will be a list of topics braoadcasting video data. I use /usb_cam/image_raw.

Edit: Tested in ROS Kinetic.


Originally posted by bluehash with karma: 120 on 2016-11-21

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by MartinW on 2016-11-21:
Hi Bluehash, thank you for the response! I cloned usb_cam and was able to catkin_make the package no problem. However, when I try to run the launch I get this error:

" Cannot identify '/dev/video0': 2, No such file or directory "

Is there a Linux command to see devices?

Comment by bluehash on 2016-11-21:
Looks like you don't have a driver for the camera, that gvdhoorn was trying to have you list. Not sure what OS you are using.. or laptop.

$\endgroup$

Your Answer

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