Is there a way to bind object to a particular geo position within the map imported from OSM?


I’m importing a map from OSM using carla.Osm2Odr. I need to spawn an actor in a certain geo position (lat, lon). The thing is that the exported xord map boundary is actually larger than the bounds I specified in OSM when I was exporting the data (this is probably the specific of a converter that does not “cut” the road where it intersects the area boundary).


  • Green - boundary used when exported data from OSM
  • Orange - boundary of xodr map after conversion
  • Blue line - road from OSM map
  • Blue circle - geo position from OSM where I would like to spawn an object

Initially my plan was to use lat and lon of (1) to evaluate the offset to lat and lon of (3) which would give me the x,y within the map. However the actual origin of xodr map (2) is not the same as (1) and it seems to be not predictable.

Is there a workaround for my issue?

Thank you,

Hi @Alexey_R, there are different issues in this question.
First, the fact that the orange boundary does not match the green boundary is due to the way the data is exported from OSM. It exports entire roads within the selected region even if they extend beyond that area, resulting in the extended bounds having nothing to do with the carla.Osm2Odr tool.
About the second issue, for the next release we are addressing the issue of projecting (lat, lon) coordinates to (x, y). You will be able to define the corresponding (lat, lon) of the origin of the map and the projection method which will hopefully sole your issue.

Hi @Axel! Thank you for your reply! Is my understanding correct that to have a proper projection I will still need to bind my map origin to the particular geo position?