实验室小车跑开源LIO_SAM激光SLAM算法流程(IMU,雷达等串口配置)

本文主要是介绍实验室小车跑开源LIO_SAM激光SLAM算法流程(IMU,雷达等串口配置),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

1. IMU设置

2.雷达设置

3.修改配置

4.启动4个launch文件

imu节点

LIDAR节点

LIDAR数据转换节点

LIO_SAM节点

5.最终建图效果

6.推测漂移的原因

7.相关报错

一.imu_tk标定时出现的错误(一大堆错误,类似语法问题)


1. IMU设置

开源标定包标定imu,标定结果修改配置文件

ros读imu数据_好人cc的博客-CSDN博客_ros如何读取imu数据

2.雷达设置

rs雷达串口绑定,开启节点后收发数据正常即可

rs-lidar-16电脑运行过程_好人cc的博客-CSDN博客

3.修改配置

雷达转换,相关配置文件修改

lio_sam:# TopicspointCloudTopic: "velodyne_points"               # Point cloud dataimuTopic: "imu/data_open"                         # IMU dataodomTopic: "odometry/imu"                   # IMU pre-preintegration odometry, same frequency as IMU
# gpsTopic: "odometry/gpsz"                   # GPS odometry topic from navsat, see module_navsat.launch file# gpsTopic: "imu/nav"                #   imu/nav# FrameslidarFrame: "base_link"baselinkFrame: "base_link"odometryFrame: "odom"mapFrame: "map"# 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: false                              # https://github.com/TixiaoShan/LIO-SAM/issues/3savePCDDirectory: "/home/zhaopujun/catkin_ws"        # in your home folder, starts and ends with "/". Warning: the code deletes "LOAM" folder then recreates it. See "mapOptimization" for implementation# Sensor Settingssensor: velodyne                            # lidar sensor type, 'velodyne' or 'ouster' or 'livox'N_SCAN: 16                                  # number of lidar channel (i.e., Velodyne/Ouster: 16, 32, 64, 128, Livox Horizon: 6)Horizon_SCAN: 1800                          # lidar horizontal resolution (Velodyne:1800, Ouster:512,1024,2048, Livox Horizon: 4000)downsampleRate: 1                           # default: 1. Downsample your data if too many points. i.e., 16 = 64 / 4, 16 = 16 / 1lidarMinRange: 1.0                          # default: 1.0, minimum lidar range to be usedlidarMaxRange: 1000.0                       # default: 1000.0, maximum lidar range to be used# IMU Settings#imuAccNoise: 1.0151327754116719e-02
# imuGyrNoise: 4.9553027388650394e-03
#imuAccBiasN: 7.4655794718659740e-04
#imuGyrBiasN: 6.3727249626266877e-05
#imuGravity: 9.8035
# imuRPYWeight: 0.01imuAccNoise: 7.5236637366758383e-03imuGyrNoise: 1.4514722960755217e-04imuAccBiasN: 1.9784527286040426e-04imuGyrBiasN: 8.7450530768693497e-07imuGravity: 9.8035imuRPYWeight: 0.01# Extrinsics: T_lb (lidar -> IMU) #############imu-----IMUextrinsicTrans: [0.0, 0.0, 0.0]  #[-0.025, -0.07, -0.245]extrinsicRot: [0.974229, 0.225117,-0.0141541,     ###################################重新弄-0.225, 0.974313, 0.00939782,0.0159061, -0.00597096, 0.999856]
###################################    lidar imu联合标定后的结果
###################################    [0.329847, 0.186982, -0.925332,    ###################################   -0.242434, -0.930538, -0.274452,###################################   -0.912374, 0.314859, -0.261604]extrinsicRPY: [0.974229, 0.225117,-0.0141541,     ###################################重新弄-0.225, 0.974313, 0.00939782,0.0159061, -0.00597096, 0.999856]
#  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.2                     # default: 0.4 - outdoor, 0.2 - indoormappingCornerLeafSize: 0.1                    # default: 0.2 - outdoor, 0.1 - indoormappingSurfLeafSize: 0.2                      # default: 0.4 - outdoor, 0.2 - indoor# 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: trueloopClosureFrequency: 1.0                     # Hz, regulate loop closure constraint add frequencysurroundingKeyframeSize: 50                   # 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]

用rs_lidar雷达跑lio_sam_好人cc的博客-CSDN博客

4.启动4个launch文件

imu节点

roslaunch openzen_sensor openzen_lpms_ig1.launch 

LIDAR节点

 roslaunch rslidar_sdk start.launch 

LIDAR数据转换节点

roslaunch rs_to_velodyne rs2v.launch 

LIO_SAM节点

roslaunch lio_sam run.launch 

5.最终建图效果

最终建图还是会产生漂移

