SLAM - ashBabu/Utilities GitHub Wiki

Steps for installing & running the ROS2 version of FAST-LIO

Install livox sdk

  • git clone https://github.com/Livox-SDK/Livox-SDK2.git
  • cd Livox-SDK2/
  • mkdir build && cd build
  • cmake .. && make -j8
  • sudo make install

ROS 2 versions of livox_ros_driver and FAST_LIO

  • cd ~/ros2_ws/src
  • git clone -b ROS2 [email protected]:hku-mars/FAST_LIO.git
  • git clone -b feature/use-standard-unit [email protected]:Ericsii/livox_ros_driver2.git
  • `cd ~/ros2_ws
  • colcon build --symlink-install

Simulation with ouster

  • Edit the config file, the main parameters being the pointcloud and imu topic name
/**:
    ros__parameters:
        feature_extract_enable: false
        point_filter_num: 3
        max_iteration: 3
        filter_size_surf: 0.5
        filter_size_map: 0.5
        cube_side_length: 1000.0
        runtime_pos_log_enable: false
        map_file_path: "./test.pcd"

        common:
            lid_topic:  "/ouster/points"
            imu_topic:  "/ouster/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: 3                # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR, 
            scan_line: 64
            timestamp_unit: 3                 # 0-second, 1-milisecond, 2-microsecond, 3-nanosecond.
            blind: 4.0

        mapping:
            acc_cov: 0.1
            gyr_cov: 0.1
            b_acc_cov: 0.0001
            b_gyr_cov: 0.0001
            fov_degree:    360.0
            det_range:     150.0
            extrinsic_est_en:  false      # true: enable the online estimation of IMU-LiDAR extrinsic
            extrinsic_T: [ 0.0, 0.0, 0.0 ]
            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.
  • ros2 launch fast_lio mapping.launch.py config_file:=ouster_os0.yaml use_sim_time:=true
  • ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 body base_link. Dont know why this is required.