Using sim_scene.save() doesn't fix it either as it only saves agent & scene info, but not the map itself.
Edit: It is possible to use sim_scene.get_obs(get_map=False) though. So the behavior described might be intentional. In that case the question might be if this user error could be detected by saving that no map is available anymore.
throws "No such file or directory: ..." if map support is enabled.
The reason is that the
scene_name
is changed in finalize: https://github.com/nvr-avg/trajdata/blob/55dd41525023b307393edf30979aed6babc93a13/src/trajdata/simulation/sim_scene.py#L184and then the path to the map is not correct: https://github.com/nvr-avg/trajdata/blob/24251636bc708bd20e91a538b68095300a3199c8/src/trajdata/caching/df_cache.py#L509
Using
sim_scene.save()
doesn't fix it either as it only saves agent & scene info, but not the map itself.Edit: It is possible to use
sim_scene.get_obs(get_map=False)
though. So the behavior described might be intentional. In that case the question might be if this user error could be detected by saving that no map is available anymore.