blender-driving-scenario-creator icon indicating copy to clipboard operation
blender-driving-scenario-creator copied to clipboard

Import of OpenDRIVE files

Open kargarisaac opened this issue 2 years ago • 6 comments

Hi,

Thank you for the great software. I wonder if it is possible to import pre-existing opendrive maps and then edit them or define a scenario on that?

Thank you

kargarisaac avatar Dec 15 '21 12:12 kargarisaac

@kargarisaac Thanks for the interest. In theory it is possible to write an importer. Currently this is on my agenda with a very low priority though because it will be a lot of work and there are so many other things I want to try frst. It will also require a lot of refactoring/rewriting work since I did not optimize the architecture for the import use-case so far. So maybe I will work on this in the future.

johschmitz avatar Jan 03 '22 12:01 johschmitz

Thanks for @johschmitz work! I want to know how to import opendrive map, Maybe I can do some work for it. I need this feature.

fangchaooo avatar May 25 '22 06:05 fangchaooo

@fangchaooo thanks for the interest. If you want we could have a video call to do some brainstorming on this. You should be able to find my email address in my profile.

johschmitz avatar May 25 '22 07:05 johschmitz

@fangchaooo I thought about this again and my idea would be that the first thing to be implemented would be an xodr_reader class/method for the scenariogeneration library. Currently I think there is only an xosc_reader implemented. I would then use this reader as the basis. I would not try to implement the low level reading in the add-on code but rather contribute to the library and then use it in here.

johschmitz avatar May 26 '22 11:05 johschmitz

Any progress on this issue? This would be a really great feature!

ClemensLinnhoff avatar May 17 '23 11:05 ClemensLinnhoff

@ClemensLinnhoff there's some news in #27 but I guess that is not really what you want. I assume you would like to import and then modify. This is a really much more difficult problem to solve since you have to support all kinds of OpenDRIVE files. However, my code assumes only one way and then the export becomes more or less straightforward but the import will then only work some special cases. You could compare this to the problem of importing and editing a PDF file which is notoriously difficult. For example if the imported file contains a road with a "mixed" geometry (line, arc, clothoid) that will currently not work at all since there is no "internal" logic to map this to, since I am currently not using this feature. In my opinion this whole issue arises since it never has been an official goal of the OpenDRIVE format (standardization) to close this round-trip write-read-edit-write kind of loop. So it was just not designed with simplifying that use-case easy in mind. So essentially without one or more full-time developers or at least one more hobby developer focusing only on this topic, I don't see this happening anytime soon. This is except maybe for an experimental implementation working for some simple cases which will annoy people more than make them happy when error messages with unsupported features pop up all the time or they have gaps in the road. Also when looking at some very expensive commercial tools you will see that even there it doesn't work perfectly all the time, due to above mentioned legacy of the standard. I hope that this situation will be improved in OpenDRIVE 2.0 if it ever happens.

johschmitz avatar May 17 '23 15:05 johschmitz