Pangolin是一个轻量级的视频交互/显示工具,很多视觉SLAM程序使用他进行视频的显示和结果的绘制,比如DSO和ORB-SLAM2.
Pangolin工程地址:https://github.com/stevenlovegrove/Pangolin
按照github上面的步骤编译安装的时候出现了错误:
[ 73%] Built target pangolin
[ 74%] Linking CXX executable HelloPangolin
//usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference to `GOMP_parallel@GOMP_4.0'
collect2: error: ld returned 1 exit status
examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/build.make:113: recipe for target 'examples/HelloPangolin/HelloPangolin' failed
make[2]: *** [examples/HelloPangolin/HelloPangolin] Error 1
CMakeFiles/Makefile2:268: recipe for target 'examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/all' failed
make[1]: *** [examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
这是由于我的机子上安装了Anaconda引起的,解决的办法参照:
https://github.com/stevenlovegrove/Pangolin/issues/285
我的具体解决办法:
1. 将Anaconda的地址从环境变量中删除,即打开.bashrc文件,注释掉 export PATH="/home/zxw/anaconda2/bin:$PATH":
subl ~/.bashrc (注释掉export PATH="/home/zxw/anaconda2/bin:$PATH"之后:) source ~/.bashrc
2. 打开新的窗口执行一下命令(前提是安装好了相关的依赖库,比如OpenGL等):
git clone https://github.com/stevenlovegrove/Pangolin.git cd Pangolin mkdir build cd build cmake .. cmake --build .
没有出错,编译安装成功。