Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degrees/sec to Rad/sec #80

Closed
ManChrys opened this issue Sep 7, 2023 · 2 comments
Closed

Degrees/sec to Rad/sec #80

ManChrys opened this issue Sep 7, 2023 · 2 comments

Comments

@ManChrys
Copy link

ManChrys commented Sep 7, 2023

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
Copy link
Collaborator

zfc-zfc commented Sep 8, 2023

Correct.

@ManChrys
Copy link
Author

ManChrys commented Sep 8, 2023

Thank you my friend.

@ManChrys ManChrys closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants