Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Direction of all vehicle

edges = traci.vehicle.getRoute(vehID)
index = traci.vehicle.getRouteIndex(vehID)
nextEdge = edges[index + 1]
laneID = traci.vehicle.getLane(vehID)
links = traci.lane.getLinks(laneID)
each object in links has a direction, find the one where laneID.startswith(nextEdge) is True


Am Mo., 27. Feb. 2023 um 11:19 Uhr schrieb Sona S <ms.sona.12@xxxxxxxxx>:
Hi,
How to get the direction of the vehicle in SUMO? For example,at the intersection there are four directions in total and vehicles can travel in three directions. So how to get the direction which vehicle is going straight, right and left?

Thanks in advance.

Regards,
Sona
 
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top