当前位置:   article > 正文

基于mid-360的FAST_LIO2,Point-LIO,faster-lio,LIO-SAM部署(持续更新)_faster-lio mid360

faster-lio mid360

硬件:orangepi5 8G+32G (RK3588S ARM64)

系统:ubuntu 20.04

FAST_LIO2:

1.编译livox-SDK2

  1. git clone https://github.com/Livox-SDK/Livox-SDK2.git
  2. cd ./Livox-SDK2/
  3. mkdir build && cd build
  4. cmake .. && make -j8
  5. sudo make install

2.编译FAST_LIO

2.1 创建工作空间

  1. mkdir FAST-LIO2 && cd FAST-LIO2
  2. mkdir src && cd src

2.2 下载livox_ros_driver2源码

  1. git clone https://github.com/Livox-SDK/livox_ros_driver2.git
  2. cd livox_ros_driver2
  3. ./build.sh ROS1

2.3 下载FAST_LIO2源码

  1. git clone https://github.com/hku-mars/FAST_LIO.git
  2. cd FAST_LIO
  3. git submodule update --init
  4. cd ../..

3.修改FAST_LIO代码

3.1 FAST_LIO2的CMakelists.txt

  1. find_package(catkin REQUIRED COMPONENTS
  2. ...
  3. livox_ros_driver
  4. ...
  5. )

改为

  1. find_package(catkin REQUIRED COMPONENTS
  2. ...
  3. livox_ros_driver2
  4. ...
  5. )

3.2 FAST_LIO2的package.xml

  1. <build_depend>livox_ros_driver</build_depend>
  2. <run_depend>livox_ros_driver</run_depend>

改为

  1. <build_depend>livox_ros_driver2</build_depend>
  2. <run_depend>livox_ros_driver2</run_depend>

3.3 FAST_LIO2的头文件引用

用vscode的搜索一键替换

#include <livox_ros_driver/CustomMsg.h>

改为

#include <livox_ros_driver2/CustomMsg.h>

3.4 FAST_LIO2的命名空间

用vscode的搜索一键替换

livox_ros_driver::

改为

livox_ros_driver2::

编译:

catkin_make

Point-LIO:

1.编译livox-SDK

  1. git clone https://github.com/Livox-SDK/Livox-SDK.git
  2. cd Livox-SDK
  3. cd build && cmake ..
  4. make -j8
  5. sudo make install

2.编译Point-LIO

2.1 编译livox_ros_driver

  1. mkdir -p Point-LIO/src #-p 代表递归创建文件夹
  2. cd Point-LIO/src
  3. git clone https://github.com/Livox-SDK/livox_ros_driver.git
  4. cd ..
  5. catkin_make

