Ask Your Question
0

Questions regarding usb cameras

asked 2012-03-17 18:33:38 -0600

Sinjon gravatar image

updated 2012-03-18 14:58:54 -0600

Kevin gravatar image

Hi,

I'm new to ROS as well as to linux and has been trying to get the usb camera to work.

I've followed the tutorials from: http://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironment and http://www.ros.org/wiki/ROS/Tutorials/StackInstallation and http://www.iheartrobotics.com/2010/05/vision-for-robots-1-of-n-setup.html

but I'm still unable to install it properly. When i try to enter the command $rosmake --rosdep-install I get the error "No package or stack specified. And current directory 'usb_cam' is not a package name or stack name."

Can someone help me? thanks in advance!

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
2

answered 2012-03-17 20:52:55 -0600

I Heart Robotics gravatar image

If you can deal with the code being GPL, you may want to try using this driver http://www.ros.org/wiki/uvc_camera

The tutorials will be updated after Fuerte is released hopefully.

edit flag offensive delete link more

Comments

1

The only caveat is the USB camera has to support USB Video Class (UVC). It seems a lot of them do, but not everything ... for example the camera in my MacBook.

Kevin gravatar imageKevin ( 2012-03-18 03:03:48 -0600 )edit
1

uvc_camera uses video4linux, so it should work with most of the non-UVC cameras that v4l supports. Support for non-UVC cameras is probably going to be moved into a separate node when uvc_camera is replaced with a cross-platform, UVC-only version.

Ken gravatar imageKen ( 2012-03-18 06:26:15 -0600 )edit
1

Ah ... I am confused. I was referring to libuvc_ros (which does work on my macbook, just not with the built in camera) and got confused with uvc_camera (which I guess uses v4l).

Kevin gravatar imageKevin ( 2012-03-18 14:52:05 -0600 )edit
1

answered 2012-03-18 14:53:06 -0600

Kevin gravatar image

updated 2012-03-18 14:58:36 -0600

You can also try libuvc_ros. It works pretty good with Logitech cameras on my MacBook.

edit flag offensive delete link more
0

answered 2012-03-28 19:53:06 -0600

Sinjon gravatar image

I am finally able to build the package. I was wondering why rosbuild doesn't work but build actually allows me to compile the codes. Also, after running the launch file, i do not see the video on my screen. My webcam is activated though. Here is errors from i get after using the launch file.

started roslaunch server http://ubuntu:51743/

SUMMARY

PARAMETERS * /uvc_camera/device * /rosdistro * /uvc_camera/fps * /uvc_camera/height * /uvc_camera/camera_info_url * /uvc_camera/frame * /rosversion * /uvc_camera/width

NODES / uvc_camera (uvc_camera/camera_node)

auto-starting new master process[master]: started with pid [3224] ROS_MASTER_URI=http://localhost:11311

setting /run_id to e3b85c52-7962-11e1-b7f2-00269e97ef00 process[rosout-1]: started with pid [3237] started core service [/rosout] process[uvc_camera-2]: started with pid [3245] [rospack] opendir error [No such file or directory] while crawling /home/sinjon/ros_workspace

[rospack] opendir error [No such file or directory] while crawling /home/sinjonros_workspace

opening /dev/video0 pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)' discrete: 640x480: 1/24 discrete: 352x288: 1/24 discrete: 320x240: 1/24 discrete: 176x144: 1/24 discrete: 160x120: 1/24 int (Brightness, 0, id = 980900): 0 to 127 (1) int (Contrast, 0, id = 980901): 0 to 127 (1) int (Saturation, 0, id = 980902): 0 to 127 (1) int (Hue, 0, id = 980903): -180 to 180 (1) bool (White Balance Temperature, Auto, 0, id = 98090c): 0 to 1 (1) int (Gamma, 0, id = 980910): 1 to 500 (1) menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1) 0: Disabled 1: 50 Hz 2: 60 Hz int (White Balance Temperature, 0, id = 98091a): 2800 to 6500 (1) int (Sharpness, 0, id = 98091b): 0 to 127 (1) int (Backlight Compensation, 0, id = 98091c): 0 to 2 (1) bool (Exposure, Auto Priority, 0, id = 9a0903): 0 to 1 (1) current value of 10094851 is 1 unable to set control: Invalid argument ERROR: could not set some settings.
unable to set control

edit flag offensive delete link more

Comments

also, i am trying to get my USB camera to work and i also have a inbuilt laptop camera. Currently it is activating my laptop camera. How do i switch over to the usb camera?

Sinjon gravatar imageSinjon ( 2012-03-28 20:03:50 -0600 )edit

I have the same failure message (ERROR: could not set some setting)... could you solve the problem?

dinamex gravatar imagedinamex ( 2012-07-06 11:28:10 -0600 )edit
0

answered 2012-03-18 17:48:49 -0600

Sinjon gravatar image

I've managed to figure out how to install the dependancies but have been trying to run the package. After typing in the following:

roslaunch ~/ros/stacks/camera_umd/uvc_camera/launch/camera_node.launch

i get this error:

Cannot locate installation of package uvc_camera: [rospack] opendir error [No such file or directory] while crawling /home/sinjon/ros_workspace [rospack] opendir error [No such file or directory] while crawling home/sinjon/ros/stacks [rospack] couldn't find package [uvc_camera]. ROS_ROOT[/opt/ros/electric/ros] ROS_PACKAGE_PATH[/home/sinjon/ros_workspace:/opt/ros/electric/stacks:home/sinjon/ros/stacks]

The package is in home/sinjon/ros/stacks/camera_umd/uvc_camera

did i do something wrong?

edit flag offensive delete link more

Comments

One you downloaded it, you need to make sure the directory is in your path and that you run rosmake to compile it.

The tutorials might help. http://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironmenthttp://www.ros.org/wiki/ROS/Tutorials/BuildingPackages

I Heart Robotics gravatar imageI Heart Robotics ( 2012-03-20 15:27:04 -0600 )edit

One you downloaded it, you need to make sure the directory is in your path and that you run rosmake to compile it.

I Heart Robotics gravatar imageI Heart Robotics ( 2012-03-20 15:27:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-03-17 18:33:38 -0600

Seen: 3,177 times

Last updated: Mar 28 '12