motional / nuplan-devkit

The devkit of the nuPlan dataset.
https://www.nuplan.org
Other
674 stars 129 forks source link

Is there a way to use .json's from serialization_callback of the simulation to build a scenario? #198

Closed simmelpatrick closed 1 year ago

simmelpatrick commented 1 year ago

Hey there :)

Is there any known way on how to use the .json outputs from the serialization_callback during a simulation to reproduce a scenario with that? Or is there any other way on how to get features and targets etc. out of simulations for debugging?

Thanks in advance!

patk-motional commented 1 year ago

Hi @simmelpatrick,

We actually use the JSON files for our own internal debugging. However, you might find it difficult to generate training data from it, although not impossible.

If you want to save the features that were constructed during simulation, I would suggest that you pickle them as they're created in simulation. We do not have any built-in functionality for this

simmelpatrick commented 1 year ago

Hey @patk-motional

Is there any advice or hint on how to do so? Cuz currently I'm a little bit confused..

patk-motional commented 1 year ago

Can you be more specific about what you are confused by? If I understand you correctly, you want to extract out the features which are computed during simulation to debug.

If that is the case then you can:

  1. run the code in debug mode in an IDE such that you can inspect the features
  2. pickle the computed feature once it is constructed. For example, in the MLPlanner, the features are constructed here. You then can save it in a format that best suits your needs