nuscenes_data = NuScenes(version='v1.0-trainval', dataroot=DATA_ROOT, verbose=True)
for _, scene in enumerate(nuscenes_data.scene):
first_sample_token = scene['first_sample_token']
last_sample_token = scene['last_sample_token']
sample_token = first_sample_token
while sample_token != last_sample_token:
sample = nuscenes_data.get('sample', sample_token)
sample_lidar_token = sample['data']['LIDAR_TOP']
lidar_file_path, box_list, ___ = nuscenes_data.get_sample_data(sample_lidar_token)
lidar_pointcloud = LidarPointCloud.from_file(lidar_file_path)
sample_token = nuscenes_data.get("sample", sample_token)["next"]
- Point cloud of LIDAR is default load at lidar’s frame
- use
get_sample_data
func load boxes at lidar’s frame too
Here is there render in ROS RVIZ, and you can see some bboex direction is not correct.