利用LIO-SAM构建点云地图,并实现relocalization

按照https://github.com/zoe4751/LIO-SAM 步骤生成点云地图,

地图存储可以参考我的上一篇博文:

LIO-SAM如何存储地图-CSDN博客

作者构建地图使用LIO-SAM提到的数据集Park dataset:

利用构建的地图实现重定位功能,参考https://github.com/YJZLuckyBoy/liorf_localization

将配置文件localization.yaml更改为:

pointCloudTopic: "/points_raw"               # Point cloud data
  imuTopic: "/imu_raw"                        
                       
  odomTopic: "odometry/imu"                   
# IMU pre-preintegration odometry, same frequency as IMU
  gpsTopic: "odometry/gpsz"                   
# GPS odometry topic from navsat, see module_navsat.launch file

  # Frames
  lidarFrame: "base_link"
  baselinkFrame: "base_link"
  odometryFrame: "odom"
  mapFrame: "map"

  # GPS Settings
  useImuHeadingInitialization: true           # 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 data
  poseCovThreshold: 25.0                      # m^2, threshold for using GPS data
  
  # Export settings
  savePCD: true                              # https://github.com/TixiaoShan/LIO-SAM/issues/3
  savePCDDirectory: "/Downloads/LOAM/"       


  sensor: velodyne                            
# lidar sensor type, 'velodyne' or 'ouster' or 'livox' or 'robosense'
  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(line). i.e., 16 = 64 / 4, 16 = 16 / 1
  point_filter_num: 3                        
 # default: 3. Downsample your data if too many points(point). e.g., 16: 1, 32: 5, 64: 8
  lidarMinRange: 1.0                         
 # default: 1.0, minimum lidar range to be used
  lidarMaxRange: 1000.0                       
# default: 1000.0, maximum lidar range to be used

  # IMU Settings
  imuType: 1                                  # 0: 6-axis  1: 9-axis
  imuRate: 100.0
  # lio-sam 
  imuAccNoise: 3.9939570888238808e-03
  imuGyrNoise: 1.5636343949698187e-03
  imuAccBiasN: 6.4356659353532566e-05
  imuGyrBiasN: 3.5640318696367613e-05
  

  # # # MULRAN Datasets
  # imuAccNoise: 0.009939570888238808e-03
  # imuGyrNoise: 0.005636343949698187e-03
  # imuAccBiasN: 0.64356659353532566e-03
  # imuGyrBiasN: 0.35640318696367613e-03

  imuGravity: 9.80511
  imuRPYWeight: 0.01
  

  # Extrinsics: T_lb (lidar -> imu)
  extrinsicTrans: [0.0, 0.0, 0.0]
  extrinsicRot: [1, 0, 0,
                  0, 1, 0,
                  0, 0, -1]


  extrinsicRPY: [0, -1, 0,
                  1, 0, 0,
                  0, 0, 1]

  # # # mulran
  # # Extrinsics: T_lb (lidar -> imu)
  # extrinsicTrans: [0.0, 0.0, 0.0]
  # extrinsicRot: [-1, 0, 0,
  #                 0, -1, 0,
  #                 0, 0, 1]


  mappingSurfLeafSize: 0.4                      # default: 0.4 - outdoor, 0.2 - indoor

  # robot motion constraint (in case you are using a 2D robot)
  z_tollerance: 1000                            # meters
  rotation_tollerance: 1000                     # radians

  # CPU Params
  numberOfCores: 4                              # number of cores for mapping optimization
  mappingProcessInterval: 0.15                  # seconds, regulate mapping frequency

  # Surrounding map
  surroundingkeyframeAddingDistThreshold: 1.0   # meters, regulate keyframe adding threshold
  surroundingkeyframeAddingAngleThreshold: 0.2  # radians, regulate keyframe adding threshold
  surroundingKeyframeDensity: 2.0               # meters, downsample surrounding keyframe poses   
  surroundingKeyframeSearchRadius: 50.0         # meters, within n meters scan-to-map optimization (when loop closure disabled)
  surroundingKeyframeMapLeafSize: 0.3           # downsample local map point cloud

  # Loop closure
  loopClosureEnableFlag: true
  loopClosureFrequency: 1.0                     
  surroundingKeyframeSize: 50                   # submap size (when loop closure enabled)
  historyKeyframeSearchRadius: 15.0             
  historyKeyframeSearchTimeDiff: 30.0          
  historyKeyframeSearchNum: 25                  
  loopClosureICPSurfLeafSize: 0.5               # downsample icp point cloud  
  historyKeyframeFitnessScore: 0.3             

  # Visualization
  globalMapVisualizationSearchRadius: 1000.0    # meters, global map visualization radius
  globalMapVisualizationPoseDensity: 10.0      
  globalMapVisualizationLeafSize: 1.0          

打开一个终端:

roslaunch liorf_localization run_localization.launch

另外一个终端运行数据集:

rosbag play park_dataset-001.bag

运行结果图,可以实现在载入的地图中完成重定位:

  • 16
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

稻壳特筑

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值