sumo icon indicating copy to clipboard operation
sumo copied to clipboard

netconvert always align the entrance and exit roads of the intersection of the same side after conversion from opendrive

Open allenzhuyi opened this issue 1 year ago • 6 comments

I used netconvert to convert an OpenDrive file to a SUMO netxml road network file. However, in certain direction at an intersection,due to the different of start point and lengths of entrance road and reverse direction of the road in opendrive file, after conversion netconvert always align the edge and reverse direction of the edge in certain direction at an intersection, which will cause the actual edge length to be shortened. I tried using netedit tool,by selecting the junction,first use "Reset Ende Points",then I undo the operation,at last I use "set custom junction shape" adjust junction shape, but it is not applicable to multiple junctions. How do I netconvert automatically refer to the actual shape of each edge of the junction to construct an irregular junction shape, without having to align them in netedit? Is there any related netconvert convert arguments?

This is the default conversion effect of netconvert. The entrance and exit roads of the intersection on the same side are aligned, which does not meet the definition requirements of the actual opendrive file. netconvert_1

This is the result of manually adjusting the shape with the help of the netedit tool. I want to build a polygonal irregular intersection according to the edge shape of the actual intersection. netconvert_2

SUMO-version: 1.19

operating system: windows 10

allenzhuyi avatar Feb 16 '24 05:02 allenzhuyi

The OpenDrive import automatically sets the option --rectangular-lane-cut. You could set this to 'false' explicitly and see if it improves things. Can you provide an example OpenDrive file with an irregular junction shape?

namdre avatar Feb 16 '24 06:02 namdre

I have noticed that after converting from OpenDRIVE to a netxml file, when I first opened netedit in the default inspect mode,the shape and length of the edge at the junction is correct before setting the connection mode. However, once the connection mode is set, netedit displays a polygonal area of the junction, The entrance and exit roads of the intersection on the same side are aligned, which changes the original length of the edge. Is this a problem with netconvert? I have found that I can recover the default edge type using "Reset Ende Points","undo the operation" and "set custom junction shape".

This is the picture I first opened the netexml in netedit in default mode,the junction is not showed,the edge's shape and length is ok netconvert_3

This is the picture I first changed in connection mode, the edge's shape and length is changed by the junction netconvert_4

allenzhuyi avatar Feb 16 '24 08:02 allenzhuyi

This netconvert behavior is controlled by the option --rectangular-lane-cut. Do your import with netconvert --rectangular-lane-cut false --opendrive-files ...

namdre avatar Feb 16 '24 10:02 namdre

I use the following command netconvert --rectangular-lane-cut false --check-lane-foes.all --ignore-errors --opendrive.curve-resolution 0.01 --log ./convert.log --opendrive-files computable-v20240207.xodr -o calc.20240216.net.xml
and it still has the probem above.

allenzhuyi avatar Feb 16 '24 11:02 allenzhuyi

can you provide the input file (in a private message or direct attachment)?

namdre avatar Feb 16 '24 16:02 namdre

can you provide the input file (in a private message or direct attachment)?

I send an email to you and upload the test opendrive file.

I use the follwoing convert command: netconvert --rectangular-lane-cut false --check-lane-foes.all --ignore-errors --opendrive.curve-resolution 0.01 --log ./convert.log --opendrive-files test.xodr -o test.net.xml

allenzhuyi avatar Feb 17 '24 05:02 allenzhuyi

This isn't even OpenDRIVE specific and contrary to my previous assumption is unrelated to rectangular-lane-cut. The module which computes node shapes basically tries to find the intersection point of roads meeting at an angle to figure out the minimum size that prevents overlapping roads (and then increases this minimum size based on the 'radius' value. Roads that do not meet at an angle (running in parallel) are always grouped and receive a common cut-off point. This is often desirable since it leads to the shortest possible pedestrian crossings. However, I think an option is needed to allow more customization (especially when additional geometry information for the edges is know (custom endpoints), as is the case in OpenDrive import.

namdre avatar Feb 20 '24 15:02 namdre

@allenzhuyi beginning with tomorrow, the development version supports option --junctions.endpoint-shape which should have the desired effect (https://sumo.dlr.de/docs/Downloads.php#nightly_snapshots)

namdre avatar Feb 21 '24 06:02 namdre

@allenzhuyi beginning with tomorrow, the development version supports option --junctions.endpoint-shape which should have the desired effect (https://sumo.dlr.de/docs/Downloads.php#nightly_snapshots)

Is is available now,I want to try to test.

allenzhuyi avatar Feb 23 '24 08:02 allenzhuyi

yes

namdre avatar Feb 23 '24 09:02 namdre