You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							22 lines
						
					
					
						
							724 B
						
					
					
				
			
		
		
	
	
							22 lines
						
					
					
						
							724 B
						
					
					
				| from openpilot.tools.sim.bridge.common import SimulatorBridge
 | |
| from openpilot.tools.sim.bridge.carla.carla_world import CarlaWorld
 | |
| 
 | |
| 
 | |
| class CarlaBridge(SimulatorBridge):
 | |
|   TICKS_PER_FRAME = 5
 | |
| 
 | |
|   def __init__(self, arguments):
 | |
|     super().__init__(arguments)
 | |
|     self.host = arguments.host
 | |
|     self.port = arguments.port
 | |
|     self.town = arguments.town
 | |
|     self.num_selected_spawn_point = arguments.num_selected_spawn_point
 | |
| 
 | |
|   def spawn_world(self):
 | |
|     import carla
 | |
| 
 | |
|     client = carla.Client(self.host, self.port)
 | |
|     client.set_timeout(5)
 | |
| 
 | |
|     return CarlaWorld(client, high_quality=self.high_quality, dual_camera=self.dual_camera,
 | |
|                       num_selected_spawn_point=self.num_selected_spawn_point, town=self.town) |