zijiechenrobotics / ig_lio

iG-LIO: An Incremental GICP-based Tightly-coupled LiDAR-inertial Odometry
GNU General Public License v2.0
388 stars 53 forks source link

Why is the pointcloud during mapping separated like grids, and there are very few points in each frame #37

Open handshow888 opened 1 month ago

handshow888 commented 1 month ago

截图 2024-07-27 21-21-24 截图 2024-07-27 21-21-37 截图 2024-07-27 21-29-35 截图 2024-07-27 21-43-41

Figure 1 and 2 are the pcd I saved. It looks like many points are clustered into grids. Figure3 is the screenshot of each frame from rviz2, I subscribe the /cloud_registered and set Size(pixels) to 5(default:1), I only managed to see the points after that. No matter which angle I rotate the lidar to, the number of points is always small and sparse. In figure4, I set Size(pixels) to 2, Decay Time to 300, it can be seen that although it is a smooth wall, there are still some points that are particularly dense, while others are very sparse.

Lidar: livox mid360 Due to special requirements, I flipped the roll axis of the radar 180 degrees. I run ig_lio_mapping.launch.py, and it loaded livox.yaml. here is my params:

/**:
  ros__parameters:
    #for odom
    odom/sendTF: true
    #topic names 
    odom/lidar_topic: /livox/lidar #/points_raw
    odom/imu_topic: /livox/imu #/imu_correct
    odom/lidar_type: livox # livox velodyne ouster

    #frames
    odom/odom_frame: lio_odom
    odom/robot_frame: base_link
    odom/imu_frame: imu_link
    odom/lidar_frame: livox_frame
    odom/min_radius: 1.0
    odom/max_radius: 150.0
    odom/point_filter_num: 1
    odom/time_scale: 1000.0 # nclt: 0.001 other: 1000.0
    odom/enable_ahrs_initalization: false
    odom/enable_acc_correct: true

    odom/scan_resolution: 0.05
    odom/voxel_map_resolution: 0.5
    odom/max_iterations: 10

    odom/acc_cov: 0.1
    odom/gyr_cov: 0.1
    odom/ba_cov: 0.000001   #0.000001
    odom/bg_cov: 0.000001   #0.000001
    odom/init_ori_cov: 0.0001
    odom/init_pos_cov: 0.0001
    odom/init_vel_cov: 100.0
    odom/init_ba_cov: 0.0001
    odom/init_bg_cov: 0.0001
    odom/gravity: 9.80665

    odom/gicp_constraints_gain: 100.0 #100.0
    odom/point2plane_constraints_gain: 1000.0 #1000.0
    odom/enable_undistort: true
    odom/enable_outlier_rejection: true

    #for extrinsics
    extrinsics/imu2lidar/t: [0.011, -0.02329, 0.04412]
    extrinsics/imu2lidar/r: [1.0, 0.0, 0.0,
                            0.0, 1.0, 0.0,
                            0.0,  0.0, 1.0 ]

    extrinsics/robot2lidar/t: [0.0, 0.0, 0.0]
    extrinsics/robot2lidar/r: [1.0, 0.0, 0.0,
                              0.0, 1.0, 0.0,
                              0.0,  0.0, 1.0 ]

    extrinsics/robot2imu/t: [0.0, 0.0, 0.0]
    extrinsics/robot2imu/r: [1.0, 0.0, 0.0,
                            0.0, 1.0, 0.0,
                            0.0,  0.0, 1.0 ]

    #for map
    map/save_map_path: /home/handshow/ig_lio/map #do not put / at the end of line
    map/map_name: loc
    map/map_frame: map  # lio_odom
handshow888 commented 1 month ago

by the way, I use the ros2 version from pr