Skip to content

Commit

Permalink
calibrationd: remove unused arg in function (commaai#24004)
Browse files Browse the repository at this point in the history
  • Loading branch information
herman5 authored Mar 22, 2022
1 parent 03ac5bb commit 604fefa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions selfdrive/locationd/calibrationd.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def update_status(self):
self.cal_status = Calibration.INVALID

# If spread is too high, assume mounting was changed and reset to last block.
# Make the transition smooth. Abrupt transitions are not good foor feedback loop through supercombo model.
# Make the transition smooth. Abrupt transitions are not good for feedback loop through supercombo model.
if max(self.calib_spread) > MAX_ALLOWED_SPREAD and self.cal_status == Calibration.CALIBRATED:
self.reset(self.rpys[self.block_idx - 1], valid_blocks=INPUTS_NEEDED, smooth_from=self.rpy)

Expand All @@ -146,7 +146,7 @@ def get_smooth_rpy(self):
else:
return self.rpy

def handle_cam_odom(self, trans, rot, trans_std, rot_std):
def handle_cam_odom(self, trans, rot, trans_std):
self.old_rpy_weight = min(0.0, self.old_rpy_weight - 1/SMOOTH_CYCLES)

straight_and_fast = ((self.v_ego > MIN_SPEED_FILTER) and (trans[0] > MIN_SPEED_FILTER) and (abs(rot[2]) < MAX_YAW_RATE_FILTER))
Expand Down Expand Up @@ -213,8 +213,7 @@ def calibrationd_thread(sm=None, pm=None) -> NoReturn:
calibrator.handle_v_ego(sm['carState'].vEgo)
new_rpy = calibrator.handle_cam_odom(sm['cameraOdometry'].trans,
sm['cameraOdometry'].rot,
sm['cameraOdometry'].transStd,
sm['cameraOdometry'].rotStd)
sm['cameraOdometry'].transStd)

if DEBUG and new_rpy is not None:
print('got new rpy', new_rpy)
Expand Down

0 comments on commit 604fefa

Please sign in to comment.