ORB-SLAM demo测试

给了Example,从官网上下了个数据集,跟着跑就得了

https://blog.csdn.net/u010128736/article/category/6461394

用深度相机,也就是RGB-D的数据集来跑

在Example/RGB-D/associations中,可以找到一些官方已经生成好的associations,我直接根据里面有的associations去找了一个frc1_xyz的数据集,跑起来测试

执行内容如下:

./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml Data/rgbd_dataset_freiburg1_xyz Examples/RGB-D/associations/fr1_xyz.txt

直接运行时出现报错:

Pangolin:
Terminate called after throwing an instance of 'std::runtime_error'
what():: Pangolin X11: Unable to retrieve framebuffer options

解决方法如下

https://blog.csdn.net/tap880507/article/details/79683219

解决方法:将源码目录Pangolin\src\display\device下的display_x11.cpp文件做如下修改,注释下面的两行代码即可:

staticint visual_attribs[] = 

{ 

    GLX_X_RENDERABLE , True, 

    GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT, 

    GLX_RENDER_TYPE , GLX_RGBA_BIT, 

    GLX_X_VISUAL_TYPE , GLX_TRUE_COLOR, 

    GLX_RED_SIZE , 8, 

    GLX_GREEN_SIZE, 8, 

    GLX_BLUE_SIZE, 8, 

    GLX_ALPHA_SIZE, 8, 

    GLX_DEPTH_SIZE, 24, 

    GLX_STENCIL_SIZE, 8, 

    GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False, 

    //注释这一行GLX_SAMPLE_BUFFERS , glx_sample_buffers, 

    //注释这一行 GLX_SAMPLES , glx_sample_buffers > 0 ? glx_samples : 0, 

    None 

}

修改完毕之后重新cmake&&make&&make install

然后运行就OK了

猜你喜欢

转载自www.cnblogs.com/sasasatori/p/11620909.html