Robot localization

Sorry if I am asking in the wrong section :frowning: .
Is it possible to localise a differential drive large 4 wheel slow moving rc car using imu (mpu -9250) and incremental encoders.
Has any one done it? My goal is to drive the robot autonomously using a local co ordinate frame.Is there any good example dead reckoning using these two sensors.
Searched the internet, only found some stuff in ros.Is there any way to get it done using arduino?

Lots of people have done that, but the localization is not very accurate because wheels slip, differently for every robot.

If properly calibrated, the magnetometer on the IMU will tell you direction of travel. The accelerometer and gyro are not very useful on a land vehicle.

David P. Anderson has provided some nice examples. Here is one.

Thank you for your valuable time. So, should i use magnetometer to keep the bot straight or the encoders or fuse them? And while turning ignore the encoder readings?

You will have to experiment to determine what works best with your robot. Let us know how it goes!

Indoors or outdoors?

Unfortunately the consumer-grade sensors are not accurate enough to use dead-reckoning. The error gets into the kilometer range in under a minute of driving.

Can you position a camera above the robot?