l5kit.simulation.utils module

l5kit.simulation.utils.disable_agents(dataset: l5kit.data.zarr_dataset.ChunkedDataset, allowlist: numpy.ndarray) None

Disable all agents in dataset except for the ones in allowlist Assumptions: - the dataset has only 1 scene - the dataset is in numpy format and not zarr anymore

Parameters
  • dataset – the single-scene dataset

  • allowlist – 1D np array of track_ids to keep

l5kit.simulation.utils.get_frames_subset(dataset: l5kit.data.zarr_dataset.ChunkedDataset, frame_start_idx: int, frame_end_idx: int) l5kit.data.zarr_dataset.ChunkedDataset

Get a new dataset with frames between start (included) and end (excluded). Assumptions: - the dataset has only 1 scene - the dataset is in numpy format and not zarr anymore

Parameters
  • dataset – the single-scene dataset.

  • frame_start_idx – first frame to keep.

  • frame_end_idx – where to stop taking frames (excluded).

l5kit.simulation.utils.insert_agent(agent: numpy.ndarray, frame_idx: int, dataset: l5kit.data.zarr_dataset.ChunkedDataset) None

Insert an agent in one frame. Assumptions: - the dataset has only 1 scene - the dataset is in numpy format and not zarr anymore

Parameters
  • agent – the agent info to be inserted

  • frame_idx – the frame where we want to insert the agent

  • dataset – the single-scene dataset.