eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.57k stars 1.44k forks source link

Add netconvert support for OpenDrive attribute lateralProfile #12826

Open Domsall opened 1 year ago

Domsall commented 1 year ago

When I convert an OpenDrive into a SUMO-net, all lanes of an edge have the same height values, although the OpenDrive may define different elevation values for each lane (as example see https://service.mdm-portal.de/mdm-portal-application/publDetail.do?publicationId=2594000).

Does an option already exist to add lane dependent elevation values to the SUMO net? Can SUMO work with this or do these values need to be the same?

SUMO-version: github-version

namdre commented 1 year ago

sumo permits custom lane shapes. It might even work already with the elevation data if you set option --opendrive.lane-shapes

Domsall commented 1 year ago

The option --opendrive.lane-shapes unfortunately does not change the z-output.

namdre commented 1 year ago

The elevationProfile is a child element of the road so there is nothing lane-specific. Is your question referring to the interpretation of lateralProfile and superelevation ?

Domsall commented 1 year ago

I took another look into the standard and lateralProfile is the parent of superelevation, shape and crossfall (see https://service.mdm-portal.de/mdm-portal-application/downloadRefFile.do?pubId=2594000&id=2055000).

So yes, this lateralProfile would need to be added to the converter.

namdre commented 1 year ago

Would that really be useful though? I imagine that a road with "stepped" lanes isn't really helpful w.r.t visualization and simulation. Wouldn't you rather have some way to to retrieve something like the lateral slope at some point of a lane?

Domsall commented 1 year ago

Well, my problem arises from the synchronization between SUMO and a 3D-simulator (Carla, Unreal Engine, VTD), where the elevation values differ depending on the lane. In my example with 3 lanes on the Autobahn: The left lane may have a height value of 150m., while the right lane has a height value of 150.30m. I am actually seeing weird vehicle physics and am trying to find the reason. I think that these "jumping" vehicles are coming from inaccurate z-values. I will give you feedback after changing the height map, which I am currently doing via the height map from the OpenDrive in Unreal Engine.

Domsall commented 1 year ago

After simulating with the new detailed height map, the vehicle physics look a lot better.

How can I help going forward? If you convert the map A9Nord with your preferred OpenDrive-options, I could for example correct the height map with my Unreal-map so you have something to compare against.

namdre commented 1 year ago

I'm still not sure I understand the requirement. What is supposed to happe when a vehicle changes between lanes with different elevations? Is it going to "drop down" a step?

Domsall commented 1 year ago

With continuous lane changes or sublane changes, I would expect the vehicle to smoothly change the elevation. What I am seeing in the 3D world, if the values are not correct:

For example: image

namdre commented 1 year ago

Understood. Can you check whether it's enough to handle superelevation or do we need crossfall as well?

Domsall commented 1 year ago

The A9Nord-map only uses superelevation. Nevertheless, shape and crossfall can exist in another map.