先安装编译Pangolin
-
use pangolin: slambook/3rdpart/Pangolin or download it from github: https://github.com/stevenlovegrove/Pangolin
-
install dependency for pangolin (mainly the OpenGL):
sudo apt-get install libglew-dev
-
compile and install pangolin
cd [path-to-pangolin]
mkdir build
cd build
cmake …
make
sudo make install
但由于某些原因,需要修改源码,否则运行最后的软件时会显示:
terminate called after throwing an instance of ‘std::runtime_error’
what(): Pangolin X11: Unable to retrieve framebuffer options
修改措施如下:
将源码目录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_