Closed klemense1 closed 5 years ago
In Carla challenge, town 1~6 are used and can be accessed publicly. All the maps are generated by a software called "RoadRunner", which generates maps with openDRIVE v1.4 standard. In addition, the map also annotates the driving direction in "userData". All of those maps cannot be imported directly into BARK, I'll try to look into the reasons later.
Error of importing all maps:
.../bark_project/modules/runtime/commons/xodr_parser.py", line 364, in create_cpp_lane_section previous_line = new_lane_section.get_lane_by_position(lane['id']-1).line AttributeError: 'NoneType' object has no attribute 'line'
Error of importing all town 3, 4, 5:
.../bark_project/modules/runtime/commons/xodr_parser.py", line 321, in create_cpp_lane new_lane.link = self.create_lane_link(lane["link"]) KeyError: 'link'
it is possible that there is a bug in xodr_parser.py. In order to narrow the error down, Can you load it with the open drive viewer (see http://www.opendrive.org/download.html)
Do you get the same error for all maps?
The maps can be loaded into the viewer without issue.
For the second error, unlike the maps we have, the <link>
tag is always under <lane>
inside <laneSection>
if the type is ["driving", "border", "sidewalk"]
, in Carla's map the link defination of lane is sometimes under <junction>
, I guess that is the reason, at the line if lane.find("link") is not None:
in function parse_lane
.
For the first error, the reason would be if str(lane.get("type")) not in ["driving", "border", "sidewalk"]: continue
in parse_lane
.
Take Town03.xodr Road 0
as example, only lane [3, 2, -1, -2]
belong to support lane type, after sorting it will be [-1, 2, -2, 3]
. With the call of get_lane_by_position(lane['id']-1)
to the function in lane_section.cpp
at step 2, LanePosition=1 and only -1 is added as a lane in the object, it returns null ptr.
I uploaded the maps as they are not on Carla's github https://github.com/bark-simulator/carla-interface/tree/testing/maps
only town 1 and 2 can be imported normally for now, the others show Segmentation Fault I guess the reason would be the sizes of others are too large, town 3~6 are ~2MB and town 1,2 are ~500KB
try out the scenario from the Carla Challenge (https://carlachallenge.org/challenge/nhtsa/) to import the XODR file in BARK and see if it looks similar to Carla
--> is it really according to the standard?