当前位置: 首页 > article >正文

slam学习笔记9---ubuntu2004部署interactive_slam踩坑记录

背景:interactive_slam是一款可用于离线优化点云地图算法。部署安装容易出问题,这里记录一下。

一、安装基本流程

绝大部分跟着readme走,g2o安装使用apt安装

interactive_slam depends on the following libraries:

GL3W
GLFW
Dear ImGui
portable-file-dialog
OpenMP
PCL
g2o
# for ROS noetic
sudo apt-get install libglm-dev libglfw3-dev
sudo apt-get install libsuitesparse-dev libeigen3-dev
sudo apt-get install ros-noetic-geodesy ros-noetic-pcl-ros ros-noetic-nmea-msgs 
# Install g2o from original source code 本人使用的是apt安装g2o,在踩坑记录中会说到
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build 
cd build
cmake ../
make
sudo make install
# Install Ceres Library
git clone https://ceres-solver.googlesource.com/ceres-solver
# Install all dependencies
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# Use ATLAS for BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
cd ~/catkin_ws/src
git clone https://github.com/koide3/ndt_omp
git clone https://github.com/koide3/hdl_graph_slam
git clone https://github.com/koide3/odometry_saver
git clone https://github.com/SMRT-AIST/fast_gicp --recursive
git clone https://github.com/SMRT-AIST/interactive_slam --recursive

cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE=Release

二、踩坑记录

1、编译出现g2o报错

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
G2O_CORE_LIBRARY
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_SOLVER_CHOLMOD
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_SOLVER_CSPARSE
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_SOLVER_PCG
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_STUFF_LIBRARY
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_TYPES_DATA
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_TYPES_SLAM3D
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam
G2O_TYPES_SLAM3D_ADDONS
    linked by target "hdl_graph_slam_nodelet" in directory /home/ylh/code_ws/interactiveSlam_ws/src/hdl_graph_slam

原因:没有找到对应的g2o版本
解决方式

sudo apt install ros-noetic-libg2o

参考

2、提示第三方依赖找不到

interactive_slam/thirdparty/imgui 等找不到
原因:子库没有正常拉取
在interactive_slam目录下运行

git submodule update --init --recursive

若出现错误,多运行几次

3、工作空间一次性编译混乱报错

原来方式

catkin_make -DCMAKE_BUILD_TYPE=Release

使用编译方式,单个包编译

catkin_make -DCATKIN_WHITELIST_PACKAGES="odometry_saver"
catkin_make -DCATKIN_WHITELIST_PACKAGES="ndt_omp"
catkin_make -DCATKIN_WHITELIST_PACKAGES="fast_gicp"
catkin_make -DCATKIN_WHITELIST_PACKAGES="hdl_graph_slam"
catkin_make -DCATKIN_WHITELIST_PACKAGES="interactive_slam"

###################
好记性不如烂笔头
积跬步期千里
觉得不错的话,记得点赞收藏


http://www.kler.cn/a/574320.html

相关文章:

  • C++学习(十三)(构建系统,CMAKE)
  • 通用代码生成器正确的使用方法:电子表格
  • Uniapp 页面返回不刷新?两种方法防止 onShow 触发多次请求!
  • 极狐GitLab 正式发布安全版本17.9.1、17.8.4、17.7.6
  • 大模型——使用 Embedding 模型和向量数据库的 Spring AI RAG
  • sqlite3 c++ client选择; c++环境搭建 : abseil-cpp | fnc12/sqlite_orm
  • 【Day9】make/makeFile如何让项目构建自动化起飞
  • go语言设计模式-适配器模式
  • RV1126采集VI视频数据流
  • 自动任务:安卓与鸿蒙上的高效自动化助手
  • Mac 基于 Ollama 安装 DeepSeek-R1(蒸馏版本)、AnythingLLM 及使用体验
  • JavaEE Servlet02
  • docker目录挂载与卷映射的区别
  • 洛谷————B2056 求整数的和与均值
  • 【网络】实现电脑与笔记本电脑之间的直接网络连接
  • 双向选择排序算法
  • 文档处理控件Aspose.Total教程:使用 C# 将 Obsidian Markdown 转换为 OneNote
  • 无线可视挖耳勺适合老年人吗?无线可视挖耳勺操作简单又安全
  • WPS AI+office-ai的安装、使用
  • 3.6V-30V宽压输入降压同步IC内置MOS,电流4A/5A/6A,可以满足汽车应急电源,BMS电池,电池组USB口输出等储能应用