Error corections with omni wheels while coding

when your turning 90 degrees how do you correct for overturning or underturning with Omni wheels via coding

PID controller.
Search George Gillard PID
(btw your robot’s center of gravity may also be a problem.)