编译SG-SLAM出现的问题
问题描述
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package): Could not find a package configuration file provided by "boost_python3" (requested version 1.71.0) with any of the following names: boost_python3Config.cmake boost_python3-config.cmake
I just bumped into this as well on noetic w/ Ubuntu 20.04. In my case, I had to edit vision_opencv/cv_bridge/CMakeLists.txt as:
if(NOT ANDROID) find_package(PythonLibs) # if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) find_package(Boost REQUIRED python) #else() #find_package(Boost REQUIRED python3) #endif() else() find_package(Boost REQUIRED) endif()
i.e. basically comment out the test for checking for python2.
问题描述
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "octomap_ros" with any of the following names: octomap_rosConfig.cmake octomap_ros-config.cmake
缺少包
//octomap_ros是我们缺少的,但是我们要把_改成-; sudo apt-get install ros-noetic-octomap-ros
问题描述
ERROR: cannot launch node of type [octomap_server/octomap_server_node]: octomap_server ROS path [0]=/opt/ros/melodic/share/ros
错误原因 这个报错说的是打不开node,因为没有octomap_server这个type
那么问题要么是路径找不到octomap-server,要不然就是压根没装octpmap-server
解决方法
sudo apt install ros-noetic-octomap sudo apt install ros-noetic-octomap-server
问题描述
/usr/include/pcl-1.10/pcl/pcl_config.h:7:4: error: #error PCL requires C++14 or above 7 | #error PCL requires C++14 or above
PCL 1.10 要求使用 c++14 及以上版本,将 CMakeLists.txt 中的编译选项 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
改为 -std=c++14
即可
# Check C++14 or C++0x support include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) if(COMPILER_SUPPORTS_CXX14) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") add_definitions(-DCOMPILEDWITHC11) message(STATUS "Using flag -std=c++14.") elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") add_definitions(-DCOMPILEDWITHC0X) message(STATUS "Using flag -std=c++0x.") else() message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") endif()
问题描述
error: static assertion failed: std::map must have the same value_type as its allocator static_assert(is_same<typename _Alloc::value_type, value_type>::value,
打开LoopClosing.h,将
error: static assertion failed: std::map must have the same value_type as its allocator static_assert(is_same<typename _Alloc::value_type, value_type>::value,
改为
typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>, Eigen::aligned_allocator<std::pair<KeyFrame *const, g2o::Sim3> > > KeyFrameAndPose;
问题描述
AttributeError: 'dict_keys' object has no attribute 'remove'
//keys = dic1.keys() //改为下面语句 keys = list(dic1)
编译vinsmono时出现的问题
问题描述
fatal error: ceres/local_parameterization.h: 没有那个文件或目录 \#include "ceres/local_parameterization.h"
在高版本2.1的ceres中,“LocalParameterization接口以及相关类已经被弃用,用流形(Manifold)进行了代替”。而我们在github中直接git下来的ceres应该是最新版本的,找不到ceres/local_parameterization.h也在情理之中了。所以改用低版本的ceres1.4也就可以解决这一问题啦。