Reputation: 39
In Carla simulator I can make some traffic using generate_traffic.py But I want to make some cars or pedestrians ignoring traffic lights. In this case what code should I change?
Upvotes: 0
Views: 596
Reputation: 11
If you are using any class derived from BasicAgent (PythonAPI\carla\agents\navigation\basic_agent.py)
to control the generated actors, then you can pass ignore_traffic_lights = True
to opt_dict
constructor parameter.
Also, you can alter the following function of BasicAgent
in order to customize the actors affected by traffic lights.
def _affected_by_traffic_light(self, lights_list=None, max_distance=None):
Upvotes: 1