Rotational drift when trying to drive in a straight line

I would look into this, specifically wpilib’s chassisspeeds.discretize(). I can give you help with implementation too if you need.