当前位置:   article > 正文

【SLAM学习】FAST-LIO配置_ubuntu18.04 fast-lio环境

ubuntu18.04 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库的卸载:

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

查看PCL版本:

apt-cache show libpcl-dev

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

Livox ROS Driver

  1. git clone https://github.com/Livox-SDK/Livox-SDK.git
  2. cd Livox-SDK
  3. cd build
  4. cmake ..
  5. make
  6. sudo make install
  1. git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
  2. cd ws_livox
  3. catkin_make
  4. 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

  1. mkdir -p S_FAST_LIO_ws/src
  2. cd src
  3. git clone https://github.com/zlwang7/S-FAST_LIO.git
  4. cd ..
  5. 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   

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/574055
推荐阅读
相关标签
  

闽ICP备14008679号