mirror of
https://github.com/HViktorTsoi/FAST_LIO_LOCALIZATION.git
synced 2023-05-28 12:51:38 +08:00
fix the time sync remind problem
This commit is contained in:
@@ -309,9 +309,9 @@ void livox_pcl_cbk(const livox_ros_driver::CustomMsg::ConstPtr &msg)
|
||||
}
|
||||
last_timestamp_lidar = msg->header.stamp.toSec();
|
||||
|
||||
if (!time_sync_en && abs(last_timestamp_imu - lidar_end_time) > 10.0)
|
||||
if (!time_sync_en && abs(last_timestamp_imu - last_timestamp_lidar) > 10.0 && !imu_buffer.empty() && !lidar_buffer.empty() )
|
||||
{
|
||||
printf("IMU and LiDAR not Synced, IMU time: %lf, lidar scan end time: %lf",last_timestamp_imu, lidar_end_time);
|
||||
printf("IMU and LiDAR not Synced, IMU time: %lf, lidar header time: %lf \n",last_timestamp_imu, last_timestamp_lidar);
|
||||
}
|
||||
|
||||
if (time_sync_en && !timediff_set_flg && abs(last_timestamp_lidar - last_timestamp_imu) > 1 && !imu_buffer.empty())
|
||||
|
||||
Reference in New Issue
Block a user