def from_file(file_name: str): scan = np.fromfile(file_name, dtype=np.float32) points = scan.reshape((-1, 5)) xyzr = points[:, :LidarPointCloud.nbr_dims()] ring = points[:, 4] xyzr[:, 3] = ring return LidarPointCloud(xyzr.T)
def get_number_of_lidar_pc_dimensions() -> int: """ Returns the number of dimensions of the nuScenes lidar point cloud data. The number of dimensions of the lidar point cloud is equal to the number of lidar sensor channels. """ return LidarPointCloud.nbr_dims()