For MPU 6050
- Setup your hardware ---> watch this
- Download the complementary filter for IMU
sudo apt-get install ros-noetic-imu-tools
-
Git clone the the package for IMU calibration
By sunfu-chou
-
Setup smBus
For the i2c communication between IMU and Raspberry pi
sudo apt-get install python3-smbus
- First usage
- When you launch the file, the program will ask you to rotate the imu.
- After the system tells you 'Saving calibration file... Success!', you can directly shutdown it.
roslaunch imu_driver imu_before.launch
-
After
After you successfully finished the launch file, you can only run the launch file below each time.
⚠️ Before it tells you 'Acceleration calibration complete! (bias = ...', you shouldn't move the IMU
roslaunch imu_driver imu.launch
- Open rviz
rviz
- Open the configure file in "rviz/imu_rviz.rviz"
- imu_readRaw.py read imu raw data and publish to topic "/raw"
- apply_calib subscribe the topic "/raw", calibrate the raw data and publish to topic "/imu/data_raw"
- madgwick filter subscribe the topic "/imu/data_raw" and publish the filtered data to "/imu/data"