tum-gis/rtron

OpenDRIVE Version

shariquetaj opened this issue · 3 comments

How to change the input version of opendrive to any specific version available.
Also, is it possible to output a corrected odr-file in the same version as input along with or instead of 1.7?
If not, what changes should have to be done to fulfill these requirements.

The OpenDRIVE version of the input datasets is automatically identified by an inspection of the header element. Can you elaborate on your question?

Concerning the version of the output dataset: rtron reads the input dataset and maps it onto an internal implementation of OpenDRIVE (following the current version 1.7.0). Based on this, the rules are evaluated with minor fixing procedures. Then, it is mapped back to the JAXB generated data structures and written out.
That means, if you need another version, the respective mapping needs to be implemented. You can find the mapping to the JAXB generated classes of version 1.7.0 here. The mappings are semi-automatically derived using the library MapStruct.
The benefit of this approach is that the reading/writing and the mapping are type safe making it more robust and easier to maintain.

Is it possible to validate opendrive files in versions other than 1.4?

Yes, sure. The schema validation works for all 1.x versions. The mapping to the internal OpenDRIVE implementation is currently implemented for 1.4 and 1.6. Those mappers are used as fallback for the other versions.
Then, the rules on of specification are evaluated on the internal OpenDRIVE implementation (works quite well for me right now).
For more details, I’d like to refer you to this article: https://isprs-annals.copernicus.org/articles/X-4-W2-2022/257/2022/