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

how to install a driver like usb_cam

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

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

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 image 130s  ( 2018-09-15 17:14:53 -0600 )edit
6

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

MKI gravatar image

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

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

1

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

kdsong gravatar image kdsong  ( 2014-11-18 05:14:13 -0600 )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 image R@m  ( 2016-05-27 03:42:55 -0600 )edit
2

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 image GT  ( 2016-10-19 18:18:46 -0600 )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 image GT  ( 2016-10-20 19:17:25 -0600 )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 image michael_kong  ( 2017-03-07 21:30:46 -0600 )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 image dolphinlove  ( 2018-06-27 03:38:52 -0600 )edit
0

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

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 image ahendrix  ( 2016-03-28 11:44:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-18 02:54:56 -0600

Seen: 36,223 times

Last updated: Nov 18 '14