要注意的是,我是用小鱼的一键安装ros安装的ros,链接可以参考我的一篇文章开头有:
ubuntu18.04系统中运行./build_ros.sh的时候遇到报错-CSDN博客
我遇到的问题是csdn上搜不到的问题:
CMake Error at /opt/ros/melodic/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.
Call Stack (most recent call first):
CMakeLists.txt:69 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/chenhaining/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/chenhaining/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:423: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
CMake Error at /opt/ros/melodic/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.
Call Stack (most recent call first):
CMakeLists.txt:69 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/chenhaining/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/chenhaining/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:423: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
我输入catkin_make_isolated也没用,还是一样的报错。
问题解析:我一键安装安装的ros版本为ros1,不能通过直接git clone的方式进行下载,如下:
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
因为这样的版本适配ros2,我们必须去官网进行源码下载:
官网网址:https://github.com/IntelRealSense/realsense-ros
一定要注意切换版本,如图所示,ros1-legacy版本
然后按照正常程序编译就解决问题了!
题外话:RealSense SDK可以直接通过git clone下载,实测没有问题!
标签:ubuntu18.04,cmake,make,Realsense,build,workspace,catkin,ros From: https://blog.csdn.net/2301_81067921/article/details/136819338