激光SLAM:Faster-Lio 算法编译与测试

这篇具有很好参考价值的文章主要介绍了激光SLAM:Faster-Lio 算法编译与测试。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

前言

Faster-LIO是基于FastLIO2开发的。FastLIO2是开源LIO中比较优秀的一个,前端用了增量的kdtree(ikd-tree),后端用了迭代ESKF(IEKF),流程短,计算快。Faster-LIO则把ikd-tree替换成了iVox,顺带优化了一些代码逻辑,实现了更快的LIO。在典型的32线激光雷达中可以取得100-200Hz左右的计算频率,在固态雷达中甚至可以达到1000-2000Hz,能够达到FastLIO2的1.5-2倍左右的速度。当然具体数值和计算平台相关。

FasterLIO使用了一种基于稀疏体素的近邻结构iVox(incremental voxels)。我们会发现这种结构用来做LIO更加合适,可以有效的降低点云配准时的耗时,也不会影响LIO的精度表现。

iVox也可以被集成到其他LO或LIO里,但是大部分方案里,最近邻并不是主要的计算瓶颈,gtsam/ceres什么的耗时相比最近邻那可太多了。把iVox集成到Lego-LOAM里,、主要只是省了增量地图构建那部分时间,优化方面没什么变化(点少)。所以iVox与FastLIO倒是相性更好一些。

编译

部署系统:ubuntu20.04
ROS版本: noetic

github 地址:https://github.com/gaoxiang12/faster-lio

下载源码

git clone https://github.com/gaoxiang12/faster-lio

正克隆到 ‘faster-lio’…
remote: Enumerating objects: 224, done.
remote: Counting objects: 100% (108/108), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 224 (delta 76), reused 65 (delta 65), pack-reused 116
接收对象中: 100% (224/224), 38.13 MiB | 1.49 MiB/s, 完成.
处理 delta 中: 100% (97/97), 完成.

faster lio,SLAM,算法

将原文件拷入ros工作空间

依赖

  • ROS (melodic or 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

编译

catkin_make

报错1:

CMake Error at /home/jk-jone/jone_ws/build/livox_ros_driver/livox_ros_driver/cmake/livox_ros_driver-genmsg.cmake:14 (add_custom_target):
add_custom_target cannot create target “livox_ros_driver_generate_messages”
because another target with the same name already exists. The existing
target is a custom target created in source directory
“/home/jk-jone/jone_ws/src/faster-lio/thirdparty/livox_ros_driver”. See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/noetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
livox_ros_driver/livox_ros_driver/CMakeLists.txt:46 (generate_messages)

faster lio,SLAM,算法
如果工作空间中之前编译了 livox_ros_driver 的功能包,则需要删掉 faster-lio/thirdparty/livox_ros_driver 这个文件夹

再次编译

CMake Error at faster-lio/CMakeLists.txt:15 (add_subdirectory):
add_subdirectory given source “thirdparty/livox_ros_driver” which is not an
existing directory.

faster lio,SLAM,算法电锯惊魂10
因为把那个文件删了,所以找不到路径

将 faster-lio/CMakeLists.txt 文件的第15行注释掉

add_subdirectory(thirdparty/livox_ros_driver)
改为
#add_subdirectory(thirdparty/livox_ros_driver)

再次编译

[100%] Linking CXX shared library /home/jk-jone/jone_ws/devel/lib/libfaster_lio.so
[100%] Built target faster_lio
Scanning dependencies of target run_mapping_offline
Scanning dependencies of target run_mapping_online
[100%] Building CXX object faster-lio/app/CMakeFiles/run_mapping_online.dir/run_mapping_online.cc.o
[100%] Building CXX object faster-lio/app/CMakeFiles/run_mapping_offline.dir/run_mapping_offline.cc.o
[100%] Linking CXX executable /home/jk-jone/jone_ws/devel/lib/faster_lio/run_mapping_online
[100%] Built target run_mapping_online
[100%] Linking CXX executable /home/jk-jone/jone_ws/devel/lib/faster_lio/run_mapping_offline
[100%] Built target run_mapping_offline

faster lio,SLAM,算法

编译成功

测试

Faster-lio支持离线的测试与在线测试

离线测试

首先下载rosbag数据包到电脑

  • avia bags
  • nclt bags

百度云盘下载地址:
BaiduYun: https://pan.baidu.com/s/1ELOcF1UTKdfiKBAaXnE8sQ?pwd=feky access code: feky
OneDrive下载地址:
OneDrive:https://1drv.ms/u/s!AgNFVSzSYXMahcEZejoUwCaHRcactQ?e=YsOYy2

Call run_mapping_offline with parameters to specify the bag file and the config file like:
通过下面的指令 运行 run_mapping_offline 文件 并且加载对应的rosbag文件 和对应的配置文件

./build/devel/lib/faster_lio/run_mapping_offline --bag_file your_avia_bag_file --config_file ./config/avia.yaml

其中 your_avia_bag_file 路径需要更换为下载的数据包路径

同样对于nclt数据包可以运行下面的指令。数据是机械式激光雷达velodyne的数据

./build/devel/lib/faster_lio/run_mapping_offline --bag_file your_nclt_bag_file --config_file ./config/velodyne.yaml

your_nclt_bag_file 路径需要更换为下载的数据包路径

运行FasterLIO,然后退出的时候 会在终端打印FPS和time

像下面这样:

I0216 17:16:05.286536 26492 run_mapping_offline.cc:89] Faster LIO average FPS: 1884.6
I0216 17:16:05.286549 26492 run_mapping_offline.cc:91] save trajectory to: ./src/fast_lio2/Log/faster_lio/20120615.tum
I0216 17:16:05.286706 26492 utils.h:52] >>> ===== Printing run time =====
I0216 17:16:05.286711 26492 utils.h:54] > [     IVox Add Points ] average time usage: 0.0147311 ms , called times: 6373
I0216 17:16:05.286721 26492 utils.h:54] > [     Incremental Mapping ] average time usage: 0.0271787 ms , called times: 6373
I0216 17:16:05.286731 26492 utils.h:54] > [     ObsModel (IEKF Build Jacobian) ] average time usage: 0.00745852 ms , called times: 25040
I0216 17:16:05.286752 26492 utils.h:54] > [     ObsModel (Lidar Match) ] average time usage: 0.0298004 ms , called times: 25040
I0216 17:16:05.286775 26492 utils.h:54] > [ Downsample PointCloud ] average time usage: 0.0224052 ms , called times: 6373
I0216 17:16:05.286784 26492 utils.h:54] > [ IEKF Solve and Update ] average time usage: 0.342008 ms , called times: 6373
I0216 17:16:05.286792 26492 utils.h:54] > [ Laser Mapping Single Run ] average time usage: 0.530618 ms , called times: 6387
I0216 17:16:05.286800 26492 utils.h:54] > [ Preprocess (Livox) ] average time usage: 0.0267813 ms , called times: 6387
I0216 17:16:05.286808 26492 utils.h:54] > [ Undistort Pcl ] average time usage: 0.0810455 ms , called times: 6375
I0216 17:16:05.286816 26492 utils.h:59] >>> ===== Printing run time end =====

默认点云会以pcd文件的格式保存下来

在线测试

用之前建立的仿真环境下的 mid360雷达的数据进行一个初步在线测试

打开仿真环境
faster lio,SLAM,算法

faster-lio 里面没有 mid360 雷达的 配置文件和启动文件 ,有avia的,都是livox的固态雷达,基本雷达,仿照avia的写一个就行

mid360.yaml 如下

common:
    lid_topic:  "/livox/lidar"
    imu_topic:  "/livox/imu"
    time_sync_en: false         # ONLY turn on when external time synchronization is really not possible
    time_offset_lidar_to_imu: 0.0 # Time offset between lidar and IMU calibrated by other algorithms, e.g. LI-Init (can be found in README).
                                  # This param will take effect no matter what time_sync_en is. So if the time offset is not known exactly, please set as 0.0

preprocess:
    lidar_type: 1                # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR, 
    scan_line: 4
    blind: 0.5

mapping:
    acc_cov: 0.1
    gyr_cov: 0.1
    b_acc_cov: 0.0001
    b_gyr_cov: 0.0001
    fov_degree:    360
    det_range:     100.0
    extrinsic_est_en:  false      # true: enable the online estimation of IMU-LiDAR extrinsic
    extrinsic_T: [ -0.011, -0.02329, 0.04412 ]
    extrinsic_R: [ 1, 0, 0,
                   0, 1, 0,
                   0, 0, 1]

publish:
    path_en:  false
    scan_publish_en:  true       # false: close all the point cloud output
    dense_publish_en: true       # false: low down the points number in a global-frame point clouds scan.
    scan_bodyframe_pub_en: true  # true: output the point cloud scans in IMU-body-frame

pcd_save:
    pcd_save_en: true
    interval: -1                 # how many LiDAR frames saved in each pcd file; 
                                 # -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.

launch文件如下

<launch>
<!-- Launch file for Livox MID360 LiDAR -->

	<arg name="rviz" default="true" />

	<rosparam command="load" file="$(find fast_lio)/config/mid360.yaml" />

	<param name="feature_extract_enable" type="bool" value="0"/>
	<param name="point_filter_num_" type="int" value="3"/>
	<param name="max_iteration" type="int" value="3" />
	<param name="filter_size_surf" type="double" value="0.5" />
	<param name="filter_size_map" type="double" value="0.5" />
	<param name="cube_side_length" type="double" value="1000" />
	<param name="runtime_pos_log_enable" type="bool" value="1" />
    <node pkg="faster_lio" type="run_mapping_online" name="laserMapping" output="screen" /> 

	<group if="$(arg rviz)">
	<node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find faster_lio)/rviz_cfg/loam_livox.rviz" />
	</group>

</launch>

运行该launch文件

roslaunch faster_lio mapping_mid360.launch

初始位置的情景和点云模型
faster lio,SLAM,算法
飞一圈后整个地图模型
faster lio,SLAM,算法文章来源地址https://www.toymoban.com/news/detail-788096.html

到了这里,关于激光SLAM:Faster-Lio 算法编译与测试的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【目标检测】Faster R-CNN算法实现

    继2014年的R-CNN、2015年的Fast R-CNN后,2016年目标检测领域再次迎来Ross Girshick大佬的神作Faster R-CNN,一举解决了目标检测的实时性问题。相较于Fast R-CNN而言,Faster R-CNN主要改进措施包括: 区域建议网络(RPN):Faster R-CNN摒弃了选择性搜索,提出区域提议网络(Region Proposal Netwo

    2024年03月14日
    浏览(33)
  • 3D激光雷达-Robotsense使用---LIO_SAM测试

    1. 参考链接 TixiaoShan/LIO-SAM: LIO-SAM: Tightly-coupled Lidar Inertial Odometry via Smoothing and Mapping lio-sam运行自己的rosbag_heirenlop的博客-CSDN博客 LIO-SAM:配置环境、安装测试、适配自己采集数据集_有待成长的小学生的博客-CSDN博客_lio-sam 2. 雷达驱动-更改点云类型 运行lio-sam需要用到 ring 和

    2024年02月03日
    浏览(30)
  • 探索常见经典目标检测算法:从YOLO到Faster R-CNN

    目标检测是计算机视觉领域中的重要任务之一,它旨在从图像或视频中检测出目标的位置和类别。随着深度学习技术的发展,许多经典的目标检测算法相继出现,其中包括YOLO(You Only Look Once)、Faster R-CNN(Region-based Convolutional Neural Networks)等。本文将深入介绍这些常见的目标

    2024年04月26日
    浏览(28)
  • mid360激光雷达跑Point-LIO算法

    以下是建图的运行过程及参数配置 mid360激光雷达驱动 安装(ubuntu20.4 ) 配置修改MID360_config.json 192.168.1.5,是本机ip 192.168.1.157是激光ip 57是激光雷达的sn号后两位

    2024年02月11日
    浏览(23)
  • 测试新开源的激光SLAM回环检测算法“STD A Stable Triangle Descriptor for 3D place recognition”

    测试新开源的激光SLAM回环检测算法“STD: A Stable Triangle Descriptor for 3D place recognition” 最近林博新开源了一个回环检测算法,我将其集成到自己常用的建图定位框架中检测效果。 原算法开源地址:“GitHub - hku-mars/STD: A 3D point cloud descriptor for place recognition” 自己测试的代码地址

    2024年02月01日
    浏览(35)
  • 从零入门激光SLAM(四)——ROS C++编译基础

    大家好呀,我是一个SLAM方向的在读博士,深知SLAM学习过程一路走来的坎坷,也十分感谢各位大佬的优质文章和源码。随着知识的越来越多,越来越细,我准备整理一个自己的激光SLAM学习笔记专栏,从0带大家快速上手激光SLAM,也方便想入门SLAM的同学和小白学习参考,相信看

    2024年02月10日
    浏览(32)
  • 【激光SLAM】激光的前端配准算法

    在激光SLAM中,前端配准(Frontend Registration)是实现定位和地图构建的关键步骤之一。它的作用是将当前帧的激光扫描数据与先前帧(或参考帧)的激光扫描数据进行配准,以获取它们之间的 相对位姿变换 。 通过前端配准,激光SLAM系统可以实现对机器人在环境中的位置和姿

    2024年02月19日
    浏览(29)
  • 开源3D激光(视觉)SLAM算法汇总(持续更新)

    目录 一、Cartographer 二、hdl_graph_slam 三、LOAM 四、LeGO-LOAM 五、LIO-SAM 六、S-LOAM 七、M-LOAM 八、livox-loam 九、Livox-Mapping 十、LIO-Livox 十一、FAST-LIO2 十二、LVI-SAM 十三、FAST-Livo 十四、R3LIVE 十五、ImMesh 十六、Point-LIO 十七、PV-LIOVoxelMap Cartographer是由谷歌于2016年开源的一个支持ROS的室内

    2024年02月03日
    浏览(27)
  • 从零入门激光SLAM(五)——手把手带你编译运行Lego_loam

    大家好呀,我是一个SLAM方向的在读博士,深知SLAM学习过程一路走来的坎坷,也十分感谢各位大佬的优质文章和源码。随着知识的越来越多,越来越细,我准备整理一个自己的激光SLAM学习笔记专栏,从0带大家快速上手激光SLAM,也方便想入门SLAM的同学和小白学习参考,相信看

    2024年01月17日
    浏览(42)
  • 目标检测——Faster RCNN

    Faster RCNN是由 R-CNN、Fast R-CNN 改进而来,是非常经典的目标检测的两阶段网络。 此篇博客是我通过学习以下优秀博客归纳整理而得: 一文读懂Faster RCNN - 知乎 Faster R-CNN详解和网络模型搭建 - 知乎 Faster R-CNN:详解目标检测的实现过程 - 郭耀华 - 博客园 yolov5与Faster-RCNN 训练过程

    2024年02月06日
    浏览(47)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包