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

IMU messages (sensor_msgs/Imu Message) using incorrect units? #423

Closed
greymfm opened this issue Dec 11, 2024 · 2 comments
Closed

IMU messages (sensor_msgs/Imu Message) using incorrect units? #423

greymfm opened this issue Dec 11, 2024 · 2 comments

Comments

@greymfm
Copy link

greymfm commented Dec 11, 2024

According to ROS docs, the IMU messages should use m/s² units (and not g's) for acceleration etc.:

http://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/Imu.html

In the 'fake_imu' code, I don't see any earth gravity constant (1g = 9.8 m/s²) in the acceleration computation:

imu->linear_acceleration.x = accel.x_;

Maybe 'mcl_3dl' is using wrong units in the expected IMU messages (e.g. IMU callbacks)? :-)

void cbImu(const sensor_msgs::Imu::ConstPtr& msg)

Simulating ROS IMU messages should probably look something like this (according to ROS specifications)? :-)
imu->linear_acceleration.x = accel.x_ * 9.8;
imu->linear_acceleration.y = accel.y_ * 9.8;
imu->linear_acceleration.z = accel.z_ * 9.8;

@at-wat
Copy link
Owner

at-wat commented Dec 11, 2024

mcl_3dl node only uses vector direction of the linear acceleration, so absolute length of the vector doesn't matter.

@greymfm greymfm closed this as completed Dec 11, 2024
@greymfm
Copy link
Author

greymfm commented Dec 11, 2024

Thanks for clarification!

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