MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / __init__

Method __init__

PythonAPI/examples/manual_control.py:158–183  ·  view source on GitHub ↗
(self, carla_world, hud, args)

Source from the content-addressed store, hash-verified

156
157class World(object):
158 def __init__(self, carla_world, hud, args):
159 self.world = carla_world
160 self.actor_role_name = args.rolename
161 try:
162 self.map = self.world.get_map()
163 except RuntimeError as error:
164 print('RuntimeError: {}'.format(error))
165 print(' The server could not send the OpenDRIVE (.xodr) file:')
166 print(' Make sure it exists, has the same name of your town, and is correct.')
167 sys.exit(1)
168 self.hud = hud
169 self.player = None
170 self.collision_sensor = None
171 self.lane_invasion_sensor = None
172 self.gnss_sensor = None
173 self.imu_sensor = None
174 self.radar_sensor = None
175 self.camera_manager = None
176 self._weather_presets = find_weather_presets()
177 self._weather_index = 0
178 self._actor_filter = args.filter
179 self._gamma = args.gamma
180 self.restart()
181 self.world.on_tick(hud.on_world_tick)
182 self.recording_enabled = False
183 self.recording_start = 0
184
185 def restart(self):
186 self.player_max_speed = 1.589

Callers

nothing calls this directly

Calls 2

restartMethod · 0.95
find_weather_presetsFunction · 0.70

Tested by

no test coverage detected