This seems like a lot.
Either the IMU is moving while being calibrated, or it has some internal fault.
Check the IMU using the dashboard. Open the dashboard, there’s no need to run your program. Make sure the robot/imu is stationary and gently touch the calibrate button in the dashboard. After a couple of seconds, the imu will finish calibration and the roll, pitch and heading values will adjust to show the absolute orientation of the imu. Check the heading value remains stable with only a few tenths of a degree drift per minute. Check that the values for the gyro are close to 0. Rotate the robot/imu, check the heading changes accordingly, see if there is any significant drift after doing this. Let us know the results.
