-
Notifications
You must be signed in to change notification settings - Fork 18
/
init.sh
executable file
·103 lines (81 loc) · 1.89 KB
/
init.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
echo "Starting Simulation Central Controller"
cd sim_controller
python -m flock_controller.main &
cd ../
echo "Central Controller started successfully!"
## Wait for 8 seconds.
/bin/sleep 8
echo "Initializing Central Controller Location"
python -m controller_settings.set_location
## Wait for 2 seconds
/bin/sleep 2
echo "Starting Drone1"
cd sim_drone1
python -m flock_drone.main &
cd ../
echo "Drone1 successfully started!"
echo "Starting Drone2"
cd sim_drone2
python -m flock_drone.main &
cd ../
echo "Drone2 successfully started!"
echo "Starting Drone3"
cd sim_drone3
python -m flock_drone.main &
cd ../
echo "Drone3 successfully started!"
echo "Starting Drone4"
cd sim_drone4
python -m flock_drone.main &
cd ../
echo "Drone4 successfully started!"
echo "Starting Simulation GUI"
cd sim_gui
python app.py &
cd ../
echo "Simulation GUI started successfully"
## Wait for 8 seconds.
/bin/sleep 8
echo "Initializing Drone1"
cd sim_drone1
python -m flock_drone.mechanics.drone_init
cd ../
/bin/sleep 2
echo "Initializing Drone2"
cd sim_drone2
python -m flock_drone.mechanics.drone_init
cd ../
/bin/sleep 2
echo "Initializing Drone3"
cd sim_drone3
python -m flock_drone.mechanics.drone_init
cd ../
/bin/sleep 2
echo "Initializing Drone4"
cd sim_drone4
python -m flock_drone.mechanics.drone_init
cd ../
/bin/sleep 2
## Wait for 8 seconds.
/bin/sleep 8
echo "Starting Drone1 main mechanics Loop"
cd sim_drone1
python -m flock_drone.mechanics.simulate &
cd ../
echo "Starting Drone2 main mechanics Loop"
cd sim_drone2
python -m flock_drone.mechanics.simulate &
cd ../
echo "Starting Drone3 main mechanics Loop"
cd sim_drone3
python -m flock_drone.mechanics.simulate &
cd ../
echo "Starting Drone4 main mechanics Loop"
cd sim_drone4
python -m flock_drone.mechanics.simulate &
cd ../
/bin/sleep 8
echo "Starting Central Controller main mechanics Loop"
cd sim_controller
python -m flock_controller.mechanics.simulate &
cd ../