manager runs on Mac, and other openpilot for PC fixes (#1037)

* use the openpilot/persist directory on PC

* manager runs on mac

* sim runs w/o carla

* fix params location in test

* that rmtree can fail and it's okay

* refactor params clear functionality

* set PARAMS_PATH
This commit is contained in:
George Hotz
2020-02-02 12:15:02 -08:00
committed by GitHub
parent 0470b25071
commit c42e2ecc50
15 changed files with 72 additions and 36 deletions
@@ -4,7 +4,6 @@ os.environ['OLD_CAN'] = '1'
os.environ['NOCRASH'] = '1'
import unittest
import shutil
import matplotlib
matplotlib.use('svg')
@@ -328,8 +327,8 @@ class LongitudinalControl(unittest.TestCase):
setup_output()
shutil.rmtree('/data/params', ignore_errors=True)
params = Params()
params.clear_all()
params.put("Passive", "1" if os.getenv("PASSIVE") else "0")
params.put("OpenpilotEnabledToggle", "1")
params.put("CommunityFeaturesToggle", "1")
@@ -3,7 +3,6 @@ import os
import sys
import threading
import importlib
import shutil
if "CI" in os.environ:
tqdm = lambda x: x
@@ -260,8 +259,8 @@ def replay_process(cfg, lr):
all_msgs = sorted(lr, key=lambda msg: msg.logMonoTime)
pub_msgs = [msg for msg in all_msgs if msg.which() in list(cfg.pub_sub.keys())]
shutil.rmtree('/data/params', ignore_errors=True)
params = Params()
params.clear_all()
params.manager_start()
params.put("OpenpilotEnabledToggle", "1")
params.put("Passive", "0")
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
import shutil
import time
import os
import sys
@@ -487,8 +486,8 @@ if __name__ == "__main__":
elif "UNLOGGER_PATH" not in os.environ:
continue
shutil.rmtree('/data/params')
params = Params()
params.clear_all()
params.manager_start()
params.put("OpenpilotEnabledToggle", "1")
params.put("CommunityFeaturesToggle", "1")