Pangolin 安装测试 Installation & Examination (Ubuntu 20.04)
Pangolin 安装测试 Installation & Examination (Ubuntu 20.04)
下载 dependencies
安装 Pangolin
需要一些准备工作,首先要做的是下载它的一些 dependency:
sudo apt-get install libglew-dev
sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
# The most important part, or error[1], error[2]
sudo apt-get install libpng-dev
安装&编译
注意上面的都务必先安装成功,最后那个 libpng-dev
很重要,不然直接编译报错 *2
。然后就可以从 git
上面把 Pangolin
项目 clone
进来了(当然,此时已经切换到了你习惯存放文件的目录,我这边是 /mnt/...
):
git clone https://github.com/stevenlovegrove/Pangolin.git
输出以下 messages:
Cloning into 'Pangolin'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 15811 (delta 0), reused 3 (delta 0), pack-reused 15806
Receiving objects: 100% (15811/15811), 4.37 MiB | 16.00 KiB/s, done.
Resolving deltas: 100% (10685/10685), done.
接着切入 Pangolin
目录,开始编译:
cd Pangolin
mkdir build
cd build
记得在编译指令加上 -DCPP11_NO_BOOST=1
:
cmake -DCPP11_NO_BOOST=1 ..
输出如下,代表基本成功了:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found GLEW: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Eigen Found and Enabled
-- V4L Found and Enabled
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- libpng Found and Enabled
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen missing components: dot
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CPP11_NO_BOOST
-- Build files have been written to: /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/build
然后就可以进行编译了,为了便于调试,我之前用了 make -j
,为的是能够看到更多的信息:
make -j
输出下面这些,没有什么报错,但是 warning
还真不少,虽然也无所谓:
Scanning dependencies of target pangolin
[ 1%] Building CXX object src/CMakeFiles/pangolin.dir/utils/file_extension.cpp.o
[ 2%] Building CXX object src/CMakeFiles/pangolin.dir/utils/file_utils.cpp.o
[ 2%] Building CXX object src/CMakeFiles/pangolin.dir/utils/sigstate.cpp.o
[ 3%] Building CXX object src/CMakeFiles/pangolin.dir/utils/threadedfilebuf.cpp.o
[ 4%] Building CXX object src/CMakeFiles/pangolin.dir/utils/timer.cpp.o
[ 5%] Building CXX object src/CMakeFiles/pangolin.dir/utils/uri.cpp.o
[ 6%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io.cpp.o
[ 7%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_exr.cpp.o
[ 8%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_packed12bit.cpp.o
[ 8%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_lz4.cpp.o
[ 10%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_jpg.cpp.o
[ 11%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_raw.cpp.o
[ 12%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_png.cpp.o
[ 12%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_pango.cpp.o
[ 13%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_ppm.cpp.o
[ 14%] Building CXX object src/CMakeFiles/pangolin.dir/log/packetstream_reader.cpp.o
[ 15%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_tga.cpp.o
[ 15%] Building CXX object src/CMakeFiles/pangolin.dir/image/image_io_zstd.cpp.o
[ 16%] Building CXX object src/CMakeFiles/pangolin.dir/log/packetstream.cpp.o
[ 17%] Building CXX object src/CMakeFiles/pangolin.dir/log/packetstream_writer.cpp.o
[ 18%] Building CXX object src/CMakeFiles/pangolin.dir/log/playback_session.cpp.o
[ 18%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/geometry_obj.cpp.o
[ 20%] Building CXX object src/CMakeFiles/pangolin.dir/gl/gltext.cpp.o
[ 21%] Building CXX object src/CMakeFiles/pangolin.dir/gl/gldraw.cpp.o
[ 22%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/glgeometry.cpp.o
[ 23%] Building CXX object src/CMakeFiles/pangolin.dir/image/pixel_format.cpp.o
[ 23%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/geometry.cpp.o
[ 24%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/tinyobj.cpp.o
[ 25%] Building CXX object src/CMakeFiles/pangolin.dir/log/packet.cpp.o
[ 26%] Building CXX object src/CMakeFiles/pangolin.dir/gl/glfont.cpp.o
[ 26%] Building CXX object src/CMakeFiles/pangolin.dir/gl/glpangoglu.cpp.o
[ 27%] Building CXX object src/CMakeFiles/pangolin.dir/gl/glchar.cpp.o
[ 28%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/geometry_ply.cpp.o
[ 29%] Building CXX object src/CMakeFiles/pangolin.dir/gl/gltexturecache.cpp.o
[ 30%] Building CXX object src/CMakeFiles/pangolin.dir/display/display.cpp.o
[ 31%] Building CXX object src/CMakeFiles/pangolin.dir/display/opengl_render_state.cpp.o
[ 32%] Building CXX object src/CMakeFiles/pangolin.dir/display/image_view.cpp.o
[ 32%] Building CXX object src/CMakeFiles/pangolin.dir/display/viewport.cpp.o
[ 33%] Building CXX object src/CMakeFiles/pangolin.dir/handler/handler.cpp.o
[ 34%] Building CXX object src/CMakeFiles/pangolin.dir/display/window_factory.cpp.o
[ 35%] Building CXX object src/CMakeFiles/pangolin.dir/display/view.cpp.o
[ 36%] Building CXX object src/CMakeFiles/pangolin.dir/handler/handler_glbuffer.cpp.o
[ 37%] Building CXX object src/CMakeFiles/pangolin.dir/plot/datalog.cpp.o
[ 38%] Building CXX object src/CMakeFiles/pangolin.dir/plot/plotter.cpp.o
[ 39%] Building CXX object src/CMakeFiles/pangolin.dir/handler/handler_image.cpp.o
[ 40%] Building CXX object src/CMakeFiles/pangolin.dir/display/widgets/widgets.cpp.o
[ 40%] Building CXX object src/CMakeFiles/pangolin.dir/var/input_record_repeat.cpp.o
[ 41%] Building CXX object src/CMakeFiles/pangolin.dir/var/vars.cpp.o
[ 42%] Building CXX object src/CMakeFiles/pangolin.dir/video/video_input.cpp.o
[ 43%] Building CXX object src/CMakeFiles/pangolin.dir/video/video.cpp.o
[ 44%] Building CXX object src/CMakeFiles/pangolin.dir/video/video_interface_factory.cpp.o
[ 45%] Building CXX object src/CMakeFiles/pangolin.dir/video/video_output.cpp.o
[ 46%] Building CXX object src/CMakeFiles/pangolin.dir/video/stream_encoder_factory.cpp.o
[ 46%] Building CXX object src/CMakeFiles/pangolin.dir/video/video_output_interface_factory.cpp.o
[ 47%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/test.cpp.o
[ 48%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/images.cpp.o
[ 49%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/split.cpp.o
[ 50%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/truncate.cpp.o
[ 51%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/pvn.cpp.o
[ 51%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/pango.cpp.o
[ 52%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/pango_video_output.cpp.o
[ 54%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/debayer.cpp.o
[ 54%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/images_out.cpp.o
[ 55%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/shift.cpp.o
[ 56%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/mirror.cpp.o
[ 57%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/unpack.cpp.o
[ 58%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/pack.cpp.o
[ 59%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/merge.cpp.o
[ 60%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/json.cpp.o
[ 60%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/join.cpp.o
[ 61%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/thread.cpp.o
[ 62%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/shared_memory.cpp.o
[ 63%] Building CXX object src/CMakeFiles/pangolin.dir/utils/posix/condition_variable.cpp.o
[ 64%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/v4l.cpp.o
[ 65%] Building CXX object src/CMakeFiles/pangolin.dir/display/device/display_x11.cpp.o
[ 65%] Building CXX object src/CMakeFiles/pangolin.dir/tools/video_viewer.cpp.o
[ 66%] Building CXX object src/CMakeFiles/pangolin.dir/display/device/display_headless.cpp.o
[ 67%] Building CXX object src/CMakeFiles/pangolin.dir/utils/posix/shared_memory_buffer.cpp.o
[ 69%] Building CXX object src/CMakeFiles/pangolin.dir/fonts.cpp.o
[ 69%] Building CXX object src/CMakeFiles/pangolin.dir/utils/posix/semaphore.cpp.o
In file included from /usr/include/string.h:495,
from /usr/include/c++/9/cstring:42,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/image/memcpy.h:32,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/image/image.h:31,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/image/managed_image.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/image/typed_image.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/image/image_io_packed12bit.cpp:4:
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘void pangolin::SavePacked12bit(const pangolin::Image<unsigned char>&, const pangolin::PixelFormat&, std::ostream&, int)’ at /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/image/image_io_packed12bit.cpp:42:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘void pangolin::SavePacked12bit(const pangolin::Image<unsigned char>&, const pangolin::PixelFormat&, std::ostream&, int)’ at /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/image/image_io_packed12bit.cpp:43:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 16 equals destination size [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In constructor ‘pangolin::Button::Button(std::string, pangolin::VarValueGeneric&)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:238:31: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
238 | gltext = font().Text(title);
| ^
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/plot/plotter.cpp: In member function ‘void pangolin::Plotter::PlotSeries::CreatePlot(const string&, const string&, pangolin::Colour, std::string)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/plot/plotter.cpp:102:50 warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
102 | this->title = GlFont::I().Text(title.c_str());
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/plot/plotter.h:36,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/plot/plotter.cpp:29:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In constructor ‘pangolin::FunctionButton::FunctionButton(std::string, pangolin::VarValueGeneric&)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:275:31: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
275 | gltext = font().Text(title);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In constructor ‘pangolin::Checkbox::Checkbox(std::string, pangolin::VarValueGeneric&)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:313:31: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
313 | gltext = font().Text(title);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In constructor ‘pangolin::Slider::Slider(std::string, pangolin::VarValueGeneric&)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:369:31: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
369 | gltext = font().Text(title);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In member function ‘virtual void pangolin::Slider::Render()’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:489:50: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
489 | gltext = font().Text(var->Meta().friendly);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In constructor ‘pangolin::TextInput::TextInput(std::string, pangolin::VarValueGeneric&)’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:512:31: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
512 | gltext = font().Text(title);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp: In member function ‘virtual void pangolin::TextInput::Render()’:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:657:30: warning: implicitly-declared ‘pangolin::GlText& pangolin::GlText::operator=(const pangolin::GlText&)’ is deprecated [-Wdeprecated-copy]
657 | gledit = font().Text(edit);
| ^
In file included from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/glfont.h:30,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/display/widgets/widgets.h:33,
from /mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/src/display/widgets/widgets.cpp:28:
/mnt/c/Users/a1020/Desktop/Reinforcement_ELyou/Demolist/slamdemo/slambook/3rdparty/Pangolin/include/pangolin/gl/gltext.h:43:5: note: because ‘pangolin::GlText’ has user-provided ‘pangolin::GlText::GlText(const pangolin::GlText&)’
43 | GlText(const GlText& txt);
| ^~~~~~
[ 70%] Linking CXX shared library libpangolin.so
[ 70%] Built target pangolin
Scanning dependencies of target VideoViewer
Scanning dependencies of target VideoJsonTransform
Scanning dependencies of target VideoConvert
Scanning dependencies of target Plotter
Scanning dependencies of target VideoJsonPrint
Scanning dependencies of target ModelViewer
Scanning dependencies of target HelloPangolinOffscreen
Scanning dependencies of target HelloPangolinThreads
Scanning dependencies of target SimpleScene
Scanning dependencies of target HelloPangolin
Scanning dependencies of target SimpleMultiDisplay
Scanning dependencies of target SimpleDisplayImage
Scanning dependencies of target SimpleVideo
Scanning dependencies of target SimpleDisplay
Scanning dependencies of target SimpleRecord
Scanning dependencies of target SimplePlot
Scanning dependencies of target SharedMemoryCamera
[ 71%] Building CXX object tools/VideoJson/CMakeFiles/VideoJsonTransform.dir/main-transform.cpp.o
[ 72%] Building CXX object tools/VideoViewer/CMakeFiles/VideoViewer.dir/main.cpp.o
[ 73%] Building CXX object tools/VideoConvert/CMakeFiles/VideoConvert.dir/main.cpp.o
[ 74%] Building CXX object examples/HelloPangolinOffscreen/CMakeFiles/HelloPangolinOffscreen.dir/main.cpp.o
[ 75%] Building CXX object examples/SimpleMultiDisplay/CMakeFiles/SimpleMultiDisplay.dir/main.cpp.o
[ 76%] Building CXX object tools/Plotter/CMakeFiles/Plotter.dir/main.cpp.o
[ 77%] Building CXX object tools/ModelViewer/CMakeFiles/ModelViewer.dir/main.cpp.o
[ 78%] Building CXX object examples/HelloPangolinThreads/CMakeFiles/HelloPangolinThreads.dir/main.cpp.o
[ 79%] Building CXX object examples/SimpleScene/CMakeFiles/SimpleScene.dir/main.cpp.o
[ 80%] Building CXX object examples/SimpleRecord/CMakeFiles/SimpleRecord.dir/main.cpp.o
[ 80%] Building CXX object examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/main.cpp.o
[ 80%] Building CXX object examples/SimpleDisplayImage/CMakeFiles/SimpleDisplayImage.dir/main.cpp.o
[ 81%] Building CXX object tools/VideoJson/CMakeFiles/VideoJsonPrint.dir/main-print.cpp.o
[ 82%] Building CXX object examples/SimpleVideo/CMakeFiles/SimpleVideo.dir/main.cpp.o
[ 83%] Building CXX object examples/SimpleDisplay/CMakeFiles/SimpleDisplay.dir/main.cpp.o
[ 84%] Building CXX object examples/SharedMemoryCamera/CMakeFiles/SharedMemoryCamera.dir/main.cpp.o
[ 85%] Building CXX object examples/SimplePlot/CMakeFiles/SimplePlot.dir/main.cpp.o
[ 86%] Linking CXX executable HelloPangolinOffscreen
[ 88%] Linking CXX executable SimpleDisplayImage
[ 88%] Linking CXX executable VideoViewer
[ 89%] Linking CXX executable HelloPangolinThreads
[ 90%] Linking CXX executable VideoJsonTransform
[ 91%] Linking CXX executable SharedMemoryCamera
[ 92%] Linking CXX executable SimpleMultiDisplay
[ 93%] Linking CXX executable SimpleVideo
[ 94%] Linking CXX executable VideoJsonPrint
[ 94%] Linking CXX executable SimplePlot
[ 94%] Built target HelloPangolinOffscreen
[ 94%] Linking CXX executable SimpleRecord
[ 94%] Built target SimpleDisplayImage
[ 95%] Linking CXX executable VideoConvert
[ 96%] Linking CXX executable HelloPangolin
[ 96%] Built target HelloPangolinThreads
[ 96%] Built target VideoViewer
[ 96%] Built target VideoJsonTransform
[ 97%] Linking CXX executable Plotter
[ 97%] Built target SimpleMultiDisplay
[ 97%] Built target SharedMemoryCamera
[ 97%] Built target VideoJsonPrint
[ 97%] Built target SimpleVideo
[ 97%] Built target SimplePlot
[ 98%] Linking CXX executable SimpleScene
[ 98%] Built target SimpleRecord
[ 98%] Built target HelloPangolin
[100%] Linking CXX executable SimpleDisplay
[100%] Built target VideoConvert
[100%] Built target Plotter
[100%] Built target SimpleScene
[100%] Built target SimpleDisplay
[100%] Linking CXX executable ModelViewer
[100%] Built target ModelViewer
看到上面这些 messages 也可以知道,Pangolin
是一个基于 OpenGL
的项目,能实现数据的可视化。
WSL 专属的 VcXsrv 配置及使用
以上就是安装 Pangolin
的所有步骤了,接下来让我们体验一下它的功能:
cd examples
cd HelloPangolin
mkdir build
cd build
cmake ..
make
./HelloPangolin
按理说,WSL
此时应该画出一个六面体:
没有弹出想要的图像是因为没有安装合适的xming,这里推荐一下 VcXsrv,在Win10里面尝试过了,没有发生什么卡顿以及报错情况,这个软件直接在网站上面下载后,在Win10中随便安装即可,安装路径也可以随便改。在bash中改动一下 DISPLAY
端口即可,进入 .bashrc
或是 .zshrc
文件中进行修改:
nano ~/.zshrc # if you are using bash itself, you may use nano ~/.bashrc
进入后,在文件中加入如下命令(代表采用的是 0
号端口,所以一会打开 VcXsrv
时也把端口命名为 0
):
export DISPLAY=localhost:0
然后刷新一下:
source ~/.zshrc # same as above, use source ~/.bashrc
打开 VcXsrv
,选择 Multiple windows
,Display number
为 0
,Start no client
,Clipboard-Primary Selection
选中,禁用 Native opengl
,选中 Disable access control
,点击完成。这样就可以在运行之前的 examples 了,这里展示一些其它的:
cd ../..
cd SimpleMultiDisplay/build
./SimpleMultiDisplay
输出的是一组拼接图像(和上面的一样为交互式图形):
[0.0] 面号:[OPTSxNaN]
Too basic to have NN... ...