I need to do odometry for a 4 mecanum wheeled robot for indoor applications. Is it possible to do it with just wheel encoders and IMU sensors? If possible, how? It will be of great help if someone shares any material. Thanks!
In order to transform encoder signals to robot motions a kinematic model of the robot is needed. In some cases this is very simple, just including the gear ratios and a heading angle (e.g. with Ackerman steering model). This is a simple kinematic model.
A more complex case is differential steering, where the encoder signals pass through a kinematic transformation in order to calculate the heading angle.
The differential drive kinematic model can be a good inspiration to the Mecanum kinematic model. The Mecanum wheel robot will include more encoders (at least 3), since it has more holomonic degrees of freedom. Furthermore, if you have 4 wheels and 4 encoder, care must be taken in the kinematics model, since you have one more sensor then degrees of freedom. You can use this to improve the accuracy of the model, but it will make things a bit more complex.
You take all encoder signals and feed them to a forward kinematic model, which gives you the Cartesian position change (if we consider tick change to be the encoder signal).
After you obtain the Cartesian position change (or other derived signal, like position or velocity) you can use this in any odometry, sensor fusion (with IMU) or SLAM algorithm (with optical sensors).
You can google "4 wheel mecanum kinematic model" and you can find examples on how to implement this.