首先安装Pangolin所需依赖
sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
sudo apt install cmake
sudo apt install libpython2.7-dev
sudo apt install python-pip
sudo python -mpip install numpy pyopengl Pillow pybind11
sudo apt install pkg-config
sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
sudo apt install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev
sudo apt install libdc1394-22-dev libraw1394-dev
sudo apt install libjpeg-dev libpng-dev libtiff5-dev libopenexr-dev
获取Pangolin源码
默认git版本为0.6 需下载0.5版本进行安装 进入以下网址进行下载并编译
https://github.com/stevenlovegrove/Pangolin/releases/tag/v0.5
遇到报错
fatal: unable to access 'https://github.com/stevenlovegrove/Pangolin.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
将https换成git即可
进行编译和安装
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
如果遇到 :error: ISO C++1z does not allow dynamic exception specifications 类似报错
使用:cmake -DBUILD_PANGOLIN_LIBOPENEXR=OFF .. #目的是禁用OpenEXR
sudo make install
编译完,可以运行以下命令测试,如果显示出一个彩色立方体,并且可以通过鼠标左、右键和滚轮按住拖拽,就表示 Pangolin 安装成功了。
cd ~/Pangolin/build/examples/HelloPangolin
./HelloPangolin