Skip to content
Snippets Groups Projects
Commit 99c57b08 authored by Jiandong Chen's avatar Jiandong Chen
Browse files

add some skip conditions

parent 48ab05c2
No related branches found
No related tags found
No related merge requests found
......@@ -113,9 +113,9 @@ def is_datafolder_valid(folder: Path):
res &= util.is_folder_contain_folders(folder.joinpath("omni"), OMNI_FOLDER)
if res is False:
print(f'Folder "{folder}" is NOT valid')
print(f'Folder "{folder}" is NOT valid! Skip!')
else:
print(f'Folder "{folder}" PASSED')
print(f'Folder "{folder}" PASSED!')
return res
......@@ -127,6 +127,10 @@ def process_images(
frame_id: str,
compress_fmt=None,
):
if not data_path.exists():
print(f"Path: {data_path} NOT exist! Skip")
return
# read the images path and sort based on file name
images = util.get_sorted_file_list(data_path)
......@@ -170,6 +174,10 @@ def process_pointcloud(
topic: str,
frame_id: str,
):
if not data_path.exists():
print(f"Path: {data_path} NOT exist! Skip")
return
pt_files = util.get_sorted_file_list(data_path)
with rosbag.Bag(rosbag_path, check_bag_mode(rosbag_path)) as bag:
......@@ -347,6 +355,10 @@ def process_omni(data_folder: Path, rosbag_path: Path):
def txt_preprocess(path: Path):
if not path.exists():
print(f"Path: {path} NOT exist! Skip")
return []
with open(path, "r") as f:
data = f.readlines()
data = [l.strip().split("\t") for l in data]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment