-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconversion.py
More file actions
executable file
·39 lines (33 loc) · 1.1 KB
/
conversion.py
File metadata and controls
executable file
·39 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
# =============================================================================
# Created on Wed Jun 07 2023 16:09:02
# Author: Mukai (Tom Notch) Yu
# Email: mukaiy@andrew.cmu.edu
# Affiliation: Carnegie Mellon University, Robotics Institute, the AirLab
#
# Copyright Ⓒ 2023 Mukai (Tom Notch) Yu
# =============================================================================
from utils.tools import *
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Conversion between rosbag, mp4, image directory, etc."
)
parser.add_argument(
"--config",
"-c",
type=str,
required=True,
default="./config/example/mp4_to_imgdir_rosbag.yaml",
help="path to config file",
)
args = parser.parse_args()
cfg = load_config(args.config)
trace_config(cfg)
pipelines = []
for pipeline_name in cfg["pipelines"]:
pipeline = Pipeline(pipeline_name, cfg[pipeline_name])
pipeline.start()
pipelines.append(pipeline)
for pipeline in pipelines:
pipeline.join()