编译通过,运行时,有时会一闪如书中所示的3d显示的界面,随即终止,出现如下错误:
caiming@caiming-Lenovo-B470:~/0.2$bin/run_vo config/default.yaml
dataset:/home/caiming/fr1_xyz
read total 793entries
Key frame size = 0
VO costs time:0.034669
good matches: 253
pnp inliers: 253
VO costs time:0.04766
Segmentation fault(core dumped)
caiming@caiming-Lenovo-B470:~/0.2$
调试后发现错误是出自run_vo.cpp文件的这行语句
myslam::Frame::PtrpFrame = myslam::Frame::createFrame();
最终程序指针停在mat.inl.hpp文件的如下函数位置
inline
Mat::Mat(const Mat&m)
:flags(m.flags), dims(m.dims), rows(m.rows), cols(m.cols),data(m.data),
datastart(m.datastart), dataend(m.dataend), datalimit(m.datalimit),allocator(m.allocator),
u(m.u),size(&rows)
{
}
不知为何? 之前以为是viz模块的问题,折腾了一天,看来不是那个问题。