OpenSimulationInterface / open-simulation-interface

A generic interface for the environmental perception of automated driving functions in virtual scenarios.
Other
269 stars 126 forks source link

Missing offset for geo reference projection #478

Open tbleher opened 3 years ago

tbleher commented 3 years ago

The OSI GroundTruth provides a field proj_string to describe a mapping between the coordinates used in OSI and global world coordinates. My understanding is that ideally one would copy the projection string directly from OpenDRIVE to OSI. However, OpenDRIVE provides not just a geoReference but also an offset field.

OSI currently does not have an offset field. To support an OpenDRIVE file which has a defined offset, there are two workarounds currently:

Suggestion: add an additional x and y offset with the same semantics as in OpenDRIVE. This will make it trivial to copy the projection from OpenDRIVE to OSI. This should not affect backward compatibility, since the offset will be zero by default, which is the existing behaviour. Alternatively, the offset should be deprecated in OpenDRIVE.

TimFrickeBMW commented 3 years ago

The offset in OpenDRIVE is nothing else than a false northing / false easting, which can also be described within the PROJ-string (OpenDRIVE geoReference / OSI proj_string), usually by x_0 and y_0 . This means that the same thing can be defined twice. I would rather remove this redundancy in OpenDRIVE than add it to OSI.

tbleher commented 3 years ago

@TimFrickeBMW Thanks for the explanation! I agree that removing this from OpenDRIVE makes more sense. I have created https://code.asam.net/simulation/standard/opendrive/-/issues/71 for this - hopefully this can be deprecated for OpenDRIVE 1.7 (alternatively 1.8).

adrianschultz commented 3 years ago

In OpenDRIVE, the offset is used to not run into problems with floating point accuracy (most decimal places / best accuracy around 0) and to not have to manipulate the proj string. "If you want to apply an offset, use the element instead of changing all parameter values." (See: https://releases.asam.net/OpenDRIVE/1.6.0/ASAM_OpenDRIVE_BS_V1-6-0.html#_georeferencing_in_opendrive)

tbleher commented 3 years ago

@adrianschultz I was in the OpenDRIVE standardization group when the line quoted above was added, and now (after further discussion) believe that this was a mistake. I think the offset should be deprecated in OpenDRIVE. I will try to do that for OpenDRIVE 1.7 or 1.8 (as mentioned above). So this ticket was a mistake - please do not add anything here to OSI (I explicitly closed this, since the request was misguided).