This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
42 lines (36 loc) · 1.46 KB
/
main.py
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
40
41
42
from robocluster.manager import ProcessManager, RunOnce
import time
import config
network = config.network
# Comment out entries in process_list to disable processes.
process_list = [
# RunOnce('USBManager', 'python3 USBmanager.py'),
# RunOnce('Printer', 'python3 Printer.py'),
# RunOnce('GPSDriver', 'python3 GPSdriver.py'),
# RunOnce('DriveControl', 'python3 DriveProcess.py'),
RunOnce('Joystick', 'python3 JoystickProcess.py'),
# RunOnce('KalmanFilter', 'python3 KalmanFilterProcess.py'),
# RunOnce('Autopilot', 'python3 Autopilot.py'),
RunOnce('WebUI', 'python3 server.py', cwd='rover-webui'),
# RunOnce('Navigation', 'python3 NavigationProcess.py'),
# RunOnce('Simulator', 'python3 Simulator.py'),
# RunOnce('PiCam', 'bash pi_cam.sh front'),
# RunOnce('ArmProcess', 'python3 ArmProcess.py'),
# RunOnce('webcam', 'bash start_webcam.sh'),
# RunOnce('ObstacleDetection', 'python3 Avoidance.py'),
# RunOnce('LoadCell', 'python3 LoadCell.py')
# RunOnce('ScienceDrill', 'python3 DrillProcess.py'),
# RunOnce('FrontEndLoader', 'python3 FrontEndLoaderProcess.py')
# RunOnce('ScienceControll', 'python3 Science.py'),
]
with ProcessManager(network=network) as manager:
# Initialize all the processes
for proc in process_list:
manager.addProcess(proc)
# Start all processes
manager.start()
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
pass # exit cleanly