Skip to content

Commit

Permalink
merge duplicated implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nachovizzo committed Dec 22, 2023
1 parent 417c3b0 commit cb7a3a5
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 330 deletions.
4 changes: 3 additions & 1 deletion src/lidar_visualizer/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def available_dataloaders() -> List:
import pkgutil

pkgpath = os.path.dirname(__file__)
return [name for _, name, _ in pkgutil.iter_modules([pkgpath])]
dataloaders = [name for _, name, _ in pkgutil.iter_modules([pkgpath])]
dataloaders.remove("point_cloud2")
return dataloaders


def jumpable_dataloaders():
Expand Down
2 changes: 1 addition & 1 deletion src/lidar_visualizer/datasets/mcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, data_dir: str, topic: str, *_, **__):
print("mcap plugins not installed: 'pip install mcap-ros2-support'")
exit(1)

from lidar_visualizer.tools.point_cloud2 import read_point_cloud
from lidar_visualizer.datasets.point_cloud2 import read_point_cloud

# we expect `data_dir` param to be a path to the .mcap file, so rename for clarity
assert os.path.isfile(data_dir), "mcap dataloader expects an existing MCAP file"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lidar_visualizer/datasets/rosbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, data_dir: Sequence[Path], topic: str, *_, **__):
print('rosbags library not installed, run "pip install -U rosbags"')
sys.exit(1)

from lidar_visualizer.tools.point_cloud2 import read_point_cloud
from lidar_visualizer.datasets.point_cloud2 import read_point_cloud

self.read_point_cloud = read_point_cloud

Expand Down
2 changes: 1 addition & 1 deletion src/lidar_visualizer/lidar_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
jumpable_dataloaders,
supported_file_extensions,
)
from lidar_visualizer.tools.visualizer import Visualizer
from lidar_visualizer.visualizer import Visualizer


def version_callback(value: bool):
Expand Down
326 changes: 0 additions & 326 deletions src/lidar_visualizer/tools/visualizer.py

This file was deleted.

Loading

0 comments on commit cb7a3a5

Please sign in to comment.