激光slam学习笔记10---ubuntu2004部署运行fastlivo2踩坑记录
背景:mars实验室又发福利啦!跑跑效果,验了那句,mars出品,必属精品!本人pc环境ubuntu20.04,基本流程按照readme走就行,sophus和vikit安装有些注意地方。本文做了一些部署踩坑记录,方便大家参考。
一、报错汇总
报错1
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp: In member function ‘void VIOManager::initializeVIO()’:
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp:45:13: error: ‘class vk::AbstractCamera’ has no member named ‘fx’45 | fx = cam->fx();| ^~
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp:46:13: error: ‘class vk::AbstractCamera’ has no member named ‘fy’46 | fy = cam->fy();| ^~
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp:47:13: error: ‘class vk::AbstractCamera’ has no member named ‘cx’47 | cx = cam->cx();| ^~
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp:48:13: error: ‘class vk::AbstractCamera’ has no member named ‘cy’48 | cy = cam->cy();| ^~
/home/ylh/code_ws/fastlivo/src/FAST-LIVO2/src/vio.cpp:49:30: error: ‘class vk::AbstractCamera’ has no member named ‘scale’49 | image_resize_factor = cam->scale();
解决方式
根据readme安装vikit(注意使用作者推荐版本)
git clone https://github.com/xuankuzcr/rpg_vikit.git
注意一些关于sophus的依赖报错,务必安装指定sophus分支,再在cmakelist文件做一些修改,详情看后续报错
报错2
/home/ylh/software/Sophus/sophus/so2.cpp:32:26: error: lvalue required as left operand of assignment32 | unit_complex_.real() = 1.;| ^~
/home/ylh/software/Sophus/sophus/so2.cpp:33:26: error: lvalue required as left operand of assignment33 | unit_complex_.imag() = 0.;
解决方式
安装对应的分支
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build && cd build && cmake ..
make
sudo make install
修改一些报错源码的写法
SO2::SO2()
{// unit_complex_.real() = 1.;// unit_complex_.imag() = 0.;unit_complex_ = std::complex<double>(1,0);
}
参考
报错3
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator*(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::exp(Eigen::Matrix<double, 6, 1, 0, 6, 1> const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator*(Sophus::SE3 const&) const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator=(Sophus::SE3 const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3()'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SO3::matrix() const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3(Sophus::SE3 const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [rpg_vikit/vikit_common/CMakeFiles/test_vk_common_camera.dir/build.make:134: /home/ylh/code_ws/fastlivo2/devel/lib/vikit_common/test_vk_common_camera] Error 1
make[1]: *** [CMakeFiles/Makefile2:424: rpg_vikit/vikit_common/CMakeFiles/test_vk_common_camera.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator*(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::exp(Eigen::Matrix<double, 6, 1, 0, 6, 1> const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator*(Sophus::SE3 const&) const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::operator=(Sophus::SE3 const&)'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3()'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SO3::matrix() const'
/usr/bin/ld: /home/ylh/code_ws/fastlivo2/devel/lib/libvikit_common.so: undefined reference to `Sophus::SE3::SE3(Sophus::SE3 const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [rpg_vikit/vikit_common/CMakeFiles/test_vk_common_triangulation.dir/build.make:134: /home/ylh/code_ws/fastlivo2/devel/lib/vikit_common/test_vk_common_triangulation] Error 1
make[1]: *** [CMakeFiles/Makefile2:856: rpg_vikit/vikit_common/CMakeFiles/test_vk_common_triangulation.dir/all] Error 2
解决方式
cmakelist文件中加入
set(Sophus_LIBRARIES libSophus.so)//虽然解决了编译问题,但是运行会报错,最终写法如报错6
参考
报错4
error: field ‘fout_imu’ has incomplete type ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’}52 | ofstream fout_imu;
解决方式
/IMU_Processing.h加入
#include <fstream>
参考
报错5
提示不同so依赖的opencv版本不一致
本地安装多个opencv版本,而工程依赖ros的4.2.0版本,因此给所有的工程强行指定版本编译
find_package(OpenCV 4.2.0 EXACT REQUIRED)
报错6
/home/ylh/code_ws/fastlivo2/devel/lib/fast_livo/fastlivo_mapping: error while loading shared libraries: libSophus.so: cannot open shared object file: No such file or director
解决方式
set(Sophus_LIBRARIES /usr/local/lib/libSophus.so)
二、运行效果

###################
好记性不如烂笔头
积跬步期千里
觉得不错的话,记得点赞收藏
相关文章:
激光slam学习笔记10---ubuntu2004部署运行fastlivo2踩坑记录
背景:mars实验室又发福利啦!跑跑效果,验了那句,mars出品,必属精品!本人pc环境ubuntu20.04,基本流程按照readme走就行,sophus和vikit安装有些注意地方。本文做了一些部署踩坑记录&…...
织梦DedeCMS优化文章模版里的“顶一下”与“踩一下”样式
测试的版本5.7.1UTF-8 一、插入<head>Js代码 将下面代码插入到文章模版里的<head>标签里 <script language"javascript" type"text/javascript" src"{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script> <…...
IDEA+Docker插件一键部署SpringBoot项目到远程服务器
文章目录 1. 服务端1.1 安装Docker1.2 Docker放开远程连接1.3 重启Docker1.4 开放端口1.4.1 云端1.4.2 服务器内部防火墙指令 2.IntelliJ IDEA2.1 安装IDEA2.2 安装Docker插件2.3 SSH Configurations2.4 Docker选择对应的SSH2.5 Dockerfile2.5.1 Dockerfile2.5.2 Dockerfile Ed…...
【SoC基础】单片机之RCC模块
📢:如果你也对机器人、人工智能感兴趣,看来我们志同道合✨ 📢:不妨浏览一下我的博客主页【https://blog.csdn.net/weixin_51244852】 📢:文章若有幸对你有帮助,可点赞 👍…...
机器学习之梯度消失和梯度爆炸
文章目录 梯度消失1. 原理2. 影响3. 易出现情况4. 解决方法5. 编程实战案例 梯度爆炸1. 原理2. 影响3. 易出现情况4. 解决方法5. 编程实战案例 常用权重初始化方法及其影响1. 随机初始化2. Xavier初始化(Glorot初始化)3. Kaiming初始化(He初始…...
C++基础 [五] - String的模拟实现
目录 前言 string类的模拟实现 成员函数的实现 构造函数 拷贝构造函数 赋值运算符重载 析构函数 元素访问的实现 operator[ ] Iterator - 迭代器 容量大小的实现 size capacity reserve 编辑resize 内容修改的实现 push_back append operator(char ch) …...
LLVM学习-- 构建和安装
一 LLVM版本 二 适用预构建的二进制文件安装LLVM 三 适用包管理器安装LLVM 四 从源码构建用于Linux的LLVM 五 从源码构建用于Windows和Visual Studio的LLVM 六 从源码构建用于MacOS 和XCode的LLVM 1.1 LLVM项目从10年前第一次发布到版本3.4,其SVN存储库包含了超过20…...
python中使用单例模式在整个程序中只创建一个数据库连接,节省资源
示例代码: from loguru import logger from pymongo import MongoClient from pymongo.errors import ConnectionFailurefrom llm_engineering.settings import settingsclass MongoDatabaseConnector:_instance: MongoClient | None Nonedef __new__(cls, *args,…...
AIAgent有哪些不错的开源平台
AIAgent领域有许多优秀的开源平台和框架,以下是一些值得推荐的开源平台: AutoGPT AutoGPT 是一个基于 OpenAI 的 GPT-4 和 GPT-3.5 大型语言模型的开源框架,能够根据用户给定的目标自动生成所需提示,并利用多种工具 API 执行多步骤…...
Python刷题:流程控制(上)
今天刷的是PythonTip的Python 入门挑战中的题,整体难度不高,适合小白练手以及巩固知识点。下面会进行详细讲解。 每日一句 每一个拼命努力的人,都像是独自穿越黑暗森林的行者, 没有并肩的身影,唯有孤独如影随形&…...
vulhub/Billu_b0x靶机----练习攻略
1.Billu_b0x靶场下载链接: https://download.vulnhub.com/billu/Billu_b0x.zip 2.下载后,解压出ova文件,直接拖至VMware中,重命名和选择存储位置,点击导入,报错点击重试即可。修改网卡为NAT模式。 打开靶…...
【YOLOv8】YOLOv8改进系列(8)----替换主干网络之Swin Transformer
主页:HABUO🍁主页:HABUO 🍁YOLOv8入门改进专栏🍁 🍁如果再也不能见到你,祝你早安,午安,晚安🍁 【YOLOv8改进系列】: 【YOLOv8】YOLOv8结构解读…...
Qwen2-Audio:通义千问音频大模型技术解读
引言:从llm到mlm(audio) 大型语言模型(LLM)的发展日新月异,它们在文本理解、生成、推理等方面展现出惊人的能力。然而,交互模态不仅仅依赖于文字,语音、语调、环境音等听觉信息同样承载着丰富的内容。阿里巴巴通义千问团队,推出了 Qwen-Audio 系列模型,这里我们一起…...
解决 开发FFMPEG视频播放器右侧白色线问题
在开发基于 Qt 和 FFmpeg 的视频播放器时,我遇到一个常见但令人困惑的问题:在使用 VideoWidget(继承自 QOpenGLWidget)播放某些视频时,窗口右侧会出现一条白色线。这不仅影响视觉效果,还可能暴露潜在的渲染或缓冲区问题。本文将详细分析这一现象的成因,并提供经过验证的…...
解决Java多张图合成JPG时出现红色前景及多列自适应适配
目录 前言 一、追本溯源 1、回到最开始 2、合成JPG的异常 二、解决问题 1、关于ImageType 2、TYPE_INT_RGB和TYPE_INT_ARGB 3、问题修复 4、列数自适应的问题 三、总结 前言 在当今数字化信息飞速发展的时代,图像处理技术在各个领域都占据着举足轻重的地位…...
SpringBoot实现发邮件功能+邮件内容带模版
发送简单邮件模版邮件 1.pom引入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-mail</artifactId><version>2.5.13</version></dependency><dependency><groupId&…...
npm 报错 unable to resolve dependency tree
如下图: 解决:npm install --legacy-peer-deps 其实提示上有:npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps...
【蓝桥杯每日一题】3.17
🏝️专栏: 【蓝桥杯备篇】 🌅主页: f狐o狸x 他们说内存泄漏是bug,我说这是系统在逼我进化成SSR级程序员 OK来吧,不多废话,今天来点有难度的:二进制枚举 二进制枚举,就是…...
leetcode刷题之-整数反转
又开始刷题了,最近在刷这题 给你一个 32 位的有符号整数 x ,返回将 x 中的数字部分反转后的结果。 如果反转后整数超过 32 位的有符号整数的范围 [−231, 231 − 1] ,就返回 0。 假设环境不允许存储 64 位整数(有符号或无符号…...
Linux:冯诺依曼体系结构、操作系统、进程概念(一.初识进程)
文章目录 1.冯诺依曼体系结构总线与数据传输通路为什么有内存这个部分计算机存储结构 2.操作系统(Operator System)2.1 概念2.2 设计OS的目的2.3 理解“管理”先描述再组织 2.4 用户使用系统调用和库函数(lib)概念 总结 3.初识进程3.1 基本事实与引入3.2…...
动手学深度学习:CNN和LeNet
前言 该篇文章记述从零如何实现CNN,以及LeNet对于之前数据集分类的提升效果。 从零实现卷积核 import torch def conv2d(X,k):h,wk.shapeYtorch.zeros((X.shape[0]-h1,X.shape[1]-w1))for i in range(Y.shape[0]):for j in range(Y.shape[1]):Y[i,j](X[i:ih,j:jw…...
C语言 常用系统函数
<string.h> 头文件中的字符串函数 标准库的头文件 <string.h> 中,有三个常用的字符串函数: 函数名 描述 strlen(str) 返回str的长度,类型是 size_t strcpy(str1,str2) 将str2中的字符串复制到str1中 strcat(str1,str2) 将…...
删除排序链表中的重复元素(js实现,LeetCode:83)
看到这道题的第一反应是使用快慢指针,之前做过类似的题:删除有序数组中的重复项(js实现,LeetCode:26)原理都是一样,区别是这题需要将重复项删除,所以只需要走一遍单循环就可以实现 /*** Defini…...
【嵌入式学习】如何利用gitee管理记录学习内容
# 新建git仓库并连接到本地 ## 查看本地是否下载git git --version ## 全局配置git git config --global user.name "你的用户名" git config --global user.email "你的邮箱" git config --global credential.helper store ## 初始化本地仓库 git…...
C#入门学习记录(四)C#运算符详解:掌握算术与条件运算符的必备技巧+字符串拼接
一、运算符概述 运算符是程序进行数学运算、逻辑判断的核心工具,C#中的运算符分为: 算术运算符 → 数学计算( - * / %) 条件运算符 → 三目判断(?:) 关系运算符 → 比较大小(> < &#…...
单片机自学总结
自从工作以来,一直努力耕耘单片机,至今,颇有收获。从51单片机,PIC单片机,直到STM32,以及RTOS和Linux,几乎天天在搞:51单片机,STM8S207单片机,PY32F003单片机,…...
Unity教程(二十二)技能系统 分身技能
Unity开发2D类银河恶魔城游戏学习笔记 Unity教程(零)Unity和VS的使用相关内容 Unity教程(一)开始学习状态机 Unity教程(二)角色移动的实现 Unity教程(三)角色跳跃的实现 Unity教程&…...
HTML5扫雷游戏开发实战
HTML5扫雷游戏开发实战 这里写目录标题 HTML5扫雷游戏开发实战项目介绍技术栈项目架构1. 游戏界面设计2. 核心类设计 核心功能实现1. 游戏初始化2. 地雷布置算法3. 数字计算逻辑4. 扫雷功能实现 性能优化1. DOM操作优化2. 算法优化 项目亮点技术难点突破1. 首次点击保护2. 连锁…...
【Git学习笔记】Git分支管理策略及其结构原理分析
【Git学习笔记】Git分支管理策略及其结构原理分析 🔥个人主页:大白的编程日记 🔥专栏:Git学习笔记 文章目录 【Git学习笔记】Git分支管理策略及其结构原理分析前言一.合并冲突二. 分支管理策略2.1 分支策略2.2 bug分支2.3 删除临…...
Spring Cloud Alibaba Nacos 2023.X 配置问题
文章目录 问题现象(一)解决方法(一)问题现象(二)解决方法(二)问题现象(三)解决方法(三) 问题现象(一) Spring…...
