Thank you very much Jacob for the quick response.

Regards,
Sona

On Mon, Feb 27, 2023 at 4:59 PM Jakob Erdmann <[email protected]> wrote:

> 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 <[email protected]>:
>
>> 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
>> [email protected]
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to