-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09e6265
commit 7626149
Showing
11 changed files
with
150 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.0.1" | ||
__version__ = "0.0.0-alpha" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .ros import RosReader | ||
from .kitti import KittiWriter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
import tyro | ||
import sys | ||
sys.path.append("/home/eg/source/vbr-devkit/python") | ||
|
||
from pathlib import Path | ||
from typing import Union | ||
from dataclasses import dataclass | ||
from typing_extensions import Annotated | ||
from kitti import KittiWriter | ||
|
||
@dataclass | ||
class Args: | ||
input_dir: Path = "/" | ||
to = Union[ | ||
Annotated[KittiWriter, tyro.conf.subcommand(name="kitti")] | ||
] | ||
output_dir: Path = "/" | ||
from vbr_devkit.datasets import KittiWriter, RosReader | ||
import typer | ||
from enum import Enum | ||
from rich.progress import track | ||
|
||
def main(args: Args) -> None: | ||
... | ||
|
||
def entrypoint(): | ||
tyro.run(main) | ||
class OutputDataInterface(str, Enum): | ||
kitti = "kitti", | ||
# Can insert additional conversion formats | ||
|
||
if __name__ == "__main__": | ||
entrypoint() | ||
|
||
|
||
OutputDataInterface_lut = { | ||
OutputDataInterface.kitti: KittiWriter | ||
} | ||
|
||
def main(to: OutputDataInterface, input_dir: Path, output_dir: Path) -> None: | ||
with RosReader(input_dir) as reader: | ||
with OutputDataInterface_lut[to](output_dir) as writer: | ||
for timestamp, topic, message in track(reader, description="Processing..."): | ||
writer.publish(timestamp, topic, message) | ||
|
||
|
||
if __name__ == "__main__": | ||
typer.run(main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from rich.console import Console | ||
|
||
console = Console() |
Oops, something went wrong.