Drive straight with IMU but not distance

There doesn’t appear to be a drive exampple that uses the IMU to keep the robot driving straight without also giving a distance. Is there a function I am missing that will do this, or is it something we will need to create ourselves?

The simple answer is: Write your own. Just use imu.getYaw(), do little math and gain and you are off to the races.