How to use the data in sweeps

I noticed that we only assigned a token to the sample data, so I would like to ask how to access the data in sweets?

Hi. It’s a bit confusing, but
sample_data = samples + sweeps
So the tokens can be used for both.
Sample_data’s have a field is_key_frame to indicate if it’s a sample or sweep.

Hi. I am using the nuscenes dataset for the first time. I tried doing as suggested for the mini version (v1.0-mini). I did the following:

sample_token = scene['first_sample_token']
while sample_token != '':
    my_sample = nusc.get('sample', sample_token)
    data = nusc.get('sample_data', my_sample['data']['CAMERA_FRONT'])
    print(data)
    sample_token = my_sample["next"]

The print statement prints the details about the sample. It is observed that 'is_key_frame' : True for all the printed details. Also, the filename does not contain any sample from the sweeps directory. Should this mean that all the samples that are being returned after calling next are from samples directory, i.e. labeled samples? If this is the case, I am unsure if I am making some mistake in calling next or if I should use another approach to fetch the unlabeled images (or other sensor data).
My objective is to fetch the raw sensor inputs for each scene, perform object detection (or tracking) and then evaluate at the timesteps only when the labeled samples are available (not the interpolated gt boxes). Do you have some suggestions on how to implement this?


EDIT:

I modified the above code as follows and it looks like I am getting the data from samples and sweeps directory now.

sample_token = scene['first_sample_token']
sample = nusc.get('sample', sample_token)
token = sample['data'][sensor]
while token != '':
    data = nusc.get('sample_data', token)
    print(data)
    token = data["next"]

I think that earlier it was iterating over the labeled samples only because the next was being called from the sample table and not sample_data table. According to the documentation, sample table has annotated snapshots only while sample table has all the data from a particular sample.