|  |  | @ -9,15 +9,16 @@ import cv2  # pylint: disable=import-error | 
			
		
	
		
		
			
				
					
					|  |  |  | import numpy as np |  |  |  | import numpy as np | 
			
		
	
		
		
			
				
					
					|  |  |  | import pygame  # pylint: disable=import-error |  |  |  | import pygame  # pylint: disable=import-error | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import cereal.messaging as messaging | 
			
		
	
		
		
			
				
					
					|  |  |  | from common.basedir import BASEDIR |  |  |  | from common.basedir import BASEDIR | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.config import UIParams as UP |  |  |  | from selfdrive.config import UIParams as UP | 
			
		
	
		
		
			
				
					
					|  |  |  | import cereal.messaging as messaging |  |  |  | from tools.replay.lib.ui_helpers import (_BB_TO_FULL_FRAME, _FULL_FRAME_SIZE, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | from tools.replay.lib.ui_helpers import (_BB_TO_FULL_FRAME, _FULL_FRAME_SIZE, _INTRINSICS, |  |  |  |                                          _INTRINSICS, BLACK, GREEN, RED, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                          BLACK,  GREEN, YELLOW, RED, |  |  |  |                                          YELLOW, Calibration, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                          get_blank_lid_overlay, init_plots, |  |  |  |                                          get_blank_lid_overlay, init_plots, | 
			
		
	
		
		
			
				
					
					|  |  |  |                                          maybe_update_radar_points, plot_model, |  |  |  |                                          maybe_update_radar_points, plot_lead, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                          pygame_modules_have_loaded, |  |  |  |                                          plot_model, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                          Calibration) |  |  |  |                                          pygame_modules_have_loaded) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | os.environ['BASEDIR'] = BASEDIR |  |  |  | os.environ['BASEDIR'] = BASEDIR | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -157,10 +158,12 @@ def ui_thread(addr, frame_address): | 
			
		
	
		
		
			
				
					
					|  |  |  |     plot_arr[-1, name_to_arr_idx['a_target']] = sm['longitudinalPlan'].aTarget |  |  |  |     plot_arr[-1, name_to_arr_idx['a_target']] = sm['longitudinalPlan'].aTarget | 
			
		
	
		
		
			
				
					
					|  |  |  |     plot_arr[-1, name_to_arr_idx['accel_override']] = sm['carControl'].cruiseControl.accelOverride |  |  |  |     plot_arr[-1, name_to_arr_idx['accel_override']] = sm['carControl'].cruiseControl.accelOverride | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     # ***** model **** |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     if sm.rcv_frame['modelV2']: |  |  |  |     if sm.rcv_frame['modelV2']: | 
			
		
	
		
		
			
				
					
					|  |  |  |       plot_model(sm['modelV2'], img, calibration, top_down) |  |  |  |       plot_model(sm['modelV2'], img, calibration, top_down) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if sm.rcv_frame['radarState']: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       plot_lead(sm['radarState'], top_down) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     # draw all radar points |  |  |  |     # draw all radar points | 
			
		
	
		
		
			
				
					
					|  |  |  |     maybe_update_radar_points(sm['liveTracks'], top_down[1]) |  |  |  |     maybe_update_radar_points(sm['liveTracks'], top_down[1]) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |