OpenMarine
ICM-20948 IMU library? - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: MacArthur HAT (https://forum.openmarine.net/forumdisplay.php?fid=29)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=30)
+--- Thread: ICM-20948 IMU library? (/showthread.php?tid=6259)



ICM-20948 IMU library? - mmcintosh - 2025-06-05

I have a MacArthur Hat attached to a Pi5 and it is working I have both the IMU and the Power regulator attached. I wanted to output the IMU data via python to do some other work with the IMU data. In doing so I found a few different libraries available but in my testing I get the IMU data but the z axis of the magnetometer only outputs a 0 or 1. So my question is do I have a defective module or are the libraries I have used in my python program faulty. What library did pypilot use adn is there a way I can output directly the data from the IMU to a log file?

TIA


RE: ICM-20948 IMU library? - Sailoog - 2025-06-08

This library is already instalaed in openplotter and here you will find some python examples
https://github.com/seandepagnier/RTIMULib2/tree/master/Linux/python


RE: ICM-20948 IMU library? - mmcintosh - 2025-06-09

(2025-06-08, 10:32 AM)Sailoog Wrote: This library is already instalaed in openplotter and here you will find some python  examples
https://github.com/seandepagnier/RTIMULib2/tree/master/Linux/python


Thanks that was so helpful and I was able to finally able get data. I have had some issues getting it to calibrate but I am still on a better path. I see that in this model that it is using --> "RTIMULib also supports multiple sensor integration fusion filters such as RTQF and Kalman filters."  Are you actually doing any sensor fusion?? If so what kind and do you have any examples of that? I am interested in extended kalman filter (EKF) fusion for gps and imu to gain greater accuracy in a fashion similar to what is being done in ROS (Robot operating system). Once again thank you for your quick response and assistance.