Calibrating MPU6050

Hey guys,

I have an MPU6050 gyro sensor that I'm trying to use to return the orientation of my robot at any given time. I found this thread online, and ran the program that is at the bottom of the first post. The program runs and delivers offsets for me to put in my program. However, when I plug in these offsets, the values returned by the gyro are still not even close to zero. I tried changing the orientation of my sensor, but to no avail. Does anyone know of a fix for this problem (or an alternate solution to using an MPU6050?) Thanks in advance for everyone's help!

The gyro wont tell you the orientaion. The accelerometer data is a better choice.