lio-sam建图实现

2024-05-11 17:52
文章标签 实现 sam 建图 lio

本文主要是介绍lio-sam建图实现,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

参考:https://blog.csdn.net/unlimitedai/article/details/107378759

https://blog.csdn.net/weixin_44126988/article/details/131654142?ops_request_misc=&request_id=&biz_id=102&utm_term=lego-loam%E5%BB%BA%E5%9B%BE%E8%BD%AC%E4%B8%BA%E6%A0%85%E6%A0%BC%E5%9C%B0%E5%9B%BE&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-131654142.nonecase&spm=1018.2226.3001.4187

https://blog.csdn.net/zhuchao414259/article/details/127993112?ops_request_misc=&request_id=&biz_id=102&utm_term=rslidar3d%E5%BB%BA%E5%9B%BE&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-127993112.142v100control&spm=1018.2226.3001.4187
代码:https://github.com/TixiaoShan/LIO-SAM
数据集: https://pan.baidu.com/s/1-sAB_cNlYPqTjDuaFgz9pg 提取码: ejmu (walk不需要改配置文件,其他两个需要下文有)
原文:bashLIO-SAM: Tightly-coupled Lidar Inertial Odometry via Smoothing and Mapping

作者Tixiao Shan在2018年发表过LeGO-LOAM,当时他还在史蒂文斯理工学院读博士,19年毕业之后去了MIT做助理研究员(羡慕.jpg)。。。这篇文章LIO-SAM实际上是LeGO-LOAM的扩展版本,添加了IMU预积分因子和GPS因子,去除了帧帧匹配部分,然后更详细地描述了LeGO-LOAM帧图匹配部分的设计动机和细节。(引用于知乎大佬文章【论文阅读38】LIO-SAM)现在论文已经被IROS2020录用,作为高精度,imu,雷达,gps结合,程序还少的开源slam,非常值得学习。

需要安装的依赖:

sudo apt-get install -y ros-kinetic-navigation
sudo apt-get install -y ros-kinetic-robot-localization
sudo apt-get install -y ros-kinetic-robot-state-publisher

安装gtsam4.0.2库:

wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.2/
mkdir build && cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
sudo make install -j8

修改后的launch文件run_gugao.launch:

<launch><arg name="project" default="lio_sam"/><!-- Parameters --><rosparam file="$(find lio_sam)/config/params_mingnuo.yaml" command="load" /><!--- LOAM --><include file="$(find lio_sam)/launch/include/module_loam.launch" /><!--- Robot State TF --><include file="$(find lio_sam)/launch/include/module_robot_state_publisher.launch" /><!--- Run Navsat --><include file="$(find lio_sam)/launch/include/module_navsat.launch" /><!--- Run Rviz--><include file="$(find lio_sam)/launch/include/module_rviz.launch" /></launch>

运行walk数据包不需要改params.yaml文件。其他两个数据包运行要修改topics和extrinsicRPY,extrinsicRot。需要保存pcd请修改保存true和路径。之后sudo gedit /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py
调大_TIMEOUT_SIGINT值:
具体params.yaml配置修改:
修改点:
imu话题
激光话题
imu和激光外参extrinsicRot和extrinsicRPY
保存地图的开关:
savePCD: true # https://github.com/TixiaoShan/LIO-SAM/issues/3
savePCDDirectory: “/houduan/LIO-SAM_down/LIO-SAM_ws/out1/” # 记住不要加/home/name

