orb-slam3执行完./build_ros.sh后出现CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102
原因是:~/.bashrc设置的ROS_PACKAGE_PATH没有起作用。
解决方案:
1,
sudo gedit ~/.bashrc
2,在~/.bashrc文件结尾加上(PATH要替换为自己电脑中ORB_SLAM3存放的路径):
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM3/Examples/ROS
然后保存并退出。
3,(当时就是忘了这个步骤),回到终端执行:
source ~./bashrc