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

Function find_weather_presets

PythonAPI/examples/manual_control.py:140–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139
140def find_weather_presets():
141 rgx = re.compile('.+?(?:(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|$)')
142 name = lambda x: ' '.join(m.group(0) for m in rgx.finditer(x))
143 presets = [x for x in dir(carla.WeatherParameters) if re.match('[A-Z].+', x)]
144 return [(getattr(carla.WeatherParameters, x), name(x)) for x in presets]
145
146
147def get_actor_display_name(actor, truncate=250):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected