在编译视觉slam第九讲0.2代码的时候,出现了内点个数为0的状况,迭代11次之后,VO直接LOST结束程序。
dataset: /home/linzhiwei/rgbd_dataset_freiburg1_desk
read total 207 entries
this is: 0 times
Key frame size = 0
frame id:0
vo cost time:0.017366
this is: 1 times
frame id:1
min dis:4
good matches:162
pts3d size: 162
pts2d size: 162
rvec
[0;
0;
0]
pnp inliers: 0
T-c_w
1 0 0 -nan
0 1 0 -nan
0 0 1 -nan
0 0 0 1
reject because inlier is too small: 0
vo cost time:0.029883
检查源程序,在run_vo.cpp文件中,在新建Camera::Ptr时,直接使用的是默认拷贝构造函数,没有提供相机的内参。
myslam::Camera::Ptr camera ( new myslam::Camera );
为其添加相机内参,可以从default.yaml文件中添加,也可以直接手动添加,下面展示手动添加。
myslam::Camera::Ptr camera ( new myslam::Camera (517.3,516.5,325.1,249.7,5000));
就是在其创建的时候赋值即可。