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? #157

Open
greymfm opened this issue Dec 11, 2024 · 0 comments
Open

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

greymfm opened this issue Dec 11, 2024 · 0 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 IMU message generation code, I don't see any earth gravity constant (1g = 9.8 m/s²) in the acceleration computation:

imu_msg.linear_acceleration.x = imu_data.acc_x;

Instead, this should probably look like this (according to ROS specifications)? :-)
imu_msg.linear_acceleration.x = imu_data.acc_x * 9.8
imu_msg.linear_acceleration.y = imu_data.acc_y * 9.8
imu_msg.linear_acceleration.z = imu_data.acc_z * 9.8;

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

1 participant