0

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?

lin ki
  • 39
  • 4

1 Answers1

1

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):
Rafael00
  • 11
  • 1