对orb_slam3环境进行配置,下载完usb_cam源码后进行catkin_make编译,其中usb_cam源码网址:git clone https://github.com/bosch-ros-pkg/usb_cam.git
编译报错:
traversing 1 packages in topological order:
-- ~~ - usb_cam (plain cmake)
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_workspace.cmake:100 (message):
This workspace contains non-catkin packages in it, and catkin cannot build
a non-homogeneous workspace without isolation. Try the
'catkin_make_isolated' command instead.
对报错信息进行阅读可知问题是由于usb_cam包不属于catkin类型的包文件,进入usb_cam源码网址发现其默认下载为ros2版本的usb_cam源码,故不能在ros1上编译,所以改变版本重新下载编译。
ros2改为develop,如下图
安装完usb_cam_develop版本之后,在一个终端窗口打开roscore,再打开一窗口进行catkin_make编译,若还是报错,可参考这篇博客:CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113-CSDN博客