SceneLib2编译 --SLAM(一)

本文档详细介绍了如何在Ubuntu 16.04系统上编译SLAM库SceneLib2。首先,通过虚拟机安装Ubuntu 16.04,然后从GitHub下载源码开始编译过程。在编译前,建议预先创建文件夹以保持安装整洁。
部署运行你感兴趣的模型镜像

交流SLAM,共同进步。


一、首先是下载ubuntu的系统,我使用的虚拟机+ubuntu16.04.

作者在帮助文档上使用的14.04 和其他版本,由此可见ubuntu版本兼容性很不错。

 * Ubuntu 12.04 LTS - 32bits
 * Ubuntu 12.04 LTS - 64bits (thanks to Prof. Davison for testing it)
 * Ubuntu 12.10 - 64bits
 * Ubuntu 14.04 LTS - 64bits
 * Mac OS X 10.9
 * Mac OS X 10.10

二、在终端上下载github上的源码,开启编译之路。

https://github.com/hanmekim/SceneLib2

在说明上已经说得很清楚。

这里主要讲一下,需要注意的问题

1.提前新建一下文件夹,这样安装比较有序

 $ cd MY_EXTERNAL_LIBRARIES_DIRECTORY

2.按照顺序一致进行,到how to use
1-1. Modify the configuration file to use the example image sequence
 $ gedit MY_WORK_DIRECTORY/SceneLib2/data/SceneLib2.cfg

 > input.mode = 0;
 > input.name = MY_IMAGE_DIRECTORY/TestSeqMonoSLAM;

 # these are default camera parameters for the example image sequence
 > cam.width = 320;
 > cam.height = 240;
 > cam.fku = 195;
 > cam.fkv = 195;
 > cam.u0 = 162;
 > cam.v0 = 125;
 > cam.kd1 = 9e-06;
 > cam.sd = 1;

1-2. Modify the configuration file to use a USB camera
 $ gedit MY_WORK_DIRECTORY/SceneLib2/data/SceneLib2.cfg

 > input.mode = 1;
 # change [number] to your camera (e.g. mine is video0)
 > input.name = convert:[fmt=RGB24]//v4l:///dev/video[number];

 # these are default camera parameters for (Logitech V-U0009),
 # not calibrated properly, but it works for now
 > cam.width = 320;
 > cam.height = 240;
 > cam.fku = 195;
 > cam.fkv = 195;
 > cam.u0 = 162;
 > cam.v0 = 125;
 > cam.kd1 = 1e-12;
 > cam.sd = 1;

1-1或1-2用到一个就行,前一个是使用下载的图片,后一个是需要有usb相机

3.使用第一个,执行lee@lee-virtual-machine:~/MY_WORK_DIRECTORY/SceneLib2/BUILD/examples$ ./MonoSlamSceneLib1
可能会遇到路径不对的问题
这个时候可以把路径指到home/.......

4.sceneLib2使用了,Pangolin
可能会提示显示有问题,
terminate called after throwing an instance of 'std::runtime_error'
  what():  Pangolin X11: Unable to retrieve framebuffer options
已放弃 (核心已转储)
这个问题在编译其他slam项目时也有遇到,找到下面的文件,然后注释黄色的代码,这两句可能是在下面的代码实现了,所以注释掉。

 
static int 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
};
基本上遇到的问题就这么多,祝大家好运。

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值