Error when loading file

Dear community,
when trying to simulate scenario “DEU_Frankfurt-196_4_I-1” or “DEU_Frankfurt-245_9_I-1”, I get the following error:

commonroad-interactive-scenarios/venv/lib/python3.8/site-packages/commonroad/scenario/scenario.py", line 1174, in _mark_object_id_as_used
** raise ValueError(“ID %s is already used.” % object_id)**
ValueError: ID 0 is already used.

Thank you and best regards,
Rudolf

Hello Rudolf,

Thanks for your message. I had a look into the scenario file. Indeed, the id="0" is used by multiple incomings; thus the error message is correct. As a quick-fix, you could just manually edit the incoming-ids. To this end, search the *.cr.xml file for id="0" (and likewise for id=1). You will have more than one match. Replace them with ids, which have not been used before. The intersection description should then look like this:

  <intersection id="1772">
    <incoming id="0">
      <incomingLanelet ref="234"/>
      <successorsRight ref="233"/>
      <successorsStraight ref="236"/>
    </incoming>
    <incoming id="1">
      <incomingLanelet ref="280"/>
      <incomingLanelet ref="283"/>
      <successorsStraight ref="286"/>
      <successorsStraight ref="287"/>
    </incoming>
  </intersection>
  <intersection id="1885">
    <incoming id="2">
      <incomingLanelet ref="282"/>
      <incomingLanelet ref="279"/>
      <successorsStraight ref="281"/>
      <successorsStraight ref="278"/>
    </incoming>
    <incoming id="3">
      <incomingLanelet ref="1282"/>
      <successorsLeft ref="1283"/>
    </incoming>
  </intersection>
  <intersection id="1777">
    <incoming id="4">
      <incomingLanelet ref="282"/>
      <incomingLanelet ref="279"/>
      <successorsStraight ref="281"/>
      <successorsStraight ref="278"/>
    </incoming>
    <incoming id="5">
      <incomingLanelet ref="285"/>
      <successorsStraight ref="284"/>
    </incoming>
  </intersection>

We’ll investigate, whether this is a systematic error and update the scenarios.

Best regards, Florian

1 Like