if not osp.isdir(pointcloud_dir):
os.mkdir(pointcloud_dir)
for scene_token in scene_tokens:
scene = nusc.get("scene", scene_token)
out_path = osp.join(pointcloud_dir, "%s.obj" % scene["name"])
if not osp.exists(out_path):
export_scene_pointcloud(nusc.explorer, out_path, scene["token"], channel="LIDAR_TOP")
After Change
args = parser.parse_args()
out_dir = args.out_dir
scene_name = args.scene
verbose = bool(args.verbose)
// Create output folder
if not out_dir == "" and not osp.isdir(out_dir):
os.makedirs(out_dir)