2.1 编译Point-LIO

  1. cd src
  2. git clone https://github.com/hku-mars/Point-LIO.git
  3. cd ..
  4. catkin_make

  src/config 文件夹下增加的 mid360.yaml 文件配置:

  1. common:
  2. lid_topic: "/livox/lidar"
  3. imu_topic: "/livox/imu"
  4. con_frame: false # true: if you need to combine several LiDAR frames into one
  5. con_frame_num: 1 # the number of frames combined
  6. cut_frame: false # true: if you need to cut one LiDAR frame into several subframes
  7. cut_frame_time_interval: 0.1 # should be integral fraction of 1 / LiDAR frequency
  8. time_lag_imu_to_lidar: 0.0 # Time offset between LiDAR and IMU calibrated by other algorithms, e.g., LI-Init (find in Readme)
  9. # the timesample of IMU is transferred from the current timeline to LiDAR's timeline by subtracting this value
  10. preprocess:
  11. lidar_type: 1
  12. scan_line: 4
  13. timestamp_unit: 1 # the unit of time/t field in the PointCloud2 rostopic: 0-second, 1-milisecond, 2-microsecond, 3-nanosecond.
  14. blind: 0.5
  15. mapping:
  16. imu_en: true
  17. start_in_aggressive_motion: false # if true, a preknown gravity should be provided in following gravity_init
  18. extrinsic_est_en: false # for aggressive motion, set this variable false
  19. imu_time_inte: 0.005 # = 1 / frequency of IMU
  20. satu_acc: 3.0 # the saturation value of IMU's acceleration. not related to the units
  21. satu_gyro: 35 # the saturation value of IMU's angular velocity. not related to the units
  22. acc_norm: 1.0 # 1.0 for g as unit, 9.81 for m/s^2 as unit of the IMU's acceleration
  23. lidar_meas_cov: 0.001 # 0.001; 0.01
  24. acc_cov_output: 500
  25. gyr_cov_output: 1000
  26. b_acc_cov: 0.0001
  27. b_gyr_cov: 0.0001
  28. imu_meas_acc_cov: 0.1 #0.1 # 0.1
  29. imu_meas_omg_cov: 0.1 #0.01 # 0.1
  30. gyr_cov_input: 0.01 # for IMU as input model
  31. acc_cov_input: 0.1 # for IMU as input model
  32. plane_thr: 0.1 # 0.05, the threshold for plane criteria, the smaller, the flatter a plane
  33. match_s: 81
  34. fov_degree: 360
  35. det_range: 100
  36. gravity_align: true # true to align the z axis of world frame with the direction of gravity, and the gravity direction should be specified below
  37. gravity: [0.0, 0.0, -9.810] # [0.0, 9.810, 0.0] # gravity to be aligned
  38. gravity_init: [0.0, 0.0, -9.810] # [0.0, 9.810, 0.0] # # preknown gravity in the first IMU body frame, use when imu_en is false or start from a non-stationary state
  39. extrinsic_T: [ -0.011, -0.02329, 0.04412 ]
  40. extrinsic_R: [ 1, 0, 0,
  41. 0, 1, 0,
  42. 0, 0, 1 ]
  43. odometry:
  44. publish_odometry_without_downsample: false
  45. publish:
  46. path_en: true # false: close the path output
  47. scan_publish_en: true # false: close all the point cloud output
  48. scan_bodyframe_pub_en: false # true: output the point cloud scans in IMU-body-frame
  49. pcd_save:
  50. pcd_save_en: false
  51. interval: -1 # how many LiDAR frames saved in each pcd file;
  52. # -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.

 src/launch 文件夹下增加 mapping_mid360.launch 文件: 

  1. <launch>
  2. <!-- Launch file for Livox AVIA LiDAR -->
  3. <arg name="rviz" default="true" />
  4. <node pkg="point_lio" type="pointlio_mapping" name="laserMapping" output="screen">
  5. <rosparam command="load" file="$(find point_lio)/config/mid360.yaml" />
  6. <param name="use_imu_as_input" type="bool" value="1"/> <!--change to 1 to use IMU as input of Point-LIO-->
  7. <param name="prop_at_freq_of_imu" type="bool" value="1"/>
  8. <param name="check_satu" type="bool" value="1"/>
  9. <param name="init_map_size" type="int" value="10"/>
  10. <param name="point_filter_num" type="int" value="1"/> <!--4, 3-->
  11. <param name="space_down_sample" type="bool" value="1" />
  12. <param name="filter_size_surf" type="double" value="0.3" /> <!--0.5, 0.3, 0.2, 0.15, 0.1-->
  13. <param name="filter_size_map" type="double" value="0.2" /> <!--0.5, 0.3, 0.15, 0.1-->
  14. <param name="cube_side_length" type="double" value="2000" /> <!--1000-->
  15. <param name="runtime_pos_log_enable" type="bool" value="0" /> <!--1-->
  16. </node>
  17. <group if="$(arg rviz)">
  18. <node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find point_lio)/rviz_cfg/loam_livox.rviz" />
  19. </group>
  20. launch-prefix="gdb -ex run --args"
  21. </launch>

运行

roslaunch point_lio mapping_mid360.launch

faster-lio

1.编译livox-SDK

  1. git clone https://github.com/Livox-SDK/Livox-SDK.git
  2. cd Livox-SDK
  3. cd build && cmake ..
  4. make -j8
  5. sudo make install

2.编译faster-lio 

2.1 编译livox_ros_driver

  1. mkdir -p Point-LIO/src #-p 代表递归创建文件夹
  2. cd Point-LIO/src
  3. git clone https://github.com/Livox-SDK/livox_ros_driver.git
  4. cd ..
  5. catkin_make

2.2  编译faster-lio

  1. mkdir -p faster_lio_ws/src
  2. cd faster_lio_ws/src
  3. git clone https://github.com/gaoxiang12/faster-lio.git
  4. cd ..
  5. catkin_make

