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

Function find_weather_presets

PythonAPI/examples/automatic_control.py:70–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68# ==============================================================================
69
70def find_weather_presets():
71 rgx = re.compile('.+?(?:(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|$)')
72 name = lambda x: ' '.join(m.group(0) for m in rgx.finditer(x))
73 presets = [x for x in dir(carla.WeatherParameters) if re.match('[A-Z].+', x)]
74 return [(getattr(carla.WeatherParameters, x), name(x)) for x in presets]
75
76
77def get_actor_display_name(actor, truncate=250):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected