编译orb-slam2 错误:
error: 'usleep' was not declared in this scope
step1
修改 ORB_SLAM2/include/system.h
添加:
#include<unistd.h>
step2
修改 ORB_SLAM2/include/LoopClosing.h
typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
Eigen::aligned_allocator<std::pair<const KeyFrame*, g2o::Sim3> > > KeyFrameAndPose;
为
typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
Eigen::aligned_allocator<std::pair<KeyFrame *const, g2o::Sim3> > > KeyFrameAndPose;