lin ki
lin ki

Reputation: 39

Making some traffic hazard in Carla simulator

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

Answers (1)

Rafael00
Rafael00

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

Related Questions