Hi Zahid,
I tried both mega and DUE for this project on 4wd/mecanum settings.DUE may have the interrupts needed (8 for 4 x wheel encoders) but prob is the DUE is a 3.3v controller card and most sensors on market are 5v logic. So DUE is not an option unless you get all sensors with 3.3v or use logic level converters (makes wiring messy). If you use Mega on 4wd its really a waste of effort because there is no enough interrupt pins to drive 4 wheel encoders. A teensy 4.0 also is the same issue as the DUE , that is 3.3v i/o pin logic. So without access to the teensy 3.x platform you can use the mega to drive 4 wheels but really only in "skid-steer" config. I mean the actual config settings will be for 2wd setup with rear wheels using the motor +/- from the front wheels which has the encoders connected. With mecanum wheels you will get full rotation on the Z axis but will not be able to diagonal move the robot.
Trying to get Mega/Due setup in 4wd config is going to cause lost sync problems either with DUE 3.3v logic or the Mega's inability to handle interrupts needed for all four wheels.
If you going for 2wd robot then the mega should work fine without any sync issues.
The best bet for this wonderful design from the author/creator would be to use teensy 3.1/3.2 as it appears tried and tested by many on this group. It has the required interrupt pins for 4wd and 5v TTL logic to service the sensors recommended in the parts list.
It makes me now realise why Arduino DUE and Teensy 4 are not as popular as their predecessors even though they boast all that power - the sensor market has not yet fully embraced the 3.3v logic power requirements as yet !!