Opendrive to Commonroad Error

I use pip install commonroad-scenario-designer to install, and use conda env python3.10.
When I use crdesigner map-convert-opendrive -i input-file.xodr -o output-file.xml , the following error occurs:

Traceback (most recent call last):
File “/home/usr/anaconda3/envs/cr7/bin/crdesigner”, line 8, in
sys.exit(main())
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/crdesigner/ui/cli/command_line.py”, line 111, in main
scenario = opendrive_to_commonroad(input_file)
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/crdesigner/map_conversion/map_conversion_interface.py”, line 103, in opendrive_to_commonroad
return road_network.export_commonroad_scenario(general_config, odr_config)
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/crdesigner/map_conversion/opendrive/opendrive_conversion/network.py”, line 413, in export_commonroad_scenario
transformer = Transformer.from_proj(crs_from, crs_to)
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/pyproj/transformer.py”, line 541, in from_proj
proj_from = Proj(proj_from)
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/pyproj/proj.py”, line 134, in init
super().init(TransformerFromPipeline(cstrencode(self.srs)))
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/pyproj/transformer.py”, line 337, in init
self._local.transformer = transformer_maker()
File “/home/usr/anaconda3/envs/cr7/lib/python3.10/site-packages/pyproj/transformer.py”, line 134, in call
return _Transformer.from_pipeline(self.proj_pipeline)
File “pyproj/_transformer.pyx”, line 632, in pyproj._transformer._Transformer.from_pipeline
pyproj.exceptions.ProjError: Invalid projection +proj=tmerc +lat_0=36.5098253 +lon_0=116.8043603 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +geoid_crs=WGS84 +vunits=m +no_defs.: (Internal Proj Error: proj_create: Error 1029 (File not found or invalid): vgridshift: could not find required grid(s).)

The problem is related to the projection string in the OpenDRIVE map. Can you send me the map via email (sebastian.maierhofer@tum.de)?

I have already sent you the Opendrive map, and I also tried 0.6.1, which was successful, but I don’t know the reason.

We now support also coordinate projections during the OpenDRIVE conversion. However, the projection string in your map contains +geoidgrids=egm96_15.gtx which is not supported by the projection library we use.

If you replace
+proj=tmerc +lat_0=37.35429341239328 +lon_0=-122.0859797650754 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs
with
+proj=tmerc +lat_0=37.35429341239328 +lon_0=-122.0859797650754 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +vunits=m +no_defs
in your OpenDRIVE map, this error shouldn’t appear anymore.
However, there will be another conversion error.

In the next release of the scenario designer, we will update the projection string automatically and also the other error will be fixed. In the meantime please use an older version of the scenario-designer (v0.7.0 could also work).

I did the same, and there may be errors in longitude and latitude conversion. And I didn’t find 0.7.0.

Version 0.7.0: pip install commonroad-scenario-designer==0.7.0

I figured it out, thanks for your help!

Had the same error, but switching to latest version (0.8.2) solved it. Thanks a lot to the CommonRoad team for this awesome conversion tool - the results are amazing!