def pcd_to_bin(pcd_path, outdir=None):
    pcd = o3d.io.read_point_cloud(pcd_path, format='pcd')
    pcd_arr = np.asarray(pcd.points)
    if (len(pcd_arr) == 0):
        return None
    outpath = join((Path(pcd_path).parent if (outdir is None) else outdir), (splitext(basename(pcd_path))[0] + '.bin'))
    pcd_arr.tofile(outpath)
    return outpath
def pcd_to_bin(pcd_path, outdir=None):
    pcd = o3d.io.read_point_cloud(pcd_path, format='pcd')
    pcd_arr = np.asarray(pcd.points)
    if (len(pcd_arr) == 0):
        return None
    outpath = join((Path(pcd_path).parent if (outdir is None) else outdir), (splitext(basename(pcd_path))[0] + '.bin'))
    pcd_arr.tofile(outpath)
    return outpath