src/config 文件夹下增加的 mid360.yaml 文件配置

  1. common:
  2. lid_topic: "/livox/lidar"
  3. imu_topic: "/livox/imu"
  4. time_sync_en: false # ONLY turn on when external time synchronization is really not possible
  5. preprocess:
  6. lidar_type: 1 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR,
  7. scan_line: 4
  8. blind: 0.5
  9. time_scale: 1e-3
  10. mapping:
  11. acc_cov: 0.1
  12. gyr_cov: 0.1
  13. b_acc_cov: 0.0001
  14. b_gyr_cov: 0.0001
  15. fov_degree: 360
  16. det_range: 100.0
  17. extrinsic_est_en: false # true: enable the online estimation of IMU-LiDAR extrinsic
  18. extrinsic_T: [ -0.011, -0.02329, 0.04412 ]
  19. extrinsic_R: [ 1, 0, 0,
  20. 0, 1, 0,
  21. 0, 0, 1 ]
  22. publish:
  23. path_publish_en: false
  24. scan_publish_en: true # false: close all the point cloud output
  25. scan_effect_pub_en: true # true: publish the pointscloud of effect point
  26. dense_publish_en: false # false: low down the points number in a global-frame point clouds scan.
  27. scan_bodyframe_pub_en: true # true: output the point cloud scans in IMU-body-frame
  28. path_save_en: true # 保存轨迹,用于精度计算和比较
  29. pcd_save:
  30. pcd_save_en: true
  31. interval: -1 # how many LiDAR frames saved in each pcd file;
  32. # -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.
  33. feature_extract_enable: false
  34. point_filter_num: 3
  35. max_iteration: 3
  36. filter_size_surf: 0.5
  37. filter_size_map: 0.5 # 暂时未用到,代码中为0, 即倾向于将降采样后的scan中的所有点加入map
  38. cube_side_length: 1000
  39. ivox_grid_resolution: 0.5 # default=0.2
  40. ivox_nearby_type: 18 # 6, 18, 26
  41. esti_plane_threshold: 0.1 # default=0.1

在 src/launch 文件夹下增加 mapping_mid360.launch:

  1. <launch>
  2. <!-- Launch file for Livox AVIA LiDAR -->
  3. <arg name="rviz" default="true" />
  4. <rosparam command="load" file="$(find faster_lio)/config/mid360.yaml" />
  5. <param name="feature_extract_enable" type="bool" value="0"/>
  6. <param name="point_filter_num_" type="int" value="3"/>
  7. <param name="max_iteration" type="int" value="3" />
  8. <param name="filter_size_surf" type="double" value="0.5" />
  9. <param name="filter_size_map" type="double" value="0.5" />
  10. <param name="cube_side_length" type="double" value="1000" />
  11. <param name="runtime_pos_log_enable" type="bool" value="1" />
  12. <node pkg="faster_lio" type="run_mapping_online" name="laserMapping" output="screen" />
  13. <group if="$(arg rviz)">
  14. <node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find faster_lio)/rviz_cfg/loam_livox.rviz" />
  15. </group>
  16. </launch>

运行:

roslaunch faster_lio mapping_mid360.launch

LIO-SAM:

 1.编译livox-SDK

  1. git clone https://github.com/Livox-SDK/Livox-SDK.git
  2. cd Livox-SDK
  3. cd build && cmake ..
  4. make -j8
  5. sudo make install

2.编译LIO-SAM

2.1 编译livox_ros_driver

  1. mkdir -p Point-LIO/src #-p 代表递归创建文件夹
  2. cd Point-LIO/src
  3. git clone https://github.com/Livox-SDK/livox_ros_driver.git
  4. cd ..
  5. catkin_make

2.2  编译faster-lio

依赖:

  1. sudo apt-get install -y ros-noetic-navigation
  2. sudo apt-get install -y ros-noetic-robot-localization
  3. sudo apt-get install -y ros-noetic-robot-state-publisher
  4. sudo add-apt-repository ppa:borglab/gtsam-release-4.0
  5. sudo apt install libgtsam-dev libgtsam-unstable-dev

下载代码:

  1. mkdir -p LIOSAM/src
  2. cd LIOSAM/src
  3. git clone https://github.com/nkymzsy/LIO-SAM-MID360.git

修改CMakelists:

C++11  改成C++14

修改src/LIO-SAM-MID360-master/include 目录下,utility.h 文件

  1. #include <opencv/cv.h> 改为 #include <opencv2/opencv.hpp>
  2. #include <pcl/kdtree/kdtree_flann.h> 头文件放到 #include <opencv2/opencv.hpp>前面

编译:

  1. cd ~/LIOSAM
  2. catkin_make

启动

roslaunch lio_sam run6axis.launch

LIOSAM-mid360的yaml文件的参数好像有点问题,会飘,通常出现在雷达和IMU没标定好的情况。过两天测试好再更新这些问题解决办法。

感觉大佬的部署教学,有些部署错误这里已修改多层长走廊场景下Fast-Lio2、Point-Lio、LIO-SAM、Faster-Lio建图对比视频_哔哩哔哩_bilibili

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

闽ICP备14008679号