Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sumo to Lanelet2 Conversion Issue #17

Open
RichardXIA001 opened this issue Apr 28, 2024 · 6 comments
Open

Sumo to Lanelet2 Conversion Issue #17

RichardXIA001 opened this issue Apr 28, 2024 · 6 comments

Comments

@RichardXIA001
Copy link

Hi,
Our objective is to convert a SUMO map to Lanelet2 map, usually it will need to go through a process of sumo->opendrive->commonroad->lanelet2 map. However, after utilizing your pipeline, we noticed that the lane width in the resulting lanelet2 map is narrower than expected.

In an attempt to address this, we experimented with removing all longitude and latitude information from the original SUMO map. While this did improve the lane width in the final lanelet2 map, it led to inaccuracies in the overall scaling of the map. For instance, the radius of roundabouts in the lanelet2 map appeared significantly larger compared to the original SUMO map. Upon inspection, the lane width in the OpenDrive map appears to be correct.

We suspect that the issue may be related to the projection parameters, particularly because our required map is based in Michigan, USA. Despite our efforts to adjust the projection parameters to "NAD83" or set the UTM zone code to 17, the resulting map remains inaccurate. Now we don't know how to address this issue, and we are looking forward to your suggestion.

Many thanks for your help.

@smaierhofer
Copy link
Contributor

Can you share the code which you use to convert from OpenDRIVE to Lanelet2, i.e., the part where you set the projections?

@RichardXIA001
Copy link
Author

Thank you for your prompt response. Here are the codes we're using to convert the map from OpenDRIVE to Lanelet2:

from crdesigner.common.config.general_config import general_config
from crdesigner.common.config.lanelet2_config import lanelet2_config
from crdesigner.common.config.opendrive_config import open_drive_config

# define configs
opendrive_config = open_drive_config

# for Plymouth, MI
# opendrive_config.proj_string_odr = "+proj=utm +zone=17 +ellps=WGS84"
lanelet2_config = lanelet2_config

general_config = general_config

# conversion
opendrive_to_lanelet(
    input_file=input_path,
    output_file=str(output_path),
    odr_config=opendrive_config,
    general_config=general_config,
    lanelet2_config=lanelet2_config,
)

I've experimented with adjusting the opendrive_config, lanelet2_config, and odr_config separately, but none of these attempts proved successful. Since I need to convert a map in Michigan, US, could you please provide some advice on how to adapt the projections properly?

Thank you for your assistance.

@smaierhofer
Copy link
Contributor

Can you send me the OpenDRIVE map then I could debug it?
It might be that the lanelet2 conversion currently only supports projections within Europe.

@RichardXIA001
Copy link
Author

Sure, and here is the OpenDrive map:
plymouth_standard.zip

Using the opendrive_to_lanelet function directly yields a lanelet2 map that is narrower than expected. Despite expecting a width of 3.2 meters, it measures only 2.3 meters. We used the measurement plugin in JOSM to check lane width, and it looks like this:
img_v3_02ae_4ff5a64e-a1aa-42a8-bc71-4ac42d3c7f2h

@smaierhofer
Copy link
Contributor

I have looked at the problem but do not yet know a solution, as the applied projections should be correct.
Lanelet2 must be defined in ETRF89 (see here). Therefore, it is hard-corded in our conversion as target projection. As source projection EPSG:3857 is used which should also be correct in this case. The width in the CommonRoad map looks correct. Therefore, the cause for the conversion issue is somewhere in the CommonRoad to lanelet2 conversion.

@RichardXIA001
Copy link
Author

Thanks for your reply! We will look into the CommonRoad to Lanelet2 conversion process more thoroughly. If we make any progress, we'll be sure to let your know.

Once again, we really appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants