enable flake8 E231: missing whitespace after comma

old-commit-hash: efd5dffb1e727c70065fdbe7499ec9e009dfd282
This commit is contained in:
Adeeb Shihadeh
2020-05-31 12:37:52 -07:00
parent b30f62293e
commit be0b43f339
60 changed files with 228 additions and 228 deletions
+4 -4
View File
@@ -30,15 +30,15 @@ DEBUG = os.getenv("DEBUG") is not None
def is_calibration_valid(vp):
return vp[0] > VP_VALIDITY_CORNERS[0,0] and vp[0] < VP_VALIDITY_CORNERS[1,0] and \
vp[1] > VP_VALIDITY_CORNERS[0,1] and vp[1] < VP_VALIDITY_CORNERS[1,1]
return vp[0] > VP_VALIDITY_CORNERS[0, 0] and vp[0] < VP_VALIDITY_CORNERS[1, 0] and \
vp[1] > VP_VALIDITY_CORNERS[0, 1] and vp[1] < VP_VALIDITY_CORNERS[1, 1]
def sanity_clip(vp):
if np.isnan(vp).any():
vp = VP_INIT
return np.array([np.clip(vp[0], VP_VALIDITY_CORNERS[0,0] - 5, VP_VALIDITY_CORNERS[1,0] + 5),
np.clip(vp[1], VP_VALIDITY_CORNERS[0,1] - 5, VP_VALIDITY_CORNERS[1,1] + 5)])
return np.array([np.clip(vp[0], VP_VALIDITY_CORNERS[0, 0] - 5, VP_VALIDITY_CORNERS[1, 0] + 5),
np.clip(vp[1], VP_VALIDITY_CORNERS[0, 1] - 5, VP_VALIDITY_CORNERS[1, 1] + 5)])
def intrinsics_from_vp(vp):
+1 -1
View File
@@ -93,7 +93,7 @@ class Localizer():
vel_device = device_from_ecef.dot(vel_ecef)
device_from_ecef_eul = euler_from_quat(predicted_state[States.ECEF_ORIENTATION]).T
idxs = list(range(States.ECEF_ORIENTATION_ERR.start, States.ECEF_ORIENTATION_ERR.stop)) + list(range(States.ECEF_VELOCITY_ERR.start, States.ECEF_VELOCITY_ERR.stop))
condensed_cov = predicted_cov[idxs][:,idxs]
condensed_cov = predicted_cov[idxs][:, idxs]
HH = H(*list(np.concatenate([device_from_ecef_eul, vel_ecef])))
vel_device_cov = HH.dot(condensed_cov).dot(HH.T)
vel_device_std = np.sqrt(np.diagonal(vel_device_cov))
+1 -1
View File
@@ -80,7 +80,7 @@ class LiveKalman():
omega = state[States.ANGULAR_VELOCITY, :]
vroll, vpitch, vyaw = omega
roll_bias, pitch_bias, yaw_bias = state[States.GYRO_BIAS, :]
odo_scale = state[States.ODO_SCALE, :][0,:]
odo_scale = state[States.ODO_SCALE, :][0, :]
acceleration = state[States.ACCELERATION, :]
imu_angles = state[States.IMU_OFFSET, :]
+3 -3
View File
@@ -176,7 +176,7 @@ class LocKalman():
state_dot[13, 0] = cd
state_dot[14, 0] = ca
#state_dot[States.CLOCK_BIAS, 0][0,0] = cd
state_dot[States.CLOCK_DRIFT, 0][0,0] = ca
state_dot[States.CLOCK_DRIFT, 0][0, 0] = ca
# Basic descretization, 1st order intergrator
# Can be pretty bad if dt is big
@@ -201,8 +201,8 @@ class LocKalman():
state_err_dot[States.ECEF_VELOCITY_ERR, :] = quat_err_matrix * quat_rot * (acceleration + acceleration_err)
#state_err_dot[States.CLOCK_BIAS_ERR, :][0,:] = cd_err
#state_err_dot[States.CLOCK_DRIFT_ERR, :][0,:] = ca_err
state_err_dot[12, :][0,:] = cd_err
state_err_dot[13, :][0,:] = ca_err
state_err_dot[12, :][0, :] = cd_err
state_err_dot[13, :][0, :] = ca_err
f_err_sym = state_err + dt * state_err_dot
# convenient indexing
+1 -1
View File
@@ -717,7 +717,7 @@ class UBlox:
self.dev = PandaSerial(self.panda, 1, self.baudrate)
self.baudrate = 460800
print("upping baud:",self.baudrate)
print("upping baud:", self.baudrate)
self.send_nmea("$PUBX,41,1,0007,0003,%u,0" % self.baudrate)
time.sleep(0.1)
+3 -3
View File
@@ -21,7 +21,7 @@ print_dB = os.getenv("PRINT_DB") is not None # print antenna dB
timeout = 1
dyn_model = 4 # auto model
baudrate = 460800
ports = ["/dev/ttyACM0","/dev/ttyACM1"]
ports = ["/dev/ttyACM0", "/dev/ttyACM1"]
rate = 100 # send new data every 100ms
# which SV IDs we have seen and when we got iono
@@ -135,7 +135,7 @@ def gen_solution(msg):
msg_data['hour'],
msg_data['min'],
msg_data['sec']) -
datetime.datetime(1970,1,1)).total_seconds())*1e+03 +
datetime.datetime(1970, 1, 1)).total_seconds())*1e+03 +
msg_data['nano']*1e-06)
gps_fix = {'bearing': msg_data['headMot']*1e-05, # heading of motion in degrees
'altitude': msg_data['height']*1e-03, # altitude above ellipsoid
@@ -281,7 +281,7 @@ def main():
global gpsLocationExternal, ubloxGnss
nav_frame_buffer = {}
nav_frame_buffer[0] = {}
for i in range(1,33):
for i in range(1, 33):
nav_frame_buffer[0][i] = {}