Advertisement

记录D435i跑通ORB-SLAM2遇到的错误

阅读量:

记录D435i跑通ORB-SLAM2遇到的错误

安装配置过程混乱

执行./build_ros.sh之后报错如下:

Building ROS nodes
mkdir: cannot create directory ‘build’: File exists
[rosbuild] Building package ORB_SLAM2
[rosbuild] Error from directory check: /opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py /home/liyueqing/ORB_SLAM2/Examples/ROS/ORB_SLAM2
1
Traceback (most recent call last):
File “/opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py”, line 46, in
raise Exception
Exception
CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message):
[rosbuild] rospack found package “ORB_SLAM2” at “”, but the current
directory is “/home/liyueqing/ORB_SLAM2/Examples/ROS/ORB_SLAM2”. 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/liyueqing/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log”.
make: *** No targets specified and no makefile found. Stop.

主要是加粗部分,文件中路径不对。我的ORB-SLAM2就放在home下,而build_ros.sh中是这样:

echo “Building ROS nodes”

cd Examples/ROS/ORB_SLAM2
mkdir build
cd build
cmake … -DROS_BUILD_TYPE=Release
make -j

于是修改路径为
echo “Building ROS nodes”

cd Examples/ROS/ORB_SLAM2
mkdir build
cd build
cmake … -DROS_BUILD_TYPE=Release
make -j
这一步运行正确

全部评论 (0)

还没有任何评论哟~