pangolin安装 & opencv安装 & Linux虚拟机扩容
SLAM2安装提示找不到 opencv 2.4.3 查看CMakeList.txt代码时发现 寻找 opencv 3.0失败 错误点:发现自己只是cmake 了 没有make。
编译opencv 发现错误 CMake Error: cmake_symlink_library: System Error: Operation not permitted 错误点:opencv 编译文件都在windows的共享文件夹中,因为linux没地方了,放在这里了。
进行linux扩容,最开始用的VBox 的工具,搞不定vmdk,采用vmware的工具,安装vwmare
vmware-vdiskmanager.exe -x 21Gb D:\Projects\20200220.vmdk 在vbox中可以看到这个虚拟机挂在的硬盘大小是 21GB。
提示信息:WARNING: If the virtual disk is partitioned, you must use a third-party
utility in the virtual machine to expand the size of the
partitions.
所以需要在虚拟机内部使用第三方软件对硬盘容量进行调整。
既然已经下载了vmware 就用vmware来做了,vbox没找到最开始启动引导的CD开关。
https://www.cnblogs.com/jytx/p/6323550.html
根据这个做,下载Gparted软件:https://sourceforge.net/projects/gparted/files/gparted-live-stable/ vmware中设置开机启动加载CD,BOOT中设置从CD启动,成功完成linux硬盘扩容。
然后没有了VBOX里面简单的共享文件夹创建,此处重新创建共享文件夹。 https://jingyan.baidu.com/article/91f5db1b23f59c1c7f05e3fb.html
Pangolin:
总是出错,src/CMakeFiles/pangolin.dir/build.make:1142: recipe for target 'src/CMakeFil 或者是 编译过程中停了,报错无法找到错误处,预估是FFmpeg和它的冲突
https://blog.youkuaiyun.com/limhsysu/article/details/84959736
https://blog.youkuaiyun.com/zzu_seu/article/details/84866858
$ sudo apt-get install libglew-dev #安装Glew
$ sudo apt-get install cmake #安装CMake
$ sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev #安装Boost
下载、编译、安装Pangolin:
先要新建文件夹orbslam_ws和下属的src文件
$ cd ~/orbslam_ws/src
$ git clone https://github.com/zzx2GH/Pangolin.git
$ cd Pangolin
$ mkdir build
$ cd build
$ cmake -DCPP11_NO_BOOST=1 ..
$ make
$ sudo make install
Pagolin/src文件夹下 删除
find_package(FFMPEG QUIET)
if(BUILD_PANGOLIN_VIDEO AND FFMPEG_FOUND)
set(HAVE_FFMPEG 1)
list(APPEND INTERNAL_INC ${FFMPEG_INCLUDE_DIRS} )
list(APPEND LINK_LIBS ${FFMPEG_LIBRARIES} )
list(APPEND HEADERS ${INCDIR}/video/drivers/ffmpeg.h)
list(APPEND SOURCES video/drivers/ffmpeg.cpp)
list(APPEND VIDEO_FACTORY_REG RegisterFfmpegVideoFactory )
list(APPEND VIDEO_FACTORY_REG RegisterFfmpegVideoOutputFactory )
if(_GCC_)
# FFMPEG is a real pain for deprecating the API.
set_source_files_properties(video/drivers/ffmpeg.cpp PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()
message(STATUS "ffmpeg Found and Enabled")
endif()
(vi打开找到这一段,https://blog.youkuaiyun.com/u011712163/article/details/84303259)
成功编译安装
[100%] Linking CXX executable VideoViewer
[100%] Built target VideoViewer
接下来编译opencv
https://www.icode9.com/content-3-679092.html
持续报错 c : internal compiler error: Killed (program cc1plus) Please submit a full b
swap space 不足 增大 space
https://blog.youkuaiyun.com/wingalong/article/details/93009012
https://askubuntu.com/questions/178712/how-to-increase-swap-space
https://blog.youkuaiyun.com/sky_xin/article/details/84813358
https://blog.youkuaiyun.com/hawht/article/details/22685047
修改/etc/fstab 文件 这个方法可以把那个换成你的文件名,我是直接用的,是将整个路径下的都变成可读写的,这样不好。。。
https://blog.youkuaiyun.com/waterxcfg304/article/details/49766467/
安装poencv的一些问题: https://blog.youkuaiyun.com/lovexlsforever/article/details/81947636
编译slam报错: 找不到opencv 发现原来是有两处需要改的,我的是4.4.0
FATAL_ERROR "OpenCV > 2.4.3 not found."的错误
修改cmakelist.txt,将opencv3.0改为4.4,我遇到两个地方,一个是orbslam2文件夹,另一个是DBoW2文件夹,可以根据错误信息查看。
find_package(OpenCV 4.4 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 2.4.3 QUIET)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
endif()
endif()
编译slam报错:/home/charles/Desktop/321/ORBSLAM2_detailed_comments-master/include/ORBextractor.h:26:10: fatal error: opencv/cv.h: No such file or directory
由于 opencv4中很多定义文件名不同了
https://blog.youkuaiyun.com/K4762/article/details/105270600
#include <opencv/cv.h>
替换为
#include<opencv2/imgproc/imgproc_c.h>
#include <opencv2/highgui/highgui_c.h>
编译slam报错: c++: internal compiler error: Killed (program cc1plus) 可能是交换分区又小了? 重新编译
编译slam报错: 几个示例文件中的错误: CV_LOAD_IMAGE_UNCHANGED ,在opencv4中名称改了,对应处替换为:
cv::IMREAD_UNCHANGED
编译出现警告 : AlignedBit = 0x80 https://blog.youkuaiyun.com/u010003609/article/details/100676041
其他的一些问题: https://www.icode9.com/content-4-340738.html
https://www.it610.com/article/1282784339439927296.htm
OK:
[100%] Built target mono_euroc
[100%] Built target rgbd_tum
[100%] Built target stereo_euroc
[100%] Built target mono_tum
TEST:
未完待续。。。
http://www.liuxiao.org/2016/03/ros-orb-slam2-%E5%AE%89%E8%A3%85%E8%B0%83%E8%AF%95/