sumo icon indicating copy to clipboard operation
sumo copied to clipboard

Store relation between split edge and original OpenDRIVE road & lane section in SUMO network

Open allenzhuyi opened this issue 1 year ago • 8 comments

Can sumo dynamic change landwidth when importing opendrive file? I have an opendrive file. I use the follwing netconvert command:

netconvert --opendrive-files nbgj-computable.xodr -o nbgj-computable1.net.xml  --junctions.endpoint-shape --opendrive.curve-resolution 0.01 --opendrive.lane-shapes --ignore-errors

after converting, some lane is too narrow,because sumo use narrow lane width from the begin section. I want to lane width to fit dynamic lane with in opendrive lanesection. Is is possible?

SUMO-version: 1.20.0

operating system: windows 10

allenzhuyi avatar Aug 07 '24 09:08 allenzhuyi

The network model of SUMO does not allow changing lane widths inside the same edge. That's why the OpenDrive import tries to discretise lane widths given in OpenDRIVE as a formula by dividing them into multiple edges.

You may try different values for the option --opendrive.min-width (see docs) to see if this helps in your case. But in general lane widths can only change in SUMO between edges but not inside.

m-kro avatar Aug 07 '24 10:08 m-kro

After importing OpenDRIVE use opendrive.min-width option, SUMO dynamically adds some internal junctions and internal edges to handle changes in lane numbers or widths. This results in a mismatch with the original number of lane sections in OpenDRIVE. How can I correspond these internally added junctions or edges with the original OpenDRIVE lane sections? Can this be done through numbering? I want to record the mapping relationship between the sequence numbers of the original OpenDRIVE lane sections and the SUMO edge IDs.

allenzhuyi avatar Aug 07 '24 15:08 allenzhuyi

They should be numbered using the OpenDRIVE s coordinate value (see doc).

m-kro avatar Aug 08 '24 10:08 m-kro

But When I use the following commamnd "netconvert --opendrive-files nbgj-computable.xodr -o nbgj-computable1.net.xml --junctions.endpoint-shape --opendrive.curve-resolution 0.01 --opendrive.lane-shapesn --opendrive.min-width 2.5 --ignore-errors" sumo use roadId#number to name the edgeId. For example, there is a Road 37163 in opendrive file,it has 2 lane sections. But in netxml file, the sencond lane section is turned to -37163#1,-37163#2,-37163#3. I can't distinguish which edge id is generated by sumo due to lane width change.

allenzhuyi avatar Aug 09 '24 07:08 allenzhuyi

Please add --opendrive.position-ids true to the netconvert call.

m-kro avatar Aug 09 '24 08:08 m-kro

But I alsgo want to add a opendrive lanesect index data to sumo edge,like userdata in opendrive. For example, there is a Road 37163 in opendrive file,it has 2 lane sections, the Second LaneSection is splited into 3 edges in sumo. edge ids are naming -37163.101.40,-37163.114.89,-37163.125.99. I want to add a lansect index in id, like -37163_1.101.40,-37163_1.114.89,-37163_1.125.99, I can extract landsect index in bussiness processing. Is is possbile?

allenzhuyi avatar Aug 12 '24 01:08 allenzhuyi

Currently this is not implemented, but does not seem difficult to do. I'll convert this ticket to an enhancement proposal.

m-kro avatar Aug 13 '24 13:08 m-kro

Note, that you can set option --output.original-names. In this case, each lane will record the road and section ID as a <param> element which can be read via traci, and sumolib.

namdre avatar Aug 27 '24 12:08 namdre