I am working on adding intersections to my scenarios and writing them to .xml files. However, when I tried to open the file after I had written it, this error message occurred:
left_of = int(left_of_ref.get('ref')) ValueError: invalid literal for int() with base 10: '{50195}'
{50195} is a lanelet_id in my scenario.
The problem seems to originate in the file_reader (IntersectionFactory or IntersectionIncomingFactory, where the conversion to int cant be performed. This is what the xml file looks like, after I added the intersection and saved it:
Then I looked into file_writer: is there a reason why in IntersectionXMLNode the function create_node handles left_of differently than all other successors?
What can I do to write the isLeftOf parameter into my xml file as an int/str and not a set?
We will update the commonroad-io documentation for the next release to clarify the meaning of left_of. Currently, the meaning of left_of is only documented in the scenario documentation.