|  |  | @ -15,7 +15,8 @@ from selfdrive.locationd.kalman.helpers import ObservationKind, KalmanError | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.locationd.kalman.models.live_kf import LiveKalman, States |  |  |  | from selfdrive.locationd.kalman.models.live_kf import LiveKalman, States | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.swaglog import cloudlog |  |  |  | from selfdrive.swaglog import cloudlog | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | SENSOR_DECIMATION = 1  # No decimation |  |  |  | VISION_DECIMATION = 2 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | SENSOR_DECIMATION = 10 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class Localizer(): |  |  |  | class Localizer(): | 
			
		
	
	
		
		
			
				
					|  |  | @ -116,6 +117,9 @@ class Localizer(): | 
			
		
	
		
		
			
				
					
					|  |  |  |         self.update_kalman(current_time, ObservationKind.NO_ROT, [0, 0, 0]) |  |  |  |         self.update_kalman(current_time, ObservationKind.NO_ROT, [0, 0, 0]) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def handle_cam_odo(self, current_time, log): |  |  |  |   def handle_cam_odo(self, current_time, log): | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     self.cam_counter += 1 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if self.cam_counter % VISION_DECIMATION == 0: | 
			
		
	
		
		
			
				
					
					|  |  |  |       self.update_kalman(current_time, |  |  |  |       self.update_kalman(current_time, | 
			
		
	
		
		
			
				
					
					|  |  |  |                          ObservationKind.CAMERA_ODO_ROTATION, |  |  |  |                          ObservationKind.CAMERA_ODO_ROTATION, | 
			
		
	
		
		
			
				
					
					|  |  |  |                          np.concatenate([log.rot, log.rotStd])) |  |  |  |                          np.concatenate([log.rot, log.rotStd])) | 
			
		
	
	
		
		
			
				
					|  |  | @ -152,6 +156,7 @@ class Localizer(): | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.gyro_counter = 0 |  |  |  |     self.gyro_counter = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.acc_counter = 0 |  |  |  |     self.acc_counter = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.speed_counter = 0 |  |  |  |     self.speed_counter = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     self.cam_counter = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | def locationd_thread(sm, pm, disabled_logs=[]): |  |  |  | def locationd_thread(sm, pm, disabled_logs=[]): | 
			
		
	
	
		
		
			
				
					|  |  | 
 |