基础步骤:
1.配置工作环境
构建catkin_ws工作空间(预先建立相应文件夹)
cd ~/catkin_ws/src
安装和编译usb_cam
git clone https://github.com/bosch-ros-pkg/usb_cam usb_cam
cd usb_cam
mkdir build
cd build
cmake ..
make
2.启动和测试
roscore //启动ros
roslaunch usb_cam usb_cam-test.launch //在launch文件所在文件夹下运行
3.报错解决方案
错误1:v4l2-ctl: not found
sudo apt-get install v4l-utils
错误2:[usb_cam-test.launch] is neither a launch file in package [usb_cam] nor is [usb_cam] a launch file name The traceback for the exception was written to the log file2
source ~/catkin_ws/devel/setup.bash //要在运行usb_cam usb_cam-test.launch 命令前执行
备注:参考部分博客内容总结整理,侵权请联系删除!