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

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

Closed
allenzhuyi opened this issue Feb 16, 2024 · 10 comments
Assignees
Milestone

Comments

@allenzhuyi
Copy link

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

@namdre namdre added question a:netconvert OpenDRIVE Import & export of OpenDRIVE networks labels Feb 16, 2024
@namdre
Copy link
Contributor

namdre commented Feb 16, 2024

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?

@allenzhuyi
Copy link
Author

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

@namdre
Copy link
Contributor

namdre commented Feb 16, 2024

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

@allenzhuyi
Copy link
Author

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.

@namdre
Copy link
Contributor

namdre commented Feb 16, 2024

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

@allenzhuyi
Copy link
Author

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

@namdre namdre added enhancement and removed question OpenDRIVE Import & export of OpenDRIVE networks labels Feb 20, 2024
@namdre
Copy link
Contributor

namdre commented Feb 20, 2024

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 namdre self-assigned this Feb 20, 2024
@namdre namdre closed this as completed in 01819d1 Feb 21, 2024
namdre added a commit that referenced this issue Feb 21, 2024
namdre added a commit that referenced this issue Feb 21, 2024
namdre added a commit that referenced this issue Feb 21, 2024
namdre added a commit that referenced this issue Feb 21, 2024
namdre added a commit that referenced this issue Feb 21, 2024
@namdre
Copy link
Contributor

namdre commented Feb 21, 2024

@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)

@allenzhuyi
Copy link
Author

@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.

@namdre
Copy link
Contributor

namdre commented Feb 23, 2024

yes

@namdre namdre added this to the 1.20.0 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants