ORB_SLAM3运行./build_ros.sh后,出现Error from directory check: /opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3 1
ORB_SLAM3运行./build_ros.sh后,出现:
Building ROS nodes mkdir: 无法创建目录"build": 文件已存在 [rosbuild] Building package ORB_SLAM3 [rosbuild] Error from directory check: /opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3 1 Traceback (most recent call last): File "/opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py", line 46, in <module> raise Exception Exception CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message): [rosbuild] rospack found package "ORB_SLAM3" at "", but the current directory is "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location) CMakeLists.txt:4 (rosbuild_init) -- Configuring incomplete, errors occurred! See also "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3/build/CMakeFiles/CMakeOutput.log". See also "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3/build/CMakeFiles/CMakeError.log". [rosbuild] Building package ORB_SLAM3 [rosbuild] Error from directory check: /opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3 1 Traceback (most recent call last): File "/opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py", line 46, in <module> raise Exception Exception CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message): [rosbuild] rospack found package "ORB_SLAM3" at "", but the current directory is "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location) CMakeLists.txt:4 (rosbuild_init) -- Configuring incomplete, errors occurred! See also "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3/build/CMakeFiles/CMakeOutput.log". See also "/home/xxx/Desktop/ORB_SLAM3/Examples/ROS/ORB_SLAM3/build/CMakeFiles/CMakeError.log". Makefile:810: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1
在终端输入:
echo ${ROS_PACKAGE_PATH}}
并没有显示出ORB_SLAM3的包路径,说明
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:"${your path}"/ORB_SLAM3/Examples/ROS
这句话并未加到~/.bashrc文件中,或者加的位置不对(尽量加在最后一行),或者加了后没有运行命令"source ~/.bashrc"。