|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
import os |
|
|
|
|
import time |
|
|
|
|
import threading |
|
|
|
|
import multiprocessing |
|
|
|
|
from tqdm import tqdm |
|
|
|
|
|
|
|
|
|
os.environ['FILEREADER_CACHE'] = '1' |
|
|
|
@ -9,7 +10,7 @@ os.environ['FILEREADER_CACHE'] = '1' |
|
|
|
|
from common.basedir import BASEDIR |
|
|
|
|
from common.realtime import config_realtime_process, Ratekeeper, DT_CTRL |
|
|
|
|
from selfdrive.boardd.boardd import can_capnp_to_can_list |
|
|
|
|
from tools.lib.logreader import LogReader |
|
|
|
|
from tools.plotjuggler.juggle import load_segment |
|
|
|
|
from panda import Panda |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
@ -94,11 +95,10 @@ if __name__ == "__main__": |
|
|
|
|
ROUTE = "77611a1fac303767/2020-03-24--09-50-38" |
|
|
|
|
REPLAY_SEGS = list(range(10, 16)) # route has 82 segments available |
|
|
|
|
CAN_MSGS = [] |
|
|
|
|
for i in tqdm(REPLAY_SEGS): |
|
|
|
|
log_url = f"https://commadataci.blob.core.windows.net/openpilotci/{ROUTE}/{i}/rlog.bz2" |
|
|
|
|
lr = LogReader(log_url) |
|
|
|
|
CAN_MSGS += [can_capnp_to_can_list(m.can) for m in lr if m.which() == 'can'] |
|
|
|
|
|
|
|
|
|
logs = [f"https://commadataci.blob.core.windows.net/openpilotci/{ROUTE}/{i}/rlog.bz2" for i in REPLAY_SEGS] |
|
|
|
|
with multiprocessing.Pool(24) as pool: |
|
|
|
|
for lr in tqdm(pool.map(load_segment, logs)): |
|
|
|
|
CAN_MSGS += [can_capnp_to_can_list(m.can) for m in lr if m.which() == 'can'] |
|
|
|
|
|
|
|
|
|
# set both to cycle ignition |
|
|
|
|
IGN_ON = int(os.getenv("ON", "0")) |
|
|
|
|