ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
5

how to install a driver like usb_cam

asked 2014-11-18 02:54:56 -0500

kdsong gravatar image

i have searched the sensor list on the: http://wiki.ros.org/Sensors#Cameras

but i want know how to install it if i know the Source: git https://github.com/bosch-ros-pkg/usb_... (branch: master)

thanks a lot

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2018-06-03 23:35:57 -0500

raunaks gravatar image

You can also use sudo apt-get install ros-kinetic-usb-cam, replacing kinetic with your desired distribution. This will install the package to your /opt/ros/kinetic/lib directory.

edit flag offensive delete link more

Comments

These days (sometime after ROS Indigo era), binary of usb_cam has been released, so I think this is more preferable answer.

130s gravatar image130s ( 2018-09-15 17:14:53 -0500 )edit
5

answered 2014-11-18 04:32:05 -0500

MKI gravatar image

updated 2014-11-18 04:36:26 -0500

Hi,

Right now, Like you have mentioned the usb_cam has source code for wet build (catkin build). you just need to do the following to build it from source. (Note: I assume you are using ROS hydro or Indigo, It should work on groovy as well may be you can try it). But all that said, here you go:

$ mkdir -p ~/catkin-ws/src

$ cd ~/catkin-ws/src

$ git clone https://github.com/bosch-ros-pkg/usb_cam.git

$ cd ..

$ catkin_make

$ source ~/catkin-ws/devel/setup.bash

after the above you can verify using ..

$ roscd usb_cam

roscore on a new terminal $ roscore

and then in the terminal where you $ source 'd your usb_cam code run:

$ rosrun usb_cam usb_cam_node

Make sure you have your camera connected, before running the above command!!! you view the captured image on rviz,

$ rosrun rviz rviz

hope this helps. mk

edit flag offensive delete link more

Comments

thank you very much ,i have install it success! it can give me the method to install other drivers ! !

kdsong gravatar imagekdsong ( 2014-11-18 05:14:13 -0500 )edit

It worked for me as well. But I would like to connect to my usb cam that i have connected externally instead of my laptop's internal webcam... is there any way I could do that.???

R@m gravatar imageR@m ( 2016-05-27 03:42:55 -0500 )edit
1

To connect external cam. Locate the usb_cam-test.launch file in folder cd ~/catkin-ws/src/usb_cam/launch Change <param name="video_device" value="/dev/video0" /> to <param name="video_device" value="/dev/video1" /> From cd ~/catkin-ws/src/usb_cam/launch.Run roslaunch usb_cam-test.launch

GT gravatar imageGT ( 2016-10-19 18:18:46 -0500 )edit

See this one if u want to run more than one cam

http://answers.ros.org/question/218573/running-2-different-cameras-using-usb_cam/
GT gravatar imageGT ( 2016-10-20 19:17:25 -0500 )edit

when I run $ rosrun usb_cam usb_cam_node, I got an error [ERROR] [1488942795.328150657]: outbuf size mismatch. pic_size: 814080 bufsize: 614400. But if I run roslaunch usb_cam-test.launch directly, I could get the video. How could I fix that error?

michael_kong gravatar imagemichael_kong ( 2017-03-07 21:30:46 -0500 )edit

Well I have problem directly using catkin_make, and I solve it by type sudo apt-get install ros-kinetic-usb-cam first and then catkin_make again.

dolphinlove gravatar imagedolphinlove ( 2018-06-27 03:38:52 -0500 )edit
0

answered 2016-03-28 11:39:58 -0500

Joy.Lin gravatar image

There are some errors about comand "$ rosrun usb_cam usb_cam_node" . It shows error message like the following. I have tried to open my camera (logitech C920) with guvcview successfully. However,it still can't work on ROS . using indigo ; workspace catkin

Thank a lot.

udooer@udoo:~$ rosrun usb_cam usb_cam_node

edit flag offensive delete link more

Comments

1

This is a question. Please post it as a new question instead of reopening an old thread.

ahendrix gravatar imageahendrix ( 2016-03-28 11:44:16 -0500 )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: 2014-11-18 02:54:56 -0500

Seen: 16,075 times

Last updated: Nov 18 '14