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

FAST_LIVO2初次安装编译

1、安装依赖库

(1)Sophus

git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build && cd build && cmake ..
make
sudo make install

命令行运行:make时,出现以下错误:

/home/jiangqiang/ccy/FAST_LIVO2/depend/Sophus/sophus/so2.cpp:32:26: error: lvalue required as left operand of assignment
   32 |   unit_complex_.real() = 1.;
      |                          ^~
/home/jiangqiang/ccy/FAST_LIVO2/depend/Sophus/sophus/so2.cpp:33:26: error: lvalue required as left operand of assignment
   33 |   unit_complex_.imag() = 0.;

 解决办法:

找到so2.cpp文件出错位置,将其替换为:

  SO2::SO2()
 {
   //unit_complex_.real() = 1.;
   //unit_complex_.imag() = 0.;
   unit_complex_.real(1.);
   unit_complex_.imag(0.);
 }

 修改之后,重新运行:make,无error出现。

2、Build编译

cd ~/catkin_ws/src
git clone https://github.com/hku-mars/FAST-LIVO2
cd ../
catkin_make
source ~/catkin_ws/devel/setup.bash

在运行 catkin_make时,可能出现以下error:

/home/jiangqiang/ccy/FAST_LIVO2/fast_livo2/src/FAST-LIVO2/include/IMU_Processing.h:52:12: error: field ‘fout_imu’ has incomplete type ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’}
   52 |   ofstream fout_imu;

/home/jiangqiang/ccy/FAST_LIVO2/fast_livo2/src/FAST-LIVO2/include/IMU_Processing.h:52:12: error: field ‘fout_imu’ has incomplete type ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’}
   52 |   ofstream fout_imu;

 

 

出现上述问题的原因在于:IMU_Processing.h头文件中声明的fout_imu成员变量类型std::ofstream是不完整的。这通常意味着编译器在尝试编译包含该头文件的源文件时,没有找到std::ofstream的完整定义。

解决方法:IMU_Processing.h头文件的顶部添加#include <fstream>。这能提供std::ofstream的完整定义。

之后重新运行catkin_make,能够正常编译。

3、run运行

(1)数据集验证:

roslaunch fast_livo mapping_avia.launch
rosbag play YOUR_DOWNLOADED.bag

数据集链接: https://pan.baidu.com/s/1C6NLkr6nbRAPqJHsLQq45w?pwd=7tx1 提取码: 7tx1

验证结果已经上传。


http://www.mrgr.cn/news/90358.html

相关文章:

  • 第七章 Kubernetes 存储-PV/PVC
  • 三相绕线型异步电动机转子串电阻器起动的建模仿真
  • 【MySQL例题】我在广州学Mysql 系列——有关数据备份与还原的示例
  • 【KOA】01-专栏介绍及学习计划(后续项目实战结合Vue3)
  • OpenStack-Train版-Allinone自动化部署脚本
  • ubuntu20.04+RTX4060Ti大模型环境安装
  • DaDianNao:一种无主存储器的多核加速器
  • 西门子S7-200 PLC串口PPI转以太网通讯的模块链接方式
  • 解决:Cannot find a valid baseurl for repo: base/7/x86_64
  • 一个简单的Windows TCP服务器实现
  • Unity-Mirror网络框架-从入门到精通之MultipleMatches示例
  • Excel大数据量导入导出
  • 排列组合
  • Java 中的 128 陷阱与自动拆装箱深度解析
  • 3.3 学习UVM中的uvm_driver 类分为几步?
  • GMS认证相关问题汇总
  • Docker使用指南与Dockerfile文件详解:从入门到实战
  • ESP32S3基于espidf移植I2C SSD1306/sh1106 WouoUIPage磁贴案例
  • 【Qt之·类QTextCursor】
  • 32单片机学习记录1之GPIO
  • 深度学习入门--python入门1
  • flink cdc2.2.1同步postgresql表
  • Python自动化办公之批量重命名
  • RockyLinux AlmaLinux RedHat 8,9安装图形化
  • Python自动化办公之Excel拆分
  • 单纯的DeepSeek讲解