diff --git a/donkeycar/parts/imu.py b/donkeycar/parts/imu.py index 2f4d6fae1..cfdf6022c 100755 --- a/donkeycar/parts/imu.py +++ b/donkeycar/parts/imu.py @@ -144,7 +144,7 @@ def __init__(self): def calibrate(self): logger.info('Calibrating Mpu6050 ...') - num_loops = 400 + num_loops = 800 gyro = np.zeros(3) accel = np.zeros(3) accel_norm = 0 @@ -153,7 +153,7 @@ def calibrate(self): # tmp = self.mpu.gyro # tmp = self.mpu.acceleration tic = time.time() - for _ in range(2 * num_loops): + for _ in range(num_loops): gyro += self.mpu.gyro accel += self.mpu.acceleration accel_norm += np.linalg.norm(self.mpu.acceleration)