cd ORB_SLAM2 chmod +x build.sh ./build.sh
的时候出现错误:/home/zhao/ORB_SLAM2-master/src/System.cc:236:28: error: ‘usleep’ was not declared in this scope
usleep(1000);
解决办法:This can be solved in one of two ways, including the proper headerunistd.h
, that was removed from Eigen headers, or better yet, using the now standard C++11std::this_thread::sleep_for
.
参考网页:https://github.com/raulmur/ORB_SLAM2/issues/254
it's solved simply by adding
#include <unistd.h>
in those error files
之后重新运行
./build.sh即可