欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

eigen3.3.3+opencv3.2跑orbslam3数据集出现usleep错误

程序员文章站 2024-01-04 12:40:10
...
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即可

上一篇:

下一篇: