- 错误内容:
编译orbslam2时出现了error: ‘usleep’ was not declared in this scope
usleep(3000);
解决办法: 只需要在System.h文件中添加#include<unistd.h>
- 错误内容:
error: static assertion failed: std::map must have the same value_type as its allocator
static_assert(is_same<typename _Alloc::value_type, value_type>::value,
解决办法: 打开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;
参考:
http://www.qishunwang.net/news_show_32998.aspx
https://blog.csdn.net/lixujie666/article/details/90023059