【SLAM学习】FAST-LIO配置

本文主要记录如何配置FAST-LIO

Eigen库

Eigen库安装:

sudo apt install libeigen3-dev

查看Eigen版本:

$ pkg-config --modversion eigen3


PCL库

PCL库安装:

sudo apt install libpcl-dev

也可以指定版本安装:

sudo apt install libpcl-dev=1.10.0

Ubuntu默认安装版本:

  • Ubuntu20.04   ——>   1.10.0
  • Ubuntu18.04   ——>   1.8.1
  • Ubuntu16.04   ——>   1.7.2

PCL库的卸载:

sudo apt remove libpcl-dev
# 完全删除软件包及其配置文件
sudo apt purge libpcl-dev

查看PCL版本:

apt-cache show libpcl-dev

若是安装了ROS,默认安装了PCL和Eigen库

Livox ROS Driver

git clone https://github.com/Livox-SDK/Livox-SDK.git
cd Livox-SDK
cd build
cmake ..
make 
sudo make install
git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
cd ws_livox
catkin_make
source devel/setup.bash

注意:若要编译FAST-LIO,需要source下Livox ROS Driver的环境变量,也可以把它放在.bashrc中

像这样:(把工程中devel/setup.bash放入~/.bashrc,这样每次重新开一个终端就初始化环境配置)若是没有source下Livox ROS Driver的环境变量的话,就会在编译FAST-LIO的时候报错!!

FAST-LIO

开始编译FAST-LIO ,这里以 S-FAST_LIO 为例进行编译,也可以用原版的FAST-LIO

https://github.com/zlwang7/S-FAST_LIO

mkdir -p S_FAST_LIO_ws/src
cd src
git clone https://github.com/zlwang7/S-FAST_LIO.git
cd ..
catkin_make

若出现:

/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:217: undefined reference to `Sophus::SO3::matrix() const'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:217: undefined reference to `Sophus::SO3::SO3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&)'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:217: undefined reference to `Sophus::SO3::log() const'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:218: undefined reference to `Sophus::SO3::matrix() const'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:218: undefined reference to `Sophus::SO3::matrix() const'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:218: undefined reference to `Sophus::SO3::SO3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&)'
/usr/bin/ld: /home/robot/Documents/learn_repo/learn_fastlio/S_FAST_LIO_ws/src/S-FAST_LIO/include/esekfom.hpp:218: undefined reference to `Sophus::SO3::log() const'

则只需要修改下CMakeLists文件即可

set(Sophus_LIBRARIES "/usr/local/lib/libSophus.so")

重新编译即可!

运行:

source devel/setup.bash
roslaunch sfast_lio mapping_avia.launch 

这时候在播放下数据bag包了

 链接: https://pan.baidu.com/s/16SOBM9heSri6H_Zai3GyCg 提取码: swvs -

rosbag play balcony_5th_floor_avia.bag   

  • 11
    点赞
  • 96
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
对于Ubuntu 20.04运行FastLIO2,你需要首先确保你的系统上安装了ROS(melodic或noetic)以及所需的依赖库。对于依赖库的安装,你可以使用以下命令进行安装: - glog: sudo apt-get install libgoogle-glog-dev - eigen: sudo apt-get install libeigen3-dev - pcl: sudo apt-get install libpcl-dev - yaml-cpp: sudo apt-get install libyaml-cpp-dev 安装完所需的依赖库后,你需要启动终端,并进入FastLIO2的工作空间。然后,你可以运行以下命令来启动FastLIO2: source devel/setup.bash roslaunch sfast_lio mapping_avia.launch 这个命令将会启动FastLIO2的节点,开始进行地图建立和定位的工作。请注意,你可能还需要根据你的具体设置和需求进行其他配置和参数的调整。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【SLAM学习FAST-LIO配置](https://blog.csdn.net/qq_42108414/article/details/131530293)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Ubuntu18.04 编译faster-lio,且不升级gcc/g++ 9.0版本(C++17)](https://blog.csdn.net/weixin_44884315/article/details/131189298)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值