6.推测漂移的原因:

1.imu标定误差较大

2.GPS未使用,无法校正累计漂移

3.特征点较少的场景会出现退化导致漂移

相关报错:

一.imu_tk标定时出现的错误(一大堆错误,类似语法问题)

原因:ceres_slover的版本过高

解决:

1 删除ceres库,头文件和lib中

sudo rm -rf /usr/local/include/ceres 
sudo rm -rf /usr/local/lib/libceres.a

2 安装较低版本库1.14.0

参考:反复踩坑的ceres安装-----ubuntu18.04_小猫咪朴素的生存智慧的博客-CSDN博客_ceres ubuntu

Ubuntu18.04安装Ceres,图文详解_振华OPPO的博客-CSDN博客_ceres安装

3 安装后还有其他问题   /usr/bin/ld: 找不到 -l.......

参考:

ubuntu Make时,“/usr/bin/ld: 找不到 -lXXX”问题的解决方法_highoooo的博客-CSDN博客_/usr/bin/ld

这篇关于实验室小车跑开源LIO_SAM激光SLAM算法流程(IMU,雷达等串口配置)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



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

相关文章

Security OAuth2 单点登录流程

单点登录(英语:Single sign-on,缩写为 SSO),又译为单一签入,一种对于许多相互关连,但是又是各自独立的软件系统,提供访问控制的属性。当拥有这项属性时,当用户登录时,就可以获取所有系统的访问权限,不用对每个单一系统都逐一登录。这项功能通常是以轻型目录访问协议(LDAP)来实现,在服务器上会将用户信息存储到LDAP数据库中。相同的,单一注销(single sign-off)就是指

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

不懂推荐算法也能设计推荐系统

本文以商业化应用推荐为例,告诉我们不懂推荐算法的产品,也能从产品侧出发, 设计出一款不错的推荐系统。 相信很多新手产品,看到算法二字,多是懵圈的。 什么排序算法、最短路径等都是相对传统的算法(注:传统是指科班出身的产品都会接触过)。但对于推荐算法,多数产品对着网上搜到的资源,都会无从下手。特别当某些推荐算法 和 “AI”扯上关系后,更是加大了理解的难度。 但,不了解推荐算法,就无法做推荐系

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

无人叉车3d激光slam多房间建图定位异常处理方案-墙体画线地图切分方案

墙体画线地图切分方案 针对问题:墙体两侧特征混淆误匹配,导致建图和定位偏差,表现为过门跳变、外月台走歪等 ·解决思路:预期的根治方案IGICP需要较长时间完成上线,先使用切分地图的工程化方案,即墙体两侧切分为不同地图,在某一侧只使用该侧地图进行定位 方案思路 切分原理:切分地图基于关键帧位置,而非点云。 理论基础:光照是直线的,一帧点云必定只能照射到墙的一侧,无法同时照到两侧实践考虑:关

hadoop开启回收站配置

开启回收站功能,可以将删除的文件在不超时的情况下,恢复原数据,起到防止误删除、备份等作用。 开启回收站功能参数说明 (1)默认值fs.trash.interval = 0,0表示禁用回收站;其他值表示设置文件的存活时间。 (2)默认值fs.trash.checkpoint.interval = 0,检查回收站的间隔时间。如果该值为0,则该值设置和fs.trash.interval的参数值相等。

NameNode内存生产配置

Hadoop2.x 系列,配置 NameNode 内存 NameNode 内存默认 2000m ,如果服务器内存 4G , NameNode 内存可以配置 3g 。在 hadoop-env.sh 文件中配置如下。 HADOOP_NAMENODE_OPTS=-Xmx3072m Hadoop3.x 系列,配置 Nam

康拓展开(hash算法中会用到)

康拓展开是一个全排列到一个自然数的双射(也就是某个全排列与某个自然数一一对应) 公式: X=a[n]*(n-1)!+a[n-1]*(n-2)!+...+a[i]*(i-1)!+...+a[1]*0! 其中,a[i]为整数,并且0<=a[i]<i,1<=i<=n。(a[i]在不同应用中的含义不同); 典型应用: 计算当前排列在所有由小到大全排列中的顺序,也就是说求当前排列是第

csu 1446 Problem J Modified LCS (扩展欧几里得算法的简单应用)

这是一道扩展欧几里得算法的简单应用题,这题是在湖南多校训练赛中队友ac的一道题,在比赛之后请教了队友,然后自己把它a掉 这也是自己独自做扩展欧几里得算法的题目 题意:把题意转变下就变成了:求d1*x - d2*y = f2 - f1的解,很明显用exgcd来解 下面介绍一下exgcd的一些知识点:求ax + by = c的解 一、首先求ax + by = gcd(a,b)的解 这个