-
Notifications
You must be signed in to change notification settings - Fork 55
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
Showing
10 changed files
with
680 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,7 +146,7 @@ git_stats | |
|
||
3rdParty | ||
|
||
__temp__ | ||
__temp__* | ||
|
||
.vscode | ||
# python | ||
|
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,23 @@ | ||
import os | ||
from omegaconf import OmegaConf | ||
def get_config(name="default"): | ||
path = [] | ||
if os.path.isabs(name): | ||
path.append(os.path.dirname(name)) | ||
else: | ||
path.append(os.path.dirname(__file__)) | ||
path.append(os.getcwd()) | ||
path.append(os.path.join(os.path.expanduser("~"), ".config", "rocos")) | ||
for p in path: | ||
try: | ||
cfg = OmegaConf.load(os.path.join(p, name + ".yaml")) | ||
break | ||
except FileNotFoundError: | ||
cfg = None | ||
if cfg is None: | ||
raise FileNotFoundError(f"Config file {name}.yaml not found in {path}") | ||
return cfg | ||
|
||
if __name__ == "__main__": | ||
cfg = get_config("default") | ||
print(cfg) |
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,23 @@ | ||
ssl: | ||
addr: | ||
local: 127.0.0.1 | ||
ref: 224.5.23.1 | ||
vision: 224.5.23.2 | ||
zss: 233.233.233.233 | ||
port: | ||
# ssl | ||
vision: 10005 | ||
ref: 10003 | ||
# grSim | ||
sim_cmd: 20011 | ||
sim_status: [30011, 30012] | ||
sim_control: 10300 | ||
sim_blue_control: 10301 | ||
sim_yellow_control: 10302 | ||
# rocos : Core <> Client | ||
cmd: [50011, 50012] | ||
status: [60001, 60002] | ||
fusion_vision: [23333, 23334] | ||
fusion_vision_py: [41001, 41002] | ||
debug_msg: [20001, 20002] | ||
debug_heapmap: [20003, 20004] |
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,17 +1,39 @@ | ||
import sys | ||
from torch.utils.data import DataLoader | ||
|
||
sys.path.append('../../..') | ||
from rocos.log.data.tracker_vision import TrackerVisionDataset | ||
|
||
def data_loader(args, path): | ||
dset = TrackerVisionDataset( | ||
path, | ||
obs_len=args.obs_len, | ||
pred_len=args.pred_len, | ||
skip=args.skip, | ||
delim=args.delim) | ||
skip=args.skip) | ||
|
||
loader = DataLoader( | ||
dset, | ||
batch_size=args.batch_size, | ||
shuffle=True, | ||
num_workers=args.loader_num_workers, | ||
collate_fn=seq_collate) | ||
return dset, loader | ||
num_workers=args.loader_num_workers) | ||
return dset, loader | ||
|
||
|
||
if __name__ == "__main__": | ||
import argparse | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--data_dir', type=str, default='__log__') | ||
parser.add_argument('--obs_len', type=int, default=8) | ||
parser.add_argument('--pred_len', type=int, default=12) | ||
parser.add_argument('--skip', type=int, default=5) | ||
parser.add_argument('--batch_size', type=int, default=32) | ||
parser.add_argument('--loader_num_workers', type=int, default=4) | ||
parser.add_argument('--delim', type=str, default=' ') | ||
args = parser.parse_args() | ||
|
||
dset, loader = data_loader(args, args.data_dir) | ||
for data in iter(loader): | ||
print(len(data)) | ||
for d in data: | ||
print(d.shape) | ||
break |
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 @@ | ||
from rocos.nn.unet1d import ConditionalUnet1D |
Empty file.
Oops, something went wrong.