lio_sam:# TopicspointCloudTopic: "points_raw"               # Point cloud dataimuTopic: "imu_correct"                         # IMU dataodomTopic: "odometry/imu"                   # IMU pre-preintegration odometry, same frequency as IMUgpsTopic: "odometry/gpsz"                   # GPS odometry topic from navsat, see module_navsat.launch file# GPS SettingsuseImuHeadingInitialization: false           # if using GPS data, set to "true"useGpsElevation: false                      # if GPS elevation is bad, set to "false"gpsCovThreshold: 2.0                        # m^2, threshold for using GPS dataposeCovThreshold: 25.0                      # m^2, threshold for using GPS data# Export settingssavePCD: true                              # https://github.com/TixiaoShan/LIO-SAM/issues/3savePCDDirectory: "/data/lio/"        # in your home folder, starts and ends with "/". Warning: the code deletes "LOAM" folder then recreates it. See "mapOptimization" for implementation# Sensor SettingsN_SCAN: 16                                  # number of lidar channel (i.e., 16, 32, 64, 128)Horizon_SCAN: 1800                          # lidar horizontal resolution (Velodyne:1800, Ouster:512,1024,2048)timeField: "time"                           # point timestamp field, Velodyne - "time", Ouster - "t"downsampleRate: 1                           # default: 1. Downsample your data if too many points. i.e., 16 = 64 / 4, 16 = 16 / 1 # IMU SettingsimuAccNoise: 3.9939570888238808e-03imuGyrNoise: 1.5636343949698187e-03imuAccBiasN: 6.4356659353532566e-05imuGyrBiasN: 3.5640318696367613e-05imuGravity: 9.80511# Extrinsics (lidar -> IMU)extrinsicTrans: [0.0, 0.0, 0.0]extrinsicRPY: [1,  0, 0,0, 1, 0,0, 0, 1]extrinsicRot: [1, 0, 0,0, 1, 0,0, 0, 1]# extrinsicRPY: [1, 0, 0,#                 0, 1, 0,#                 0, 0, 1]# LOAM feature thresholdedgeThreshold: 1.0surfThreshold: 0.1edgeFeatureMinValidNum: 10surfFeatureMinValidNum: 100# voxel filter papramsodometrySurfLeafSize: 0.4                     # default: 0.4mappingCornerLeafSize: 0.2                    # default: 0.2mappingSurfLeafSize: 0.4                      # default: 0.4# robot motion constraint (in case you are using a 2D robot)z_tollerance: 1000                            # metersrotation_tollerance: 1000                     # radians# CPU ParamsnumberOfCores: 4                              # number of cores for mapping optimizationmappingProcessInterval: 0.15                  # seconds, regulate mapping frequency# Surrounding mapsurroundingkeyframeAddingDistThreshold: 1.0   # meters, regulate keyframe adding thresholdsurroundingkeyframeAddingAngleThreshold: 0.2  # radians, regulate keyframe adding thresholdsurroundingKeyframeDensity: 2.0               # meters, downsample surrounding keyframe poses   surroundingKeyframeSearchRadius: 50.0         # meters, within n meters scan-to-map optimization (when loop closure disabled)# Loop closureloopClosureEnableFlag: falsesurroundingKeyframeSize: 25                   # submap size (when loop closure enabled)historyKeyframeSearchRadius: 15.0             # meters, key frame that is within n meters from current pose will be considerd for loop closurehistoryKeyframeSearchTimeDiff: 30.0           # seconds, key frame that is n seconds older will be considered for loop closurehistoryKeyframeSearchNum: 25                  # number of hostory key frames will be fused into a submap for loop closurehistoryKeyframeFitnessScore: 0.3              # icp threshold, the smaller the better alignment# VisualizationglobalMapVisualizationSearchRadius: 1000.0    # meters, global map visualization radiusglobalMapVisualizationPoseDensity: 10.0       # meters, global map visualization keyframe densityglobalMapVisualizationLeafSize: 1.0           # meters, global map visualization cloud density# Navsat (convert GPS coordinates to Cartesian)
navsat:frequency: 50wait_for_datum: falsedelay: 0.0magnetic_declination_radians: 0yaw_offset: 0zero_altitude: truebroadcast_utm_transform: falsebroadcast_utm_transform_as_parent_frame: falsepublish_filtered_gps: false# EKF for Navsat
ekf_gps:publish_tf: falsemap_frame: mapodom_frame: odombase_link_frame: base_linkworld_frame: odomfrequency: 50two_d_mode: falsesensor_timeout: 0.01# -------------------------------------# External IMU:# -------------------------------------imu0: imu_correct# make sure the input is aligned with ROS REP105. "imu_correct" is manually transformed by myself. EKF can also transform the data using tf between your imu and base_linkimu0_config: [false, false, false,true,  true,  true,false, false, false,false, false, true,true,  true,  true]imu0_differential: falseimu0_queue_size: 50 imu0_remove_gravitational_acceleration: true# -------------------------------------# Odometry (From Navsat):# -------------------------------------odom0: odometry/gpsodom0_config: [true,  true,  true,false, false, false,false, false, false,false, false, false,false, false, false]odom0_differential: falseodom0_queue_size: 10#                            x     y     z     r     p     y   x_dot  y_dot  z_dot  r_dot p_dot y_dot x_ddot y_ddot z_ddotprocess_noise_covariance: [  1.0,  0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,    0,    0,      0,0,    1.0,  0,    0,    0,    0,    0,     0,     0,     0,    0,    0,    0,    0,      0,0,    0,    10.0, 0,    0,    0,    0,     0,     0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0.03, 0,    0,    0,     0,     0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0.03, 0,    0,     0,     0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0.1,  0,     0,     0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0.25,  0,     0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0.25,  0,     0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0.04,  0,    0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0.01, 0,    0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0.01, 0,    0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0.5,  0,    0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,    0.01, 0,      0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,    0,    0.01,   0,0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,    0,    0,      0.015]

