使用ROS开启笔记本摄像头之usb_cam

1 在ROS下常用的主要有两种驱动包:usb_cam和uvc_cam,我这里用的是usb_cam(更多的方法参考:https://blog.csdn.net/wilylcyu/article/details/51732710)

2 usb_cam安装:

在ROS工作空间下采用源码安装:

$ cd catkin_ws/src  
$ git clone https://github.com/bosch-ros-pkg/usb_cam.git  
$ cd ..  
$ catkin_make  

其中, catkin_ws是工作空间名

3 运行usb_cam_node开启摄像头

3.1 首先要开启一个终端,开启roscore

3.2 然后开启一个新的终端:

新版本的usb_cam包在launch文件夹下有自带的launch文件,名叫usb_cam-test.launch,我们可以直接cd到这个文件夹下运行它。(我起初直接运行的:rosrun usb_cam usb_cam_node)会出现错误(因为会少一些参数).

$ cd  
$ cd catkin_ws/src/usb_cam/launch  
$ roslaunch usb_cam-test.launch 

所以直接运行launch文件就好.运行成功后可以看一下产生的话题.

/image_view/output
/image_view/parameter_descriptions
/image_view/parameter_updates
/rosout
/rosout_agg
/usb_cam/camera_info
/usb_cam/image_raw
/usb_cam/image_raw/compressed
/usb_cam/image_raw/compressed/parameter_descriptions
/usb_cam/image_raw/compressed/parameter_updates
/usb_cam/image_raw/compressedDepth
/usb_cam/image_raw/compressedDepth/parameter_descriptions
/usb_cam/image_raw/compressedDepth/parameter_updates
/usb_cam/image_raw/theora
/usb_cam/image_raw/theora/parameter_descriptions

/usb_cam/image_raw/theora/parameter_updates


附:直接运行rosrun usb_cam usb_cam_node出现的错误如下:

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值