ZikangYuan / sr_lio

[IROS 2024] A LiDAR-inertial odometry (LIO) package that can adjust the execution frequency beyond the sweep frequency
GNU General Public License v2.0
467 stars 64 forks source link

Running with RS-Bpearl #11

Closed pedrotomas27 closed 5 months ago

pedrotomas27 commented 5 months ago

Hello ! Sorry for bothering, but i'm testing the LiDAR RS-Bpearl, and after a launch, with this config file

common:
    lidar_topic:  "/rslidar_points"
    imu_topic:  "/imu/data"
    point_filter_num: 1
    sweep_cut_num: 1
    time_sync_en: false         # ONLY turn on when external time synchronization is really not possible
    gravity_acc: [ 0.0, 0.0, 9.80416]

lidar_parameter:
    lidar_type: 4                # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR, 4 for robosense
    N_SCANS: 32
    SCAN_RATE: 10                # only need to be set for velodyne, unit: Hz,
    time_unit: 0            # the unit of time/t field in the PointCloud2 rostopic: 0-second, 1-milisecond, 2-microsecond, 3-nanosecond.
    blind: 0.2
    fov_degree:    360
    det_range:     100.0

imu_parameter:
    acc_cov: 0.1
    gyr_cov: 0.1
    b_acc_cov: 0.0001
    b_gyr_cov: 0.0001
    time_diff_enable: false

extrinsic_parameter:
    extrinsic_enable:  false      # true: enable the online estimation of IMU-LiDAR extrinsic,
    extrinsic_t: [ 0, 0, 0]
    extrinsic_R: [ 1, 0, 0, 
                   0, -1, 0, 
                   0, 0, -1]

odometry_options:
    voxel_size: 0.1 # The voxel size for the grid sampling of the new frame (before keypoints extraction)
    sample_voxel_size: 1.5 # The size of a voxel for the selection of `keypoints` by grid sampling
    max_distance: 2000.0 # The threshold of the distance to suppress voxels from the map
    max_num_points_in_voxel: 20 # The maximum number of points per voxel of the map
    init_num_frames: 20
    min_distance_points: 0.15
    distance_error_threshold: 100.0 # The motion of the sensor between two frames which is considered erroneous (stops the odometry)
    motion_compensation: CONSTANT_VELOCITY # The profile of the motion compensation (IMU, CONSTANT_VELOCITY)
    initialization: INIT_IMU # [INIT_IMU, INIT_CONSTANT_VELOCITY]

icp_options:
    size_voxel_map: 1.0 # The voxel size of in the voxel map
    num_iters_icp: 5 # The number of iterations of the ICP
    min_number_neighbors: 20 # The minimum number of neighbor points to define a valid neighborhood
    voxel_neighborhood: 1
    max_number_neighbors: 20
    max_dist_to_plane_ct_icp: 0.3
    threshold_orientation_norm: 0.1 # Threshold on orientation changes (in degrees) for early termination of the ICP
    threshold_translation_norm: 0.01 # Threshold on distance changes (in m) for early termination of the ICP
    debug_print: false
    num_closest_neighbors: 1
    min_num_residuals: 200 # The minimum number of residuals for a valid ICP problem
    max_num_residuals: 600 # The maximum number of residuals considered (if more keypoints exist, residuals are randomly sampled)

It doesnt flag any error, but whenever i run my bag file i get this error:

process[lio_optimization-1]: started with pid [39834] process[rviz-2]: started with pid [39835] [ INFO] [1712774027.763838755]: Wait more IMU measurements... [ INFO] [1712774027.879328679]: Wait more IMU measurements... [ INFO] [1712774027.983301862]: Wait more IMU measurements... [ INFO] [1712774028.059215990]: Wait more IMU measurements... [ INFO] [1712774028.158987724]: Wait more IMU measurements... [ INFO] [1712774028.287150254]: Wait more IMU measurements... [ INFO] [1712774028.358323531]: Wait more IMU measurements... [ INFO] [1712774028.493346267]: Wait more IMU measurements... [ INFO] [1712774028.560667782]: Wait more IMU measurements... [ INFO] [1712774028.676756769]: Wait more IMU measurements... [ INFO] [1712774028.785067563]: Wait more IMU measurements... [ INFO] [1712774028.888341760]: Wait more IMU measurements... [ INFO] [1712774028.960092560]: Wait more IMU measurements... [ INFO] [1712774029.060610629]: Wait more IMU measurements... [ INFO] [1712774029.158085200]: Wait more IMU measurements... [ INFO] [1712774029.260941911]: Wait more IMU measurements... [ INFO] [1712774029.360273904]: Wait more IMU measurements... [ INFO] [1712774029.481662640]: Wait more IMU measurements... [ INFO] [1712774029.586016466]: Wait more IMU measurements... [ INFO] [1712774029.692679456]: Wait more IMU measurements... [ INFO] [1712774029.758716389]: Wait more IMU measurements... [ INFO] [1712774029.859113073]: Wait more IMU measurements... [ INFO] [1712774029.986836790]: Wait more IMU measurements... [ INFO] [1712774030.097330981]: Wait more IMU measurements... [ INFO] [1712774030.158912450]: Wait more IMU measurements... [ INFO] [1712774030.284812213]: Wait more IMU measurements... [ INFO] [1712774030.360431773]: Wait more IMU measurements... [ INFO] [1712774030.460586029]: Wait more IMU measurements... [ INFO] [1712774030.559054065]: Wait more IMU measurements... [ INFO] [1712774030.658294263]: Wait more IMU measurements... [ INFO] [1712774030.761387006]: IMU Initialization Done. init_gravity = 9.80198 -0.143398 0.149096 init_bg = -0.00188656 -0.000223365 0.000389759 lio_optimization: /home/pedro/catkin_ws/src/sr_lio/src/utility.cpp:220: void distortFrameByConstant(std::vector&, std::vector&, double, Eigen::Matrix3d&, Eigen::Vector3d&): Assertion `time_point > time_frame_begin - 1e-6 && time_point < time_frame_end + 1e-6' failed. [lio_optimization-1] process has died [pid 39834, exit code -6, cmd /home/pedro/catkin_ws/devel/lib/sr_lio/lio_optimization __name:=lio_optimization __log:=/home/pedro/.ros/log/d4096686-f766-11ee-900c-8b22dffe9a47/lio_optimization-1.log]. log file: /home/pedro/.ros/log/d4096686-f766-11ee-900c-8b22dffe9a47/lio_optimization-1*.log

Do you got any ideia what the problem can be? Thank you in advance.

ZikangYuan commented 5 months ago

Normally, the timestamp for each point in a single sweep should be between the start time and the end time of this sweep. This error indicates that the timestamp of a point is not between the start and end time of this sweep. I guess it is caused by the incorrect setting of the parameter of lidar_parameter: time_unit.

pedrotomas27 commented 5 months ago

I changed the time_unit parameter, and 0 was the only value that provided feedback (the error mentioned above). The issue probably comes from the data structure of my point cloud. The timestamp is in double format, not float. Thus, I had to make the necessary changes, which resulted in these errors...

The dataset used was from https://hilti-challenge.com/dataset-2023.html

ZikangYuan commented 5 months ago

Okay, I'm glad your problem has been resolved.