linux下编译运行调试多鱼眼相机定位建图MultiCol-SLAM(multi-fisheye camera SLAM system)

文章目录

    • 编译运行
    • Clion 调试 MultiCol-SLAM 添加命令行参数

编译运行

https://github.com/urbste/MultiCol-SLAM
https://blog.csdn.net/downloadyilai/article/details/59106667?utm_source=blogxgwz6
在ubuntu下面安装glew
apt-cache search glew 列出来的项目如下:
然后将列表中的所有项目都安装

libglew-dbg - OpenGL Extension Wrangler (debugging symbols)
libglew-dev - OpenGL Extension Wrangler - development environment
libglew1.13 - OpenGL Extension Wrangler - runtime environment
libglewmx-dbg - OpenGL Extension Wrangler MX (debugging symbols)
libglewmx-dev - OpenGL Extension Wrangler MX - development environment
libglewmx1.13 - OpenGL Extension Wrangler (Multiple Rendering Contexts)
glew-utils - OpenGL Extension Wrangler - utilities

sudo apt-get install libglew-dbg libglew-dev libglew1.13 libglewmx-dbg libglewmx-dev libglewmx1.13 glew-utils

安装Pangolin 0.4
https://github.com/stevenlovegrove/Pangolin/releases
cd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j
环境:ubuntu16.04
所需:opencv-3.1.0和opencv_contrib-3.1.0
https://github.com/opencv/opencv/releases/tag/3.1.0
安装OpenCv 3.1的过程中要下载ippicv_linux_20151201,由于网络的原因,这个文件经常会下载失败。
解决的办法是手动下载:[ippicv_linux_20151201.tgz](https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_linux_20151201.tgz)
下载完后替换opencv-3.1.0/3rdparty/ippicv/downloads/linux-*目录下的同名文件,重新cmake。
sudo apt-get install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
将下载好的opencv-3.1.0解压到任意文件夹,如home。
将opencv_contrib-3.1.0解压并拷贝到opencv-3.1.0文件夹内。
打开终端并进入opencv-3.1.0文件夹内:cd ~/opencv-3.1.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/home/q/packages/opencv-3.1.0/opencv_contrib-3.1.0/modules/ ..
make -j8
sudo make install
Build MultiCol-SLAM
git clone https://github.com/urbste/MultiCol-SLAM.git MultiCol-SLAM
cd MultiCol-SLAM
chmod +x build.sh
./build.sh

./Examples/Lafida/multi_col_slam_lafida
./Examples/small_orb_omni_voc_9_6.yml
./Examples/Lafida/Slam_Settings_indoor1.yaml
./Examples/Lafida/
H O M E HOME HOME/Downloads/IndoorDynamic

https://www.jianshu.com/p/d7682a1a5eb9

g++: internal compiler error: Killed (program cc1plus)Please submit a full bug report,查了很多资料,最后发现主要原因是内存不足, 临时使用交换分区来解决吧

sudo dd if=/dev/zero of=/swapfile bs=1024M count=8 sudo mkswap /swapfilesudo swapon /swapfileAfter compiling, you may wish toCode:sudo swapoff /swapfilesudo rm /swapfile

 error: expected ‘)’ before ‘<’ token
    std::unordered_map& kp_to_cam1,
                      ^
error: ‘unordered_map’ in namespace ‘std’ does not name a template type
   std::unordered_map keypoint_to_cam1;
        ^
error: ‘unordered_map’ in namespace ‘std’ does not name a template type
   std::unordered_map keypoint_to_cam2;
        ^
In member function ‘cv::Vec2d MultiColSLAM::VertexSim3Expmap_Multi::cam_map1(const Vector3d&, int) const’:
error: ‘keypoint_to_cam1’ was not declared in this scope
    int camIdx = keypoint_to_cam1.find(ptIdx)->second;
In member function ‘cv::Vec2d MultiColSLAM::VertexSim3Expmap_Multi::cam_map2(const Vector3d&, int) const’:
‘keypoint_to_cam2’ was not declared in this scope
    int camIdx = keypoint_to_cam2.find(ptIdx)->second;
                 ^
 At global scope:
error: expected constructor, destructor, or type conversion before ‘(’ token
  VertexSim3Expmap_Multi::VertexSim3Expmap_Multi(
                                                ^
在头文件里面加入 
#include 
后面两个可能不需要
#include 
#include 

Clion 调试 MultiCol-SLAM 添加命令行参数

clion:

  • run
  • Debug
  • Configurations
  • program arguments
  • 设置工作目录
    在这里插入图片描述

在这里插入图片描述

  • 关键设置正确的参数相对路径
  • 可执行程序的路径不用给出
  • 工作路径要给出用来拼接上面的相对路径获得全路径
    linux下编译运行调试多鱼眼相机定位建图MultiCol-SLAM(multi-fisheye camera SLAM system)_第1张图片
    linux下编译运行调试多鱼眼相机定位建图MultiCol-SLAM(multi-fisheye camera SLAM system)_第2张图片
    控制台中文编码错乱
    1.settings设置–>editor–>file Encoding–>全部设置utf8.
    2.在当前的文件,编辑处,右键file encode更改为gb2312保存就行了

你可能感兴趣的:(摄像头,标定)