Skip to content

Implementation of a Kalman filter for fusing accelerometer,Gyroscope and magnetometer data from IMU

License

Notifications You must be signed in to change notification settings

love481/sensor_fusion_IMU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sensor Fusion

This repo consists of the code for fusing acceleration, gyroscope and magnetometer data using simple publisher and subscriber in ROS. You can also visualize the raw and filtered data after performing required calibration and applying fusion algorithms.

Installation

Use following command to clone the repository.

git clone https://github.com/love481/sensor_fusion_IMU

Make sure you have ros installed along with needed packages to communicate with arduino. For more info, visit this page on how to communicate via ros_serial_package.

Usage

Use following .ino code in the arduino of the examples folder and then run the following command:

mkdir -p <your_project_name>/src

Now, go to the 'src' dir and copy 'filters_algorithms' folder over there. Go back to your <your_project_name> directory and run:

catkin_make

Don't forget to source the devel folder and run the following command to communicate with arduino.

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM1 _baud:=115200
rosrun filters_algorithms imu_node

For visualization run:

rosrun filters_algorithms visualization_imu_data.py

Plot

Red plot denotes yaw data from magnetometer before applying kalman filter and blue plot denotes filtered yaw data Screenshot from 2021-06-27 19-44-13

Magnetometer data before Calibration

before_cal

Magnetometer data after Calibration

after_cal

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Implementation of a Kalman filter for fusing accelerometer,Gyroscope and magnetometer data from IMU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published