ZikangYuan / liw_oam

[IROS 2023] A LiDAR-inertial-wheel odometry and mapping system based on BA framework.
GNU General Public License v2.0
505 stars 72 forks source link

运行kaist数据集时,轨迹很长时间不动 #2

Closed xu-shower closed 1 year ago

xu-shower commented 1 year ago

你好,我在运行LIW-OAM时,使用的是你提供的百度云网盘的kasit_1.bag启动对应的launch文件后播放bag,但很长时间内,轨迹都不动,直到bag播放完毕,轨迹才运动了一段距离,输出的pose.txt文件我用evo_tool显示出来也的确只有一小段轨迹。config.yaml文件里我只改了激光雷达话题的名字,其余都没改动过.

EinsTian1 commented 1 year ago

你好,我在运行LIW-OAM时,使用的是你提供的百度云网盘的kasit_1.bag启动对应的launch文件后播放bag,但很长时间内,轨迹都不动,直到bag播放完毕,轨迹才运动了一段距离,输出的pose.txt文件我用evo_tool显示出来也的确只有一小段轨迹。config.yaml文件里我只改了激光雷达话题的名字,其余都没改动过.

请问一下,你用的哪个yaml文件?KAIST数据集有对应的yaml文件

xu-shower commented 1 year ago

我使用的是源码自带的kaist.ymal,一开始这个文件里的雷达话题是/ns1/velodyne_points,但kaist_1.bag里的雷达话题是/velodyne_points,所以我就改了下话题名字。kaist_1.bag我用其他算法运行过,没有问题。我用的虚拟机跑的LIW-OAM,这个会有影响吗?kaist.ymal完整内容如下: common: lidar_topic: "/velodyne_points" imu_topic: "/imu/data_raw" wheel_topic: "/velocity" point_filter_num: 4 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: 2 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR, N_SCANS: 16 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: 2 fov_degree: 180 det_range: 100.0

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

extrinsic_parameter: extrinsic_enable: false # true: enable the online estimation of IMU-LiDAR extrinsic, extrinsic_t: [ 0.58743, -0.02924, -0.175676276933] extrinsic_R: [ -0.515105,-0.702383,-0.491249, 0.487008,-0.711468,0.506593, -0.70533,0.0217062,0.708547] extrinsic_t_odom: [ 0.0, 0.0, 0.0] extrinsic_R_odom: [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ]

odometry_options: voxel_size: 0.5 # 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 method_system_init: STATIC_INIT # LIO system initialization [MOTION_INIT, STATIC_INIT] init_num_frames: 20 robust_registration: false 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: CONTINUOUS # The profile of the motion compensation (NONE, CONSTANT_VELOCITY, ITERATIVE, CONTINUOUS) initialization: INIT_IMU # [INIT_CONSTANT_VELOCITY, INIT_IMU]

icp_options: size_voxel_map: 1.0 # The voxel size of in the voxel map num_iters_icp: 15 # 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 point_to_plane_with_distortion: true distance: CT_POINT_TO_PLANE # Options: [CT_POINT_TO_PLANE, POINT_TO_PLANE] num_closest_neighbors: 1 beta_location_consistency: 1.0 beta_orientation_consistency: 1.0 beta_constant_velocity: 1.0 # Trajectory Regularisation Weight to constrain the optimization beta_wheel_velocity: 1.0 beta_small_velocity: 0.00 solver: LIW # The type of SOLVER used in [LIW, LIDAR] 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)

loss_function: HUBER # Options: [CAUCHY, STANDARD, HUBER, TOLERANT, TRUNCATED]
ls_max_num_iters: 5 # The number of steps performed by ceres for each iteration of the ICP
ls_num_threads: 16 # The number of threads to build and solve the least square system
ls_sigma: 0.5
ls_tolerant_min_threshold: 0.05
EinsTian1 commented 1 year ago

我使用的是源码自带的kaist.ymal,一开始这个文件里的雷达话题是/ns1/velodyne_points,但kaist_1.bag里的雷达话题是/velodyne_points,所以我就改了下话题名字。kaist_1.bag我用其他算法运行过,没有问题。我用的虚拟机跑的LIW-OAM,这个会有影响吗?kaist.ymal完整内容如下: common: lidar_topic: "/velodyne_points" imu_topic: "/imu/data_raw" wheel_topic: "/velocity" point_filter_num: 4 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: 2 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR, N_SCANS: 16 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: 2 fov_degree: 180 det_range: 100.0

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

extrinsic_parameter: extrinsic_enable: false # true: enable the online estimation of IMU-LiDAR extrinsic, extrinsic_t: [ 0.58743, -0.02924, -0.175676276933] extrinsic_R: [ -0.515105,-0.702383,-0.491249, 0.487008,-0.711468,0.506593, -0.70533,0.0217062,0.708547] extrinsic_t_odom: [ 0.0, 0.0, 0.0] extrinsic_R_odom: [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ]

odometry_options: voxel_size: 0.5 # 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 method_system_init: STATIC_INIT # LIO system initialization [MOTION_INIT, STATIC_INIT] init_num_frames: 20 robust_registration: false 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: CONTINUOUS # The profile of the motion compensation (NONE, CONSTANT_VELOCITY, ITERATIVE, CONTINUOUS) initialization: INIT_IMU # [INIT_CONSTANT_VELOCITY, INIT_IMU]

icp_options: size_voxel_map: 1.0 # The voxel size of in the voxel map num_iters_icp: 15 # 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 point_to_plane_with_distortion: true distance: CT_POINT_TO_PLANE # Options: [CT_POINT_TO_PLANE, POINT_TO_PLANE] num_closest_neighbors: 1 beta_location_consistency: 1.0 beta_orientation_consistency: 1.0 beta_constant_velocity: 1.0 # Trajectory Regularisation Weight to constrain the optimization beta_wheel_velocity: 1.0 beta_small_velocity: 0.00 solver: LIW # The type of SOLVER used in [LIW, LIDAR] 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)

loss_function: HUBER # Options: [CAUCHY, STANDARD, HUBER, TOLERANT, TRUNCATED]
ls_max_num_iters: 5 # The number of steps performed by ceres for each iteration of the ICP
ls_num_threads: 16 # The number of threads to build and solve the least square system
ls_sigma: 0.5
ls_tolerant_min_threshold: 0.05

你可以重新下载一下源码试试?kaist.yaml中雷达话题一直是"/velodyne_points",我有试过用这个开源代码以及百度云的数据集进行测试可以顺利跑通,KAIST数据集和NCLT数据集都有对应的launch文件。 下载完并且catkin_make后,按照如下运行,不需要更改任何参数: sourcr devel/setup.bash roslaunch liw_oam liw_kaist.launch

dxdydz3dt commented 1 year ago

wait more IMU measurements ... after solution: rotation_begin: -9.73081e-05 -0.000211981 0.000881334 1 translation_begin: -0.0734581 -0.00635731 0.00406961 rotation_end: -0.000106102 -1.43692e-05 0.000348781 1 translation_end: -0.0141395 0.00173416 -0.00510425 per_scan_time: 1.22268s. I am facing same I used kaist.ymal files and its still on same position from long time. I am using kaist-1.bag downlaoded form your gdrive