Closed yuant95 closed 2 years ago
@yuant95 I am not sure how I missed this. We cannot be clear on why this might be a problem. In theory, commonroad should be able to convert the maps to OpenDRIVE and then to Lanelet2.
It looks like the converter met the same incoming road id multiple times. I am unsure quite exactly why this would be the case but it might be that we included junctions and they split in a way that can have duplicate ids. That is what might be suggested here:
-> self._mark_object_id_as_used(inc.incoming_id)
--> raise ValueError("ID %s is already used." % object_id)
The conversion to get rid of the internal junctions links would be:
1) netedit smarts/scenarios/intersection/1_to_1lane_left_turn_c/map.net.xml
2) Processing -> Options -> Junctions -> [x] no-internal-links (check)
3) Processing -> Compute Junctions with volitile options
4) Save
A warning you posted mentions that the map has shifted coordinates:
Warning: Could not write OpenDRIVE geoReference. Only unshifted Coordinate systems are supported (offset=-630882.85,-4856133.12)
I believe this refers to netOffset
as seen here: https://sumo.dlr.de/docs/Networks/SUMO_Road_Networks.html#coordinates_and_alignment. It should be possible to open up the sumo *.net.xml
and set "netOffset"
back to (0,0)
. Generally, you would use netconvert
to fix it properly.
...
<net ...>
<location netOffset="0.00,0.00" .../>
...
</net>
I hope this helps.
@yuant95 To follow up it is possible to use neconvert
to change no-internal-links
using --no-internal-links
as noted here: https://sumo.dlr.de/docs/netconvert.html#junctions
@Gamenot Thanks for getting back to me! To clarify, I should first use neconvert
to convert the SUMO map to get rid of the internal junctions links, and then feed the new map to the CommonRoad Scenario Designer to convert the SUMO map to other format?
@Gamenot Thanks for getting back to me! To clarify, I should first use
neconvert
to convert the SUMO map to get rid of the internal junctions links, and then feed the new map to the CommonRoad Scenario Designer to convert the SUMO map to other format?
@yuant95 Sorry for the late reply on this. My intention was as you stated.
High Level Description I'm trying to convert the map in the scenarios from SUMO Tto CommonRoad and then to Lanelet2 so I can use this map to generate more training data.
Desired SMARTS version 0.6.1
Operating System Ubuntu 20.04
Problems I'm using this converter https://gitlab.lrz.de/tum-cps/commonroad-scenario-designer to do the conversion. However, other than the
smarts/scenarios/straight/3lane_cruise_single_agent/map.net.xml
can be converted successfully, all other maps such assmarts/scenarios/intersection/1_to_1lane_left_turn_c/map.net.xml
etc failled. The exception raised was as below.I'm not too familar with the map format. Is there some formatting issue in the other maps that may cause this problem? Any help is appreciated!