Save original ID of ego vehicle when keep_ego=True

Hello,

when I convert the highD dataset to a commonroad scenario and i want to keep the ego vehicle, the id of the coresponding planning problem gets changed to a unique ID which is not assigned to any object in the scenario.

My problem is, that I want to keep the ego vehicle to have a reference path I can compare the RL agent’s path to. However, when the original ID gets changed I can not assign the planning problem ID to the dynamic obstacle (and therefore its path) it got derived from.

Does it have a special reason that a new ID is generated?
Is there any opportunity I can log the ego vehicles original ID in the commonroad xml file?
If not the only work around I see is creating a lookup table during the dataset conversion.

Thanks,
Annabel

Hi Annabel,

the reason is that the CommonRoad format requires unique IDs for all objects.

I think it is not possible to log the “original” ego vehicle ID without modifying the dataset-converter. However, in this case, you can also modify the code to create a lookup table which is probably easier.

Best,
Sebastian

Hi Sebastian,

thank you for the quick reply!
I was wondering if it would be possible to just add a large number e.g. 1000, to the original vehicles ID. This way it would be unique but in a traceable way. Or is there something against it?

Best,
Annabel

Unfortunately, the function to create the planning problem is also used by other dataset conversions. For other converters, adding a large number doesn’t guarantee that the ID will be unique.
Therefore, we cannot integrate this in our official version.

However, if you adapt the code locally it should work for the highD converter.

1 Like