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 header unistd.h, that was removed from Eigen headers, or better yet, using the now standard C++11 std::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即可
posted on 2017-03-12 12:59  viavia  阅读(1643)  评论(0编辑  收藏  举报