Skip to content

Commit

Permalink
Check for lidar after lowercase conversion of name (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh1002 authored Mar 26, 2024
1 parent 5f5bc16 commit 2e5e012
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lidar_visualizer/datasets/helipr.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, data_dir: Path, *_, **__):
raise ValueError(f"Supported formats are: {supported_file_extensions()}")

# Obtain the pointcloud reader for the given data folder
if self.sequence_id == "Avia":
if self.sequence_id.lower() == "avia":
self.fields = [
("x", np.float32),
("y", np.float32),
Expand All @@ -75,7 +75,7 @@ def __init__(self, data_dir: Path, *_, **__):
("offset_time", np.uint32),
]

elif self.sequence_id == "Aeva":
elif self.sequence_id.lower() == "aeva":
self.fields = [
("x", np.float32),
("y", np.float32),
Expand All @@ -87,7 +87,7 @@ def __init__(self, data_dir: Path, *_, **__):
("intensity", np.float32),
]

elif self.sequence_id == "Ouster":
elif self.sequence_id.lower() == "ouster":
self.fields = [
("x", np.float32),
("y", np.float32),
Expand All @@ -99,7 +99,7 @@ def __init__(self, data_dir: Path, *_, **__):
("ambient", np.uint16),
]

elif self.sequence_id == "Velodyne":
elif self.sequence_id.lower() == "velodyne":
self.fields = [
("x", np.float32),
("y", np.float32),
Expand Down Expand Up @@ -130,7 +130,7 @@ def read_point_cloud(self, idx: int):
dtype = np.dtype(self.fields)

# Special case, see https://github.com/minwoo0611/HeLiPR-File-Player/blob/e8d95e390454ece1415ae9deb51515f63730c10a/src/ROSThread.cpp#L632
if self.sequence_id == "Aeva" and int(Path(file_path).stem) <= 1691936557946849179:
if self.sequence_id.lower() == "aeva" and int(Path(file_path).stem) <= 1691936557946849179:
intensity_channel = None
dtype = np.dtype(
[(name, np_type) for name, np_type in self.fields if name != "intensity"]
Expand Down

0 comments on commit 2e5e012

Please sign in to comment.