Search code examples
sumo

Get lateral and longitudinal position of vehicles


I need to get relative lateral coordinates (distance to the vehicle from one side of the lane i.e Px) of vehicles.

enter image description here

I know that SUMO provides absolute x,y coordinates and distance traveled (Py).

Is there a way to get Px information at each timestep directly like Py?


Solution

  • This information is part of the raw dump (or netstate dump, see https://sumo.dlr.de/wiki/Simulation/Output/RawDump) but only if the sublane model is active. It is given as an absolute deviation from the center line of the line (which is always 0 if the sublane model is not active).