Skip to content

Commit

Permalink
Merge pull request #12 from PRBonn/revert-11-gupta/helipr
Browse files Browse the repository at this point in the history
Revert "Check for lidar type after lowercase conversion of name"
  • Loading branch information
benemer authored Mar 28, 2024
2 parents 2e5e012 + b4a4d33 commit 08e1d6d
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.lower() == "avia":
if self.sequence_id == "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.lower() == "aeva":
elif self.sequence_id == "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.lower() == "ouster":
elif self.sequence_id == "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.lower() == "velodyne":
elif self.sequence_id == "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.lower() == "aeva" and int(Path(file_path).stem) <= 1691936557946849179:
if self.sequence_id == "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 08e1d6d

Please sign in to comment.