I have a list of attributes for an object. I will like to loop over the list and apply them to that object.
Here is what I did:
attrs = ['ClearNoon',
'ClearSunset',
'CloudyNoon',
'CloudySunset',
'HardRainNoon',
'HardRainSunset',
'MidRainSunset',
'MidRainyNoon',
'SoftRainNoon',
'SoftRainSunset',
'WetCloudyNoon',
'WetCloudySunset',
'WetNoon',
'WetSunset']
for attr in attrs:
world.set_weather(carla.WeatherParameters.attr)
Unfortunately, this does not work. Any better suggestions please?