论文分析
论文认为loam系列文章存在一些问题。

1.将其数据保存在全局体素地图中
2.难以执行闭环检测
3.没有结合其他绝对测量(GPS,指南针等)
4.当该体素地图变得密集时,在线优化过程的效率降低

原理部分看https://blog.csdn.net/unlimitedai/article/details/107378759,写的非常详细。
lio-sam系统运行后严格依赖imu积分结果/odometry/imu_incremental。

定位部分可以参考另外一个项目的:
https://github.com/Gaochao-hit/LIO-SAM_based_relocalization

这篇关于lio-sam建图实现的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/980243

相关文章

java如何实现高并发场景下三级缓存的数据一致性

《java如何实现高并发场景下三级缓存的数据一致性》这篇文章主要为大家详细介绍了java如何实现高并发场景下三级缓存的数据一致性,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 下面代码是一个使用Java和Redisson实现的三级缓存服务,主要功能包括:1.缓存结构:本地缓存:使

如何在Java Spring实现异步执行(详细篇)

《如何在JavaSpring实现异步执行(详细篇)》Spring框架通过@Async、Executor等实现异步执行,提升系统性能与响应速度,支持自定义线程池管理并发,本文给大家介绍如何在Sprin... 目录前言1. 使用 @Async 实现异步执行1.1 启用异步执行支持1.2 创建异步方法1.3 调用

Spring Boot配置和使用两个数据源的实现步骤

《SpringBoot配置和使用两个数据源的实现步骤》本文详解SpringBoot配置双数据源方法,包含配置文件设置、Bean创建、事务管理器配置及@Qualifier注解使用,强调主数据源标记、代... 目录Spring Boot配置和使用两个数据源技术背景实现步骤1. 配置数据源信息2. 创建数据源Be

在MySQL中实现冷热数据分离的方法及使用场景底层原理解析

《在MySQL中实现冷热数据分离的方法及使用场景底层原理解析》MySQL冷热数据分离通过分表/分区策略、数据归档和索引优化,将频繁访问的热数据与冷数据分开存储,提升查询效率并降低存储成本,适用于高并发... 目录实现冷热数据分离1. 分表策略2. 使用分区表3. 数据归档与迁移在mysql中实现冷热数据分

linux批量替换文件内容的实现方式

《linux批量替换文件内容的实现方式》本文总结了Linux中批量替换文件内容的几种方法,包括使用sed替换文件夹内所有文件、单个文件内容及逐行字符串,强调使用反引号和绝对路径,并分享个人经验供参考... 目录一、linux批量替换文件内容 二、替换文件内所有匹配的字符串 三、替换每一行中全部str1为st

SpringBoot集成MyBatis实现SQL拦截器的实战指南

《SpringBoot集成MyBatis实现SQL拦截器的实战指南》这篇文章主要为大家详细介绍了SpringBoot集成MyBatis实现SQL拦截器的相关知识,文中的示例代码讲解详细,有需要的小伙伴... 目录一、为什么需要SQL拦截器?二、MyBATis拦截器基础2.1 核心接口:Interceptor

SpringBoot集成EasyPoi实现Excel模板导出成PDF文件

《SpringBoot集成EasyPoi实现Excel模板导出成PDF文件》在日常工作中,我们经常需要将数据导出成Excel表格或PDF文件,本文将介绍如何在SpringBoot项目中集成EasyPo... 目录前言摘要简介源代码解析应用场景案例优缺点分析类代码方法介绍测试用例小结前言在日常工作中,我们经

基于Python实现简易视频剪辑工具

《基于Python实现简易视频剪辑工具》这篇文章主要为大家详细介绍了如何用Python打造一个功能完备的简易视频剪辑工具,包括视频文件导入与格式转换,基础剪辑操作,音频处理等功能,感兴趣的小伙伴可以了... 目录一、技术选型与环境搭建二、核心功能模块实现1. 视频基础操作2. 音频处理3. 特效与转场三、高

Python实现中文文本处理与分析程序的示例详解

《Python实现中文文本处理与分析程序的示例详解》在当今信息爆炸的时代,文本数据的处理与分析成为了数据科学领域的重要课题,本文将使用Python开发一款基于Python的中文文本处理与分析程序,希望... 目录一、程序概述二、主要功能解析2.1 文件操作2.2 基础分析2.3 高级分析2.4 可视化2.5

Java实现预览与打印功能详解

《Java实现预览与打印功能详解》在Java中,打印功能主要依赖java.awt.print包,该包提供了与打印相关的一些关键类,比如PrinterJob和PageFormat,它们构成... 目录Java 打印系统概述打印预览与设置使用 PageFormat 和 PrinterJob 类设置页面格式与纸张