I am trying to get next traffic light that a vehicle will encounter during it's journey. For this we used getNextTLS
from vehicle domain. The output does not show all the traffic lights on the way rather shows the same traffic light details repeatedly. Even when I run it for many simulation steps it doesn't print all (even though in GUI it clearly passes through them)
http://www.sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-getNextTLS
while step < 1000:
traci.simulationStep()
#for id in t1.getIDList():
a=t1.getNextTLS(vehID= "202")
print("STEP:",step,"TLS:",a)
step += 1
traci.close(False)
Note: t1 is vehicledomain