CCNYRoboticsLab / imu_tools

ROS tools for IMU devices
Other
902 stars 428 forks source link

In which unit does the complementary/madgwick filter need the acc-data for proper working? #206

Open ChrisWoll opened 2 weeks ago

ChrisWoll commented 2 weeks ago

I think it's not 100 % clear in which unit the algorithm needs the acc date:

In the Complementary Filter paper, it says normalized, aswell in the comment in the header-file for the update() method. But if I look in the implementation, for example the checkstate() or getAdaptiveGain() function, it compares the magnitude of acc with the gravity, which would be completly nonsense if the input is a normalized acc-vector. And then I ve seen in a YouTube Video that it wants in mg.

mintar commented 2 weeks ago

The authoritative answer is in the comments of the sensor_msgs/Imu message:

Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec

In general, all messages in ROS should be in SI units.