hku-mars / LiDAR_IMU_Init

[IROS2022] Robust Real-time LiDAR-inertial Initialization Method.
GNU General Public License v2.0
803 stars 138 forks source link

Degrees/sec to Rad/sec #80

Closed ManChrys closed 10 months ago

ManChrys commented 10 months ago

hello if i want to convert degrees to rad/s should i add these lines here? its the correct place? should i convert the velocities before pushing the message to the buffer right ? i saw issue #43, but i would like this clarification .

//IMU Time Compensation
msg->header.stamp = ros::Time().fromSec(msg->header.stamp.toSec() - timediff_imu_wrt_lidar - time_lag_IMU_wtr_lidar);
double timestamp = msg->header.stamp.toSec();

if (timestamp < last_timestamp_imu) {
    ROS_WARN("IMU loop back, clear IMU buffer.");
    imu_buffer.clear();
    Init_LI->IMU_buffer_clear();
}

last_timestamp_imu = timestamp;

msg->angular_velocity.x /= (180/PI_M);
msg->angular_velocity.y /= (180/PI_M);
msg->angular_velocity.z /= (180/PI_M);

imu_buffer.push_back(msg);

Thanks in advance.
zfc-zfc commented 10 months ago

Correct.

ManChrys commented 10 months ago

Thank you my friend.