Please, also check that the wheels are installed correctly and that all four wheels are touching the ground surface equally all the time.
This post has picture of the correct wheel installation and a link to the sample code: Mecanum Wheels Code Problems - #2 by weilin