Skip to content

Commit

Permalink
Only print lin accel if valid
Browse files Browse the repository at this point in the history
  • Loading branch information
DocGarbanzo committed Oct 19, 2024
1 parent 75536c4 commit 32db48f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions donkeycar/parts/imu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 32db48f

Please sign in to comment.