├── .gitignore
├── CMakeLists.txt
├── MSP
├── 1r-5-map_1_0
├── 1r-5-map_2_0
├── 1r-5-map_2_1
├── [map]_[Teamsize]_[ID]
├── cumberland
│ ├── cumberland_12_0
│ ├── cumberland_12_1
│ ├── cumberland_12_10
│ ├── cumberland_12_11
│ ├── cumberland_12_2
│ ├── cumberland_12_3
│ ├── cumberland_12_4
│ ├── cumberland_12_5
│ ├── cumberland_12_6
│ ├── cumberland_12_7
│ ├── cumberland_12_8
│ ├── cumberland_12_9
│ ├── cumberland_1_0
│ ├── cumberland_2_0
│ ├── cumberland_2_1
│ ├── cumberland_3_0
│ ├── cumberland_3_1
│ ├── cumberland_3_2
│ ├── cumberland_4_0
│ ├── cumberland_4_1
│ ├── cumberland_4_2
│ ├── cumberland_4_3
│ ├── cumberland_5_0
│ ├── cumberland_5_1
│ ├── cumberland_5_2
│ ├── cumberland_5_3
│ ├── cumberland_5_4
│ ├── cumberland_6_0
│ ├── cumberland_6_1
│ ├── cumberland_6_2
│ ├── cumberland_6_3
│ ├── cumberland_6_4
│ ├── cumberland_6_5
│ ├── cumberland_7_0
│ ├── cumberland_7_1
│ ├── cumberland_7_2
│ ├── cumberland_7_3
│ ├── cumberland_7_4
│ ├── cumberland_7_5
│ ├── cumberland_7_6
│ ├── cumberland_8_0
│ ├── cumberland_8_1
│ ├── cumberland_8_2
│ ├── cumberland_8_3
│ ├── cumberland_8_4
│ ├── cumberland_8_5
│ ├── cumberland_8_6
│ └── cumberland_8_7
├── example
│ ├── example_1_0
│ ├── example_2_0
│ ├── example_2_1
│ ├── example_4_0
│ ├── example_4_1
│ ├── example_4_2
│ ├── example_4_3
│ ├── example_6_0
│ ├── example_6_1
│ ├── example_6_2
│ ├── example_6_3
│ ├── example_6_4
│ ├── example_6_5
│ ├── example_8_0
│ ├── example_8_1
│ ├── example_8_2
│ ├── example_8_3
│ ├── example_8_4
│ ├── example_8_5
│ ├── example_8_6
│ └── example_8_7
└── grid
│ ├── grid_1_0
│ ├── grid_2_0
│ ├── grid_2_1
│ ├── grid_3_0
│ ├── grid_3_1
│ ├── grid_3_2
│ ├── grid_4_0
│ ├── grid_4_1
│ ├── grid_4_2
│ ├── grid_4_3
│ ├── grid_5_0
│ ├── grid_5_1
│ ├── grid_5_2
│ ├── grid_5_3
│ ├── grid_5_4
│ ├── grid_6_0
│ ├── grid_6_1
│ ├── grid_6_2
│ ├── grid_6_3
│ ├── grid_6_4
│ ├── grid_6_5
│ ├── grid_7_0
│ ├── grid_7_1
│ ├── grid_7_2
│ ├── grid_7_3
│ ├── grid_7_4
│ ├── grid_7_5
│ ├── grid_7_6
│ ├── grid_8_0
│ ├── grid_8_1
│ ├── grid_8_2
│ ├── grid_8_3
│ ├── grid_8_4
│ ├── grid_8_5
│ ├── grid_8_6
│ ├── grid_8_7
│ ├── grid_9_0
│ ├── grid_9_1
│ ├── grid_9_2
│ ├── grid_9_3
│ ├── grid_9_4
│ ├── grid_9_5
│ ├── grid_9_6
│ ├── grid_9_7
│ └── grid_9_8
├── Makefile
├── README.md
├── abort_experiment.sh
├── beep.wav
├── kill_all.sh
├── launch
├── map.launch
├── robot.launch
└── robot_fake_loc.launch
├── mainpage.dox
├── maps
├── 1r5
│ ├── 1r5 Graph Info
│ ├── 1r5.graph
│ ├── 1r5.pgm
│ ├── 1r5.world
│ ├── 1r5.yaml
│ └── robots.inc
├── DIAG_floor1
│ ├── DIAG_floor1-graph.png
│ ├── DIAG_floor1.graph
│ ├── DIAG_floor1.pgm
│ ├── DIAG_floor1.world
│ └── DIAG_floor1.yaml
├── DIAG_labs
│ ├── DIAG_labs-graph.png
│ ├── DIAG_labs.graph
│ ├── DIAG_labs.pgm
│ ├── DIAG_labs.world
│ └── DIAG_labs.yaml
├── broughton
│ ├── broughton-graph.png
│ ├── broughton.graph
│ ├── broughton.pgm
│ ├── broughton.world
│ └── broughton.yaml
├── crobot.inc
├── ctcv
│ ├── CTCV Graph.png
│ ├── ctcv.graph
│ ├── ctcv.pgm
│ ├── ctcv.world
│ ├── ctcv.yaml
│ └── ctcv_no_borders.pgm
├── cumberland
│ ├── cumberland-graph.png
│ ├── cumberland.graph
│ ├── cumberland.pgm
│ ├── cumberland.world
│ └── cumberland.yaml
├── example
│ ├── example-graph.png
│ ├── example.graph
│ ├── example.pgm
│ ├── example.world
│ └── example.yaml
├── floorplan.inc
├── grid
│ ├── grid Graph Info
│ ├── grid-graph.png
│ ├── grid.graph
│ ├── grid.pgm
│ ├── grid.world
│ └── grid.yaml
├── hokuyo.inc
└── move_base_arena
│ ├── graph move_base_arena.ods
│ ├── move_base_arena.graph
│ ├── move_base_arena.pgm
│ ├── move_base_arena.world
│ ├── move_base_arena.yaml
│ └── move_base_arena_points
├── package.xml
├── params
├── DTA
│ ├── DTAGreedy.params
│ └── DTASSI.params
├── amcl
│ └── amcl_diff.launch
├── initial_poses.txt
└── move_base
│ ├── base_local_planner_params.yaml
│ ├── costmap_common_params.yaml
│ ├── global_costmap_params.yaml
│ └── local_costmap_params.yaml
├── run_exp.sh
├── setinitposes.py
├── src
├── CBLS_Agent.cpp
├── Conscientious_Cognitive_Agent.cpp
├── Conscientious_Reactive_Agent.cpp
├── Cyclic_Agent.cpp
├── DTAGreedy_Agent.cpp
├── DTASSIPart_Agent.cpp
├── DTASSI_Agent.cpp
├── GBS_Agent.cpp
├── GoToStartPos.cpp
├── Heuristic_Conscientious_Reactive_Agent.cpp
├── MSP_Agent.cpp
├── PatrolAgent.cpp
├── PatrolAgent.h
├── Random_Agent.cpp
├── SEBS_Agent.cpp
├── SSIPatrolAgent.cpp
├── SSIPatrolAgent.h
├── algorithms.cpp
├── algorithms.h
├── config.cpp
├── config.h
├── getgraph.cpp
├── getgraph.h
├── idlHistogram.cpp
├── message_types.h
└── monitor.cpp
├── srv
└── GoToStartPosSrv.srv
├── start_experiment.py
├── stats
├── anova_multi.R
├── boxplots.R
├── do_anova_test_template.py
├── do_boxplot_last_exp.py
├── do_boxplots.py
├── do_plot_last_exp.py
├── do_plot_template.py
└── timeplot.R
└── stop_experiment.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | bin
3 | build
4 | lib
5 | results/*
6 | params/amcl/*_initial_pose.xml
7 | lastConfigUsed
8 | maps/*/robots.inc
9 | rostime.txt
10 | simrun.txt
11 | experiments.txt
12 |
--------------------------------------------------------------------------------
/MSP/1r-5-map_1_0:
--------------------------------------------------------------------------------
1 | 37
2 | 3
3 | 1
4 | 0
5 | 1
6 | 5
7 | 10
8 | 8
9 | 10
10 | 11
11 | 10
12 | 5
13 | 7
14 | 4
15 | 2
16 | 4
17 | 6
18 | 4
19 | 7
20 | 9
21 | 7
22 | 4
23 | 6
24 | 4
25 | 2
26 | 4
27 | 7
28 | 5
29 | 10
30 | 11
31 | 10
32 | 8
33 | 10
34 | 5
35 | 1
36 | 0
37 | 1
38 | 3
39 |
--------------------------------------------------------------------------------
/MSP/1r-5-map_2_0:
--------------------------------------------------------------------------------
1 | 17
2 | 3
3 | 1
4 | 0
5 | 1
6 | 5
7 | 10
8 | 11
9 | 10
10 | 8
11 | 10
12 | 11
13 | 10
14 | 5
15 | 1
16 | 0
17 | 1
18 | 3
19 |
--------------------------------------------------------------------------------
/MSP/1r-5-map_2_1:
--------------------------------------------------------------------------------
1 | 15
2 | 2
3 | 4
4 | 6
5 | 4
6 | 7
7 | 5
8 | 7
9 | 9
10 | 7
11 | 5
12 | 7
13 | 4
14 | 6
15 | 4
16 | 2
17 |
--------------------------------------------------------------------------------
/MSP/[map]_[Teamsize]_[ID]:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/MSP/[map]_[Teamsize]_[ID]
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_0:
--------------------------------------------------------------------------------
1 | 45
2 | 24
3 | 27
4 | 40
5 | 38
6 | 31
7 | 38
8 | 39
9 | 42
10 | 43
11 | 42
12 | 44
13 | 42
14 | 39
15 | 45
16 | 37
17 | 45
18 | 49
19 | 48
20 | 49
21 | 50
22 | 60
23 | 50
24 | 59
25 | 50
26 | 60
27 | 50
28 | 49
29 | 48
30 | 49
31 | 45
32 | 37
33 | 45
34 | 39
35 | 42
36 | 44
37 | 42
38 | 43
39 | 42
40 | 39
41 | 38
42 | 31
43 | 38
44 | 40
45 | 27
46 | 24
47 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_1:
--------------------------------------------------------------------------------
1 | 9
2 | 5
3 | 6
4 | 8
5 | 6
6 | 7
7 | 6
8 | 8
9 | 6
10 | 5
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_10:
--------------------------------------------------------------------------------
1 | 21
2 | 35
3 | 30
4 | 29
5 | 30
6 | 25
7 | 20
8 | 25
9 | 33
10 | 34
11 | 33
12 | 36
13 | 33
14 | 34
15 | 33
16 | 25
17 | 20
18 | 25
19 | 30
20 | 29
21 | 30
22 | 35
23 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_11:
--------------------------------------------------------------------------------
1 | 9
2 | 23
3 | 19
4 | 18
5 | 19
6 | 26
7 | 19
8 | 18
9 | 19
10 | 23
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_2:
--------------------------------------------------------------------------------
1 | 15
2 | 10
3 | 17
4 | 20
5 | 21
6 | 22
7 | 21
8 | 23
9 | 28
10 | 23
11 | 21
12 | 22
13 | 21
14 | 20
15 | 17
16 | 10
17 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_3:
--------------------------------------------------------------------------------
1 | 13
2 | 15
3 | 18
4 | 32
5 | 58
6 | 57
7 | 58
8 | 62
9 | 58
10 | 57
11 | 58
12 | 32
13 | 18
14 | 15
15 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_4:
--------------------------------------------------------------------------------
1 | 21
2 | 51
3 | 52
4 | 40
5 | 52
6 | 53
7 | 54
8 | 53
9 | 63
10 | 61
11 | 63
12 | 65
13 | 63
14 | 61
15 | 63
16 | 53
17 | 54
18 | 53
19 | 52
20 | 40
21 | 52
22 | 51
23 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_5:
--------------------------------------------------------------------------------
1 | 5
2 | 2
3 | 1
4 | 0
5 | 1
6 | 2
7 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_6:
--------------------------------------------------------------------------------
1 | 9
2 | 9
3 | 16
4 | 17
5 | 16
6 | 12
7 | 16
8 | 17
9 | 16
10 | 9
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_7:
--------------------------------------------------------------------------------
1 | 11
2 | 5
3 | 13
4 | 11
5 | 13
6 | 15
7 | 14
8 | 15
9 | 13
10 | 11
11 | 13
12 | 5
13 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_8:
--------------------------------------------------------------------------------
1 | 25
2 | 32
3 | 41
4 | 28
5 | 27
6 | 28
7 | 41
8 | 46
9 | 56
10 | 46
11 | 47
12 | 55
13 | 47
14 | 64
15 | 47
16 | 55
17 | 47
18 | 46
19 | 56
20 | 46
21 | 41
22 | 28
23 | 27
24 | 28
25 | 41
26 | 32
27 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_12_9:
--------------------------------------------------------------------------------
1 | 9
2 | 1
3 | 4
4 | 3
5 | 4
6 | 5
7 | 4
8 | 3
9 | 4
10 | 1
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_1_0:
--------------------------------------------------------------------------------
1 | 235
2 | 0
3 | 1
4 | 2
5 | 1
6 | 4
7 | 3
8 | 4
9 | 5
10 | 6
11 | 7
12 | 6
13 | 8
14 | 6
15 | 5
16 | 13
17 | 11
18 | 13
19 | 15
20 | 14
21 | 15
22 | 18
23 | 19
24 | 26
25 | 19
26 | 23
27 | 19
28 | 18
29 | 32
30 | 58
31 | 57
32 | 58
33 | 62
34 | 58
35 | 32
36 | 41
37 | 46
38 | 56
39 | 46
40 | 47
41 | 55
42 | 47
43 | 64
44 | 47
45 | 46
46 | 41
47 | 28
48 | 27
49 | 24
50 | 27
51 | 40
52 | 38
53 | 31
54 | 38
55 | 39
56 | 45
57 | 37
58 | 45
59 | 49
60 | 48
61 | 49
62 | 50
63 | 60
64 | 50
65 | 59
66 | 50
67 | 49
68 | 45
69 | 39
70 | 42
71 | 43
72 | 42
73 | 44
74 | 42
75 | 39
76 | 38
77 | 40
78 | 52
79 | 51
80 | 52
81 | 53
82 | 54
83 | 53
84 | 63
85 | 61
86 | 63
87 | 65
88 | 63
89 | 53
90 | 52
91 | 40
92 | 27
93 | 28
94 | 23
95 | 21
96 | 22
97 | 21
98 | 20
99 | 25
100 | 30
101 | 29
102 | 30
103 | 35
104 | 30
105 | 25
106 | 33
107 | 34
108 | 33
109 | 36
110 | 33
111 | 25
112 | 20
113 | 17
114 | 10
115 | 17
116 | 16
117 | 9
118 | 16
119 | 12
120 | 16
121 | 9
122 | 16
123 | 17
124 | 10
125 | 17
126 | 20
127 | 25
128 | 33
129 | 36
130 | 33
131 | 34
132 | 33
133 | 25
134 | 30
135 | 35
136 | 30
137 | 29
138 | 30
139 | 25
140 | 20
141 | 21
142 | 22
143 | 21
144 | 23
145 | 28
146 | 27
147 | 40
148 | 52
149 | 53
150 | 63
151 | 65
152 | 63
153 | 61
154 | 63
155 | 53
156 | 54
157 | 53
158 | 52
159 | 51
160 | 52
161 | 40
162 | 38
163 | 39
164 | 42
165 | 44
166 | 42
167 | 43
168 | 42
169 | 39
170 | 45
171 | 49
172 | 50
173 | 59
174 | 50
175 | 60
176 | 50
177 | 49
178 | 48
179 | 49
180 | 45
181 | 37
182 | 45
183 | 39
184 | 38
185 | 31
186 | 38
187 | 40
188 | 27
189 | 24
190 | 27
191 | 28
192 | 41
193 | 46
194 | 47
195 | 64
196 | 47
197 | 55
198 | 47
199 | 46
200 | 56
201 | 46
202 | 41
203 | 32
204 | 58
205 | 62
206 | 58
207 | 57
208 | 58
209 | 32
210 | 18
211 | 19
212 | 23
213 | 19
214 | 26
215 | 19
216 | 18
217 | 15
218 | 14
219 | 15
220 | 13
221 | 11
222 | 13
223 | 5
224 | 6
225 | 8
226 | 6
227 | 7
228 | 6
229 | 5
230 | 4
231 | 3
232 | 4
233 | 1
234 | 2
235 | 1
236 | 0
237 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_2_0:
--------------------------------------------------------------------------------
1 | 161
2 | 12
3 | 16
4 | 9
5 | 16
6 | 17
7 | 10
8 | 17
9 | 20
10 | 25
11 | 30
12 | 29
13 | 30
14 | 35
15 | 30
16 | 25
17 | 33
18 | 34
19 | 33
20 | 36
21 | 33
22 | 25
23 | 20
24 | 21
25 | 22
26 | 21
27 | 23
28 | 19
29 | 23
30 | 28
31 | 41
32 | 46
33 | 56
34 | 46
35 | 47
36 | 55
37 | 47
38 | 64
39 | 47
40 | 46
41 | 41
42 | 28
43 | 27
44 | 24
45 | 27
46 | 40
47 | 38
48 | 31
49 | 38
50 | 39
51 | 45
52 | 37
53 | 45
54 | 49
55 | 48
56 | 49
57 | 50
58 | 60
59 | 50
60 | 59
61 | 50
62 | 49
63 | 45
64 | 39
65 | 42
66 | 43
67 | 42
68 | 44
69 | 42
70 | 39
71 | 38
72 | 40
73 | 52
74 | 51
75 | 52
76 | 53
77 | 54
78 | 53
79 | 63
80 | 61
81 | 63
82 | 65
83 | 63
84 | 61
85 | 63
86 | 53
87 | 54
88 | 53
89 | 52
90 | 51
91 | 52
92 | 40
93 | 38
94 | 39
95 | 42
96 | 44
97 | 42
98 | 43
99 | 42
100 | 39
101 | 45
102 | 49
103 | 50
104 | 59
105 | 50
106 | 60
107 | 50
108 | 49
109 | 48
110 | 49
111 | 45
112 | 37
113 | 45
114 | 39
115 | 38
116 | 31
117 | 38
118 | 40
119 | 27
120 | 24
121 | 27
122 | 28
123 | 41
124 | 46
125 | 47
126 | 64
127 | 47
128 | 55
129 | 47
130 | 46
131 | 56
132 | 46
133 | 41
134 | 28
135 | 23
136 | 19
137 | 23
138 | 21
139 | 22
140 | 21
141 | 20
142 | 25
143 | 33
144 | 36
145 | 33
146 | 34
147 | 33
148 | 25
149 | 30
150 | 35
151 | 30
152 | 29
153 | 30
154 | 25
155 | 20
156 | 17
157 | 10
158 | 17
159 | 16
160 | 9
161 | 16
162 | 12
163 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_2_1:
--------------------------------------------------------------------------------
1 | 63
2 | 0
3 | 1
4 | 2
5 | 1
6 | 4
7 | 3
8 | 4
9 | 5
10 | 6
11 | 7
12 | 6
13 | 8
14 | 6
15 | 5
16 | 13
17 | 11
18 | 13
19 | 15
20 | 14
21 | 15
22 | 18
23 | 19
24 | 26
25 | 19
26 | 18
27 | 32
28 | 41
29 | 32
30 | 58
31 | 57
32 | 58
33 | 62
34 | 58
35 | 57
36 | 58
37 | 32
38 | 41
39 | 32
40 | 18
41 | 19
42 | 26
43 | 19
44 | 18
45 | 15
46 | 14
47 | 15
48 | 13
49 | 11
50 | 13
51 | 5
52 | 6
53 | 8
54 | 6
55 | 7
56 | 6
57 | 5
58 | 4
59 | 3
60 | 4
61 | 1
62 | 2
63 | 1
64 | 0
65 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_3_0:
--------------------------------------------------------------------------------
1 | 131
2 | 14
3 | 15
4 | 13
5 | 11
6 | 13
7 | 15
8 | 18
9 | 32
10 | 58
11 | 57
12 | 58
13 | 62
14 | 58
15 | 32
16 | 41
17 | 46
18 | 56
19 | 46
20 | 47
21 | 55
22 | 47
23 | 64
24 | 47
25 | 46
26 | 41
27 | 28
28 | 27
29 | 24
30 | 27
31 | 40
32 | 38
33 | 31
34 | 38
35 | 39
36 | 45
37 | 37
38 | 45
39 | 49
40 | 48
41 | 49
42 | 50
43 | 60
44 | 50
45 | 59
46 | 50
47 | 49
48 | 45
49 | 39
50 | 42
51 | 43
52 | 42
53 | 44
54 | 42
55 | 39
56 | 38
57 | 40
58 | 52
59 | 51
60 | 52
61 | 53
62 | 54
63 | 53
64 | 63
65 | 61
66 | 63
67 | 65
68 | 63
69 | 61
70 | 63
71 | 53
72 | 54
73 | 53
74 | 52
75 | 51
76 | 52
77 | 40
78 | 38
79 | 39
80 | 42
81 | 44
82 | 42
83 | 43
84 | 42
85 | 39
86 | 45
87 | 49
88 | 50
89 | 59
90 | 50
91 | 60
92 | 50
93 | 49
94 | 48
95 | 49
96 | 45
97 | 37
98 | 45
99 | 39
100 | 38
101 | 31
102 | 38
103 | 40
104 | 27
105 | 24
106 | 27
107 | 28
108 | 41
109 | 46
110 | 47
111 | 64
112 | 47
113 | 55
114 | 47
115 | 46
116 | 56
117 | 46
118 | 41
119 | 32
120 | 58
121 | 62
122 | 58
123 | 57
124 | 58
125 | 32
126 | 18
127 | 15
128 | 13
129 | 11
130 | 13
131 | 15
132 | 14
133 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_3_1:
--------------------------------------------------------------------------------
1 | 63
2 | 12
3 | 16
4 | 9
5 | 16
6 | 17
7 | 10
8 | 17
9 | 20
10 | 25
11 | 30
12 | 29
13 | 30
14 | 35
15 | 30
16 | 25
17 | 33
18 | 34
19 | 33
20 | 36
21 | 33
22 | 25
23 | 20
24 | 21
25 | 22
26 | 21
27 | 23
28 | 28
29 | 23
30 | 19
31 | 18
32 | 19
33 | 26
34 | 19
35 | 18
36 | 19
37 | 23
38 | 28
39 | 23
40 | 21
41 | 22
42 | 21
43 | 20
44 | 25
45 | 33
46 | 36
47 | 33
48 | 34
49 | 33
50 | 25
51 | 30
52 | 35
53 | 30
54 | 29
55 | 30
56 | 25
57 | 20
58 | 17
59 | 10
60 | 17
61 | 16
62 | 9
63 | 16
64 | 12
65 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_3_2:
--------------------------------------------------------------------------------
1 | 27
2 | 0
3 | 1
4 | 2
5 | 1
6 | 4
7 | 3
8 | 4
9 | 5
10 | 13
11 | 5
12 | 6
13 | 8
14 | 6
15 | 7
16 | 6
17 | 8
18 | 6
19 | 5
20 | 13
21 | 5
22 | 4
23 | 3
24 | 4
25 | 1
26 | 2
27 | 1
28 | 0
29 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_4_0:
--------------------------------------------------------------------------------
1 | 97
2 | 64
3 | 47
4 | 55
5 | 47
6 | 46
7 | 56
8 | 46
9 | 41
10 | 28
11 | 27
12 | 24
13 | 27
14 | 40
15 | 38
16 | 31
17 | 38
18 | 39
19 | 45
20 | 37
21 | 45
22 | 49
23 | 48
24 | 49
25 | 50
26 | 60
27 | 50
28 | 59
29 | 50
30 | 49
31 | 45
32 | 39
33 | 42
34 | 43
35 | 42
36 | 44
37 | 42
38 | 39
39 | 38
40 | 40
41 | 52
42 | 51
43 | 52
44 | 53
45 | 54
46 | 53
47 | 63
48 | 61
49 | 63
50 | 65
51 | 63
52 | 61
53 | 63
54 | 53
55 | 54
56 | 53
57 | 52
58 | 51
59 | 52
60 | 40
61 | 38
62 | 39
63 | 42
64 | 44
65 | 42
66 | 43
67 | 42
68 | 39
69 | 45
70 | 49
71 | 50
72 | 59
73 | 50
74 | 60
75 | 50
76 | 49
77 | 48
78 | 49
79 | 45
80 | 37
81 | 45
82 | 39
83 | 38
84 | 31
85 | 38
86 | 40
87 | 27
88 | 24
89 | 27
90 | 28
91 | 41
92 | 46
93 | 56
94 | 46
95 | 47
96 | 55
97 | 47
98 | 64
99 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_4_1:
--------------------------------------------------------------------------------
1 | 27
2 | 0
3 | 1
4 | 2
5 | 1
6 | 4
7 | 3
8 | 4
9 | 5
10 | 13
11 | 5
12 | 6
13 | 8
14 | 6
15 | 7
16 | 6
17 | 8
18 | 6
19 | 5
20 | 13
21 | 5
22 | 4
23 | 3
24 | 4
25 | 1
26 | 2
27 | 1
28 | 0
29 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_4_2:
--------------------------------------------------------------------------------
1 | 57
2 | 12
3 | 16
4 | 9
5 | 16
6 | 17
7 | 10
8 | 17
9 | 20
10 | 25
11 | 30
12 | 29
13 | 30
14 | 35
15 | 30
16 | 25
17 | 33
18 | 34
19 | 33
20 | 36
21 | 33
22 | 25
23 | 20
24 | 21
25 | 22
26 | 21
27 | 23
28 | 28
29 | 23
30 | 19
31 | 23
32 | 28
33 | 23
34 | 21
35 | 22
36 | 21
37 | 20
38 | 25
39 | 33
40 | 36
41 | 33
42 | 34
43 | 33
44 | 25
45 | 30
46 | 35
47 | 30
48 | 29
49 | 30
50 | 25
51 | 20
52 | 17
53 | 10
54 | 17
55 | 16
56 | 9
57 | 16
58 | 12
59 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_4_3:
--------------------------------------------------------------------------------
1 | 35
2 | 14
3 | 15
4 | 13
5 | 11
6 | 13
7 | 15
8 | 18
9 | 19
10 | 26
11 | 19
12 | 18
13 | 32
14 | 41
15 | 32
16 | 58
17 | 57
18 | 58
19 | 62
20 | 58
21 | 57
22 | 58
23 | 32
24 | 41
25 | 32
26 | 18
27 | 19
28 | 26
29 | 19
30 | 18
31 | 15
32 | 13
33 | 11
34 | 13
35 | 15
36 | 14
37 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_5_0:
--------------------------------------------------------------------------------
1 | 65
2 | 36
3 | 33
4 | 34
5 | 33
6 | 25
7 | 30
8 | 29
9 | 30
10 | 35
11 | 30
12 | 25
13 | 20
14 | 17
15 | 10
16 | 17
17 | 20
18 | 21
19 | 22
20 | 21
21 | 23
22 | 19
23 | 26
24 | 19
25 | 23
26 | 28
27 | 41
28 | 46
29 | 56
30 | 46
31 | 47
32 | 55
33 | 47
34 | 64
35 | 47
36 | 55
37 | 47
38 | 46
39 | 56
40 | 46
41 | 41
42 | 28
43 | 23
44 | 19
45 | 26
46 | 19
47 | 23
48 | 21
49 | 22
50 | 21
51 | 20
52 | 17
53 | 10
54 | 17
55 | 20
56 | 25
57 | 30
58 | 35
59 | 30
60 | 29
61 | 30
62 | 25
63 | 33
64 | 34
65 | 33
66 | 36
67 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_5_1:
--------------------------------------------------------------------------------
1 | 23
2 | 0
3 | 1
4 | 2
5 | 1
6 | 4
7 | 3
8 | 4
9 | 5
10 | 6
11 | 8
12 | 6
13 | 7
14 | 6
15 | 8
16 | 6
17 | 5
18 | 4
19 | 3
20 | 4
21 | 1
22 | 2
23 | 1
24 | 0
25 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_5_2:
--------------------------------------------------------------------------------
1 | 81
2 | 24
3 | 27
4 | 28
5 | 27
6 | 40
7 | 38
8 | 31
9 | 38
10 | 39
11 | 45
12 | 37
13 | 45
14 | 49
15 | 48
16 | 49
17 | 50
18 | 60
19 | 50
20 | 59
21 | 50
22 | 49
23 | 45
24 | 39
25 | 42
26 | 43
27 | 42
28 | 44
29 | 42
30 | 39
31 | 38
32 | 40
33 | 52
34 | 51
35 | 52
36 | 53
37 | 54
38 | 53
39 | 63
40 | 61
41 | 63
42 | 65
43 | 63
44 | 61
45 | 63
46 | 53
47 | 54
48 | 53
49 | 52
50 | 51
51 | 52
52 | 40
53 | 38
54 | 39
55 | 42
56 | 44
57 | 42
58 | 43
59 | 42
60 | 39
61 | 45
62 | 49
63 | 50
64 | 59
65 | 50
66 | 60
67 | 50
68 | 49
69 | 48
70 | 49
71 | 45
72 | 37
73 | 45
74 | 39
75 | 38
76 | 31
77 | 38
78 | 40
79 | 27
80 | 28
81 | 27
82 | 24
83 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_5_3:
--------------------------------------------------------------------------------
1 | 35
2 | 14
3 | 15
4 | 13
5 | 5
6 | 13
7 | 11
8 | 13
9 | 15
10 | 18
11 | 19
12 | 18
13 | 32
14 | 41
15 | 32
16 | 58
17 | 57
18 | 58
19 | 62
20 | 58
21 | 57
22 | 58
23 | 32
24 | 41
25 | 32
26 | 18
27 | 19
28 | 18
29 | 15
30 | 13
31 | 11
32 | 13
33 | 5
34 | 13
35 | 15
36 | 14
37 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_5_4:
--------------------------------------------------------------------------------
1 | 9
2 | 9
3 | 16
4 | 17
5 | 16
6 | 12
7 | 16
8 | 17
9 | 16
10 | 9
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_0:
--------------------------------------------------------------------------------
1 | 65
2 | 36
3 | 33
4 | 34
5 | 33
6 | 25
7 | 30
8 | 29
9 | 30
10 | 35
11 | 30
12 | 25
13 | 20
14 | 17
15 | 10
16 | 17
17 | 20
18 | 21
19 | 22
20 | 21
21 | 23
22 | 28
23 | 27
24 | 24
25 | 27
26 | 28
27 | 41
28 | 46
29 | 56
30 | 46
31 | 47
32 | 55
33 | 47
34 | 64
35 | 47
36 | 55
37 | 47
38 | 46
39 | 56
40 | 46
41 | 41
42 | 28
43 | 27
44 | 24
45 | 27
46 | 28
47 | 23
48 | 21
49 | 22
50 | 21
51 | 20
52 | 17
53 | 10
54 | 17
55 | 20
56 | 25
57 | 30
58 | 35
59 | 30
60 | 29
61 | 30
62 | 25
63 | 33
64 | 34
65 | 33
66 | 36
67 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_1:
--------------------------------------------------------------------------------
1 | 39
2 | 14
3 | 15
4 | 13
5 | 11
6 | 13
7 | 15
8 | 18
9 | 19
10 | 23
11 | 19
12 | 26
13 | 19
14 | 18
15 | 32
16 | 41
17 | 32
18 | 58
19 | 57
20 | 58
21 | 62
22 | 58
23 | 57
24 | 58
25 | 32
26 | 41
27 | 32
28 | 18
29 | 19
30 | 26
31 | 19
32 | 23
33 | 19
34 | 18
35 | 15
36 | 13
37 | 11
38 | 13
39 | 15
40 | 14
41 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_2:
--------------------------------------------------------------------------------
1 | 65
2 | 59
3 | 50
4 | 60
5 | 50
6 | 49
7 | 48
8 | 49
9 | 45
10 | 37
11 | 45
12 | 39
13 | 42
14 | 43
15 | 42
16 | 44
17 | 42
18 | 39
19 | 38
20 | 31
21 | 38
22 | 40
23 | 27
24 | 40
25 | 52
26 | 51
27 | 52
28 | 53
29 | 54
30 | 53
31 | 63
32 | 61
33 | 63
34 | 65
35 | 63
36 | 61
37 | 63
38 | 53
39 | 54
40 | 53
41 | 52
42 | 51
43 | 52
44 | 40
45 | 27
46 | 40
47 | 38
48 | 31
49 | 38
50 | 39
51 | 42
52 | 44
53 | 42
54 | 43
55 | 42
56 | 39
57 | 45
58 | 37
59 | 45
60 | 49
61 | 48
62 | 49
63 | 50
64 | 60
65 | 50
66 | 59
67 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_3:
--------------------------------------------------------------------------------
1 | 13
2 | 0
3 | 1
4 | 4
5 | 3
6 | 4
7 | 1
8 | 2
9 | 1
10 | 4
11 | 3
12 | 4
13 | 1
14 | 0
15 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_4:
--------------------------------------------------------------------------------
1 | 9
2 | 9
3 | 16
4 | 17
5 | 16
6 | 12
7 | 16
8 | 17
9 | 16
10 | 9
11 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_6_5:
--------------------------------------------------------------------------------
1 | 15
2 | 13
3 | 5
4 | 4
5 | 5
6 | 6
7 | 8
8 | 6
9 | 7
10 | 6
11 | 8
12 | 6
13 | 5
14 | 4
15 | 5
16 | 13
17 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_0:
--------------------------------------------------------------------------------
1 | 61
2 | 59
3 | 50
4 | 60
5 | 50
6 | 49
7 | 48
8 | 49
9 | 45
10 | 37
11 | 45
12 | 39
13 | 42
14 | 43
15 | 42
16 | 44
17 | 42
18 | 39
19 | 38
20 | 31
21 | 38
22 | 40
23 | 52
24 | 51
25 | 52
26 | 53
27 | 54
28 | 53
29 | 63
30 | 61
31 | 63
32 | 65
33 | 63
34 | 61
35 | 63
36 | 53
37 | 54
38 | 53
39 | 52
40 | 51
41 | 52
42 | 40
43 | 38
44 | 31
45 | 38
46 | 39
47 | 42
48 | 44
49 | 42
50 | 43
51 | 42
52 | 39
53 | 45
54 | 37
55 | 45
56 | 49
57 | 48
58 | 49
59 | 50
60 | 60
61 | 50
62 | 59
63 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_1:
--------------------------------------------------------------------------------
1 | 17
2 | 7
3 | 6
4 | 8
5 | 6
6 | 5
7 | 13
8 | 15
9 | 13
10 | 11
11 | 13
12 | 15
13 | 13
14 | 5
15 | 6
16 | 8
17 | 6
18 | 7
19 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_2:
--------------------------------------------------------------------------------
1 | 27
2 | 12
3 | 16
4 | 9
5 | 16
6 | 17
7 | 10
8 | 17
9 | 20
10 | 21
11 | 22
12 | 21
13 | 23
14 | 19
15 | 26
16 | 19
17 | 23
18 | 21
19 | 22
20 | 21
21 | 20
22 | 17
23 | 10
24 | 17
25 | 16
26 | 9
27 | 16
28 | 12
29 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_3:
--------------------------------------------------------------------------------
1 | 19
2 | 14
3 | 15
4 | 18
5 | 19
6 | 18
7 | 32
8 | 58
9 | 57
10 | 58
11 | 62
12 | 58
13 | 57
14 | 58
15 | 32
16 | 18
17 | 19
18 | 18
19 | 15
20 | 14
21 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_4:
--------------------------------------------------------------------------------
1 | 37
2 | 24
3 | 27
4 | 40
5 | 27
6 | 28
7 | 23
8 | 28
9 | 41
10 | 46
11 | 56
12 | 46
13 | 47
14 | 55
15 | 47
16 | 64
17 | 47
18 | 46
19 | 41
20 | 32
21 | 41
22 | 46
23 | 47
24 | 64
25 | 47
26 | 55
27 | 47
28 | 46
29 | 56
30 | 46
31 | 41
32 | 28
33 | 23
34 | 28
35 | 27
36 | 40
37 | 27
38 | 24
39 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_5:
--------------------------------------------------------------------------------
1 | 17
2 | 0
3 | 1
4 | 4
5 | 3
6 | 4
7 | 5
8 | 4
9 | 1
10 | 2
11 | 1
12 | 4
13 | 5
14 | 4
15 | 3
16 | 4
17 | 1
18 | 0
19 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_7_6:
--------------------------------------------------------------------------------
1 | 21
2 | 35
3 | 30
4 | 29
5 | 30
6 | 25
7 | 20
8 | 25
9 | 33
10 | 34
11 | 33
12 | 36
13 | 33
14 | 34
15 | 33
16 | 25
17 | 20
18 | 25
19 | 30
20 | 29
21 | 30
22 | 35
23 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_0:
--------------------------------------------------------------------------------
1 | 61
2 | 59
3 | 50
4 | 60
5 | 50
6 | 49
7 | 48
8 | 49
9 | 45
10 | 37
11 | 45
12 | 39
13 | 42
14 | 43
15 | 42
16 | 44
17 | 42
18 | 39
19 | 38
20 | 31
21 | 38
22 | 40
23 | 52
24 | 51
25 | 52
26 | 53
27 | 54
28 | 53
29 | 63
30 | 61
31 | 63
32 | 65
33 | 63
34 | 61
35 | 63
36 | 53
37 | 54
38 | 53
39 | 52
40 | 51
41 | 52
42 | 40
43 | 38
44 | 31
45 | 38
46 | 39
47 | 42
48 | 44
49 | 42
50 | 43
51 | 42
52 | 39
53 | 45
54 | 37
55 | 45
56 | 49
57 | 48
58 | 49
59 | 50
60 | 60
61 | 50
62 | 59
63 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_1:
--------------------------------------------------------------------------------
1 | 13
2 | 0
3 | 1
4 | 4
5 | 3
6 | 4
7 | 1
8 | 2
9 | 1
10 | 4
11 | 3
12 | 4
13 | 1
14 | 0
15 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_2:
--------------------------------------------------------------------------------
1 | 23
2 | 12
3 | 16
4 | 9
5 | 16
6 | 17
7 | 10
8 | 17
9 | 20
10 | 21
11 | 22
12 | 21
13 | 23
14 | 21
15 | 22
16 | 21
17 | 20
18 | 17
19 | 10
20 | 17
21 | 16
22 | 9
23 | 16
24 | 12
25 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_3:
--------------------------------------------------------------------------------
1 | 19
2 | 26
3 | 19
4 | 23
5 | 19
6 | 18
7 | 32
8 | 58
9 | 57
10 | 58
11 | 62
12 | 58
13 | 57
14 | 58
15 | 32
16 | 18
17 | 19
18 | 23
19 | 19
20 | 26
21 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_4:
--------------------------------------------------------------------------------
1 | 37
2 | 24
3 | 27
4 | 40
5 | 27
6 | 28
7 | 23
8 | 28
9 | 41
10 | 46
11 | 56
12 | 46
13 | 47
14 | 55
15 | 47
16 | 64
17 | 47
18 | 46
19 | 41
20 | 32
21 | 41
22 | 46
23 | 47
24 | 64
25 | 47
26 | 55
27 | 47
28 | 46
29 | 56
30 | 46
31 | 41
32 | 28
33 | 23
34 | 28
35 | 27
36 | 40
37 | 27
38 | 24
39 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_5:
--------------------------------------------------------------------------------
1 | 11
2 | 4
3 | 5
4 | 6
5 | 8
6 | 6
7 | 7
8 | 6
9 | 8
10 | 6
11 | 5
12 | 4
13 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_6:
--------------------------------------------------------------------------------
1 | 21
2 | 35
3 | 30
4 | 29
5 | 30
6 | 25
7 | 20
8 | 25
9 | 33
10 | 34
11 | 33
12 | 36
13 | 33
14 | 34
15 | 33
16 | 25
17 | 20
18 | 25
19 | 30
20 | 29
21 | 30
22 | 35
23 |
--------------------------------------------------------------------------------
/MSP/cumberland/cumberland_8_7:
--------------------------------------------------------------------------------
1 | 15
2 | 5
3 | 13
4 | 11
5 | 13
6 | 15
7 | 18
8 | 15
9 | 14
10 | 15
11 | 18
12 | 15
13 | 13
14 | 11
15 | 13
16 | 5
17 |
--------------------------------------------------------------------------------
/MSP/example/example_1_0:
--------------------------------------------------------------------------------
1 | 60
2 | 31
3 | 30
4 | 31
5 | 27
6 | 28
7 | 27
8 | 26
9 | 24
10 | 26
11 | 25
12 | 19
13 | 20
14 | 19
15 | 13
16 | 19
17 | 25
18 | 30
19 | 33
20 | 29
21 | 32
22 | 23
23 | 32
24 | 29
25 | 20
26 | 15
27 | 1
28 | 15
29 | 10
30 | 9
31 | 10
32 | 11
33 | 6
34 | 7
35 | 6
36 | 5
37 | 4
38 | 5
39 | 2
40 | 0
41 | 2
42 | 3
43 | 2
44 | 5
45 | 6
46 | 11
47 | 13
48 | 14
49 | 16
50 | 22
51 | 16
52 | 18
53 | 21
54 | 18
55 | 17
56 | 18
57 | 16
58 | 14
59 | 12
60 | 8
61 | 12
62 | 17
63 | 24
64 | 31
65 |
--------------------------------------------------------------------------------
/MSP/example/example_2_0:
--------------------------------------------------------------------------------
1 | 23
2 | 19
3 | 25
4 | 30
5 | 25
6 | 26
7 | 27
8 | 28
9 | 27
10 | 26
11 | 24
12 | 31
13 | 27
14 | 31
15 | 30
16 | 33
17 | 29
18 | 32
19 | 23
20 | 32
21 | 29
22 | 20
23 | 15
24 | 1
25 | 15
26 | 20
27 | 19
28 |
--------------------------------------------------------------------------------
/MSP/example/example_2_1:
--------------------------------------------------------------------------------
1 | 69
2 | 0
3 | 2
4 | 3
5 | 2
6 | 5
7 | 4
8 | 5
9 | 6
10 | 7
11 | 6
12 | 11
13 | 10
14 | 9
15 | 10
16 | 15
17 | 10
18 | 11
19 | 13
20 | 19
21 | 13
22 | 14
23 | 12
24 | 8
25 | 12
26 | 17
27 | 12
28 | 14
29 | 16
30 | 22
31 | 16
32 | 18
33 | 21
34 | 18
35 | 17
36 | 24
37 | 17
38 | 18
39 | 21
40 | 18
41 | 16
42 | 22
43 | 16
44 | 14
45 | 12
46 | 17
47 | 12
48 | 8
49 | 12
50 | 14
51 | 13
52 | 19
53 | 13
54 | 11
55 | 10
56 | 15
57 | 10
58 | 9
59 | 10
60 | 11
61 | 6
62 | 7
63 | 6
64 | 5
65 | 4
66 | 5
67 | 2
68 | 3
69 | 2
70 | 0
71 |
--------------------------------------------------------------------------------
/MSP/example/example_4_0:
--------------------------------------------------------------------------------
1 | 21
2 | 1
3 | 15
4 | 20
5 | 29
6 | 32
7 | 23
8 | 32
9 | 29
10 | 33
11 | 30
12 | 25
13 | 30
14 | 33
15 | 29
16 | 32
17 | 23
18 | 32
19 | 29
20 | 20
21 | 15
22 | 1
23 |
--------------------------------------------------------------------------------
/MSP/example/example_4_1:
--------------------------------------------------------------------------------
1 | 14
2 | 12
3 | 8
4 | 12
5 | 14
6 | 13
7 | 14
8 | 16
9 | 22
10 | 16
11 | 18
12 | 21
13 | 18
14 | 17
15 | 12
16 |
--------------------------------------------------------------------------------
/MSP/example/example_4_2:
--------------------------------------------------------------------------------
1 | 18
2 | 25
3 | 19
4 | 20
5 | 19
6 | 25
7 | 26
8 | 27
9 | 28
10 | 27
11 | 26
12 | 24
13 | 17
14 | 24
15 | 31
16 | 27
17 | 31
18 | 30
19 | 25
20 |
--------------------------------------------------------------------------------
/MSP/example/example_4_3:
--------------------------------------------------------------------------------
1 | 37
2 | 0
3 | 2
4 | 3
5 | 2
6 | 5
7 | 4
8 | 5
9 | 6
10 | 7
11 | 6
12 | 11
13 | 13
14 | 19
15 | 13
16 | 11
17 | 10
18 | 9
19 | 10
20 | 15
21 | 10
22 | 9
23 | 10
24 | 11
25 | 13
26 | 19
27 | 13
28 | 11
29 | 6
30 | 7
31 | 6
32 | 5
33 | 4
34 | 5
35 | 2
36 | 3
37 | 2
38 | 0
39 |
--------------------------------------------------------------------------------
/MSP/example/example_6_0:
--------------------------------------------------------------------------------
1 | 11
2 | 24
3 | 17
4 | 24
5 | 26
6 | 27
7 | 28
8 | 27
9 | 31
10 | 30
11 | 31
12 | 24
13 |
--------------------------------------------------------------------------------
/MSP/example/example_6_1:
--------------------------------------------------------------------------------
1 | 25
2 | 7
3 | 6
4 | 11
5 | 10
6 | 9
7 | 10
8 | 11
9 | 13
10 | 14
11 | 12
12 | 8
13 | 12
14 | 17
15 | 12
16 | 8
17 | 12
18 | 14
19 | 13
20 | 11
21 | 10
22 | 9
23 | 10
24 | 11
25 | 6
26 | 7
27 |
--------------------------------------------------------------------------------
/MSP/example/example_6_2:
--------------------------------------------------------------------------------
1 | 11
2 | 20
3 | 29
4 | 32
5 | 23
6 | 32
7 | 29
8 | 33
9 | 30
10 | 25
11 | 30
12 | 33
13 | 29
14 | 32
15 | 23
16 | 32
17 | 29
18 | 20
19 |
--------------------------------------------------------------------------------
/MSP/example/example_6_3:
--------------------------------------------------------------------------------
1 | 15
2 | 0
3 | 2
4 | 3
5 | 2
6 | 5
7 | 6
8 | 5
9 | 4
10 | 5
11 | 6
12 | 5
13 | 2
14 | 3
15 | 2
16 | 0
17 |
--------------------------------------------------------------------------------
/MSP/example/example_6_4:
--------------------------------------------------------------------------------
1 | 19
2 | 1
3 | 15
4 | 10
5 | 15
6 | 20
7 | 19
8 | 13
9 | 19
10 | 25
11 | 26
12 | 25
13 | 19
14 | 13
15 | 19
16 | 20
17 | 15
18 | 10
19 | 15
20 | 1
21 |
--------------------------------------------------------------------------------
/MSP/example/example_6_5:
--------------------------------------------------------------------------------
1 | 15
2 | 21
3 | 18
4 | 17
5 | 18
6 | 16
7 | 14
8 | 16
9 | 22
10 | 16
11 | 14
12 | 16
13 | 18
14 | 17
15 | 18
16 | 21
17 |
--------------------------------------------------------------------------------
/MSP/example/example_8_0:
--------------------------------------------------------------------------------
1 | 11
2 | 31
3 | 30
4 | 33
5 | 29
6 | 32
7 | 23
8 | 32
9 | 29
10 | 33
11 | 30
12 | 31
13 |
--------------------------------------------------------------------------------
/MSP/example/example_8_1:
--------------------------------------------------------------------------------
1 | 15
2 | 21
3 | 18
4 | 17
5 | 18
6 | 16
7 | 14
8 | 16
9 | 22
10 | 16
11 | 14
12 | 16
13 | 18
14 | 17
15 | 18
16 | 21
17 |
--------------------------------------------------------------------------------
/MSP/example/example_8_2:
--------------------------------------------------------------------------------
1 | 13
2 | 28
3 | 27
4 | 26
5 | 27
6 | 31
7 | 24
8 | 26
9 | 24
10 | 31
11 | 27
12 | 26
13 | 27
14 | 28
15 |
--------------------------------------------------------------------------------
/MSP/example/example_8_3:
--------------------------------------------------------------------------------
1 | 17
2 | 7
3 | 6
4 | 11
5 | 13
6 | 11
7 | 10
8 | 9
9 | 10
10 | 15
11 | 10
12 | 9
13 | 10
14 | 11
15 | 13
16 | 11
17 | 6
18 | 7
19 |
--------------------------------------------------------------------------------
/MSP/example/example_8_4:
--------------------------------------------------------------------------------
1 | 7
2 | 29
3 | 20
4 | 15
5 | 1
6 | 15
7 | 20
8 | 29
9 |
--------------------------------------------------------------------------------
/MSP/example/example_8_5:
--------------------------------------------------------------------------------
1 | 13
2 | 13
3 | 14
4 | 12
5 | 8
6 | 12
7 | 17
8 | 24
9 | 17
10 | 12
11 | 8
12 | 12
13 | 14
14 | 13
15 |
--------------------------------------------------------------------------------
/MSP/example/example_8_6:
--------------------------------------------------------------------------------
1 | 15
2 | 13
3 | 19
4 | 20
5 | 19
6 | 25
7 | 26
8 | 25
9 | 30
10 | 25
11 | 26
12 | 25
13 | 19
14 | 20
15 | 19
16 | 13
17 |
--------------------------------------------------------------------------------
/MSP/example/example_8_7:
--------------------------------------------------------------------------------
1 | 15
2 | 0
3 | 2
4 | 3
5 | 2
6 | 5
7 | 6
8 | 5
9 | 4
10 | 5
11 | 6
12 | 5
13 | 2
14 | 3
15 | 2
16 | 0
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_1_0:
--------------------------------------------------------------------------------
1 | 49
2 | 0
3 | 1
4 | 6
5 | 5
6 | 10
7 | 11
8 | 16
9 | 15
10 | 20
11 | 21
12 | 22
13 | 17
14 | 18
15 | 23
16 | 24
17 | 19
18 | 14
19 | 9
20 | 4
21 | 3
22 | 2
23 | 7
24 | 12
25 | 13
26 | 8
27 | 13
28 | 12
29 | 7
30 | 2
31 | 3
32 | 4
33 | 9
34 | 14
35 | 19
36 | 24
37 | 23
38 | 18
39 | 17
40 | 22
41 | 21
42 | 20
43 | 15
44 | 16
45 | 11
46 | 10
47 | 5
48 | 6
49 | 1
50 | 0
51 |
--------------------------------------------------------------------------------
/MSP/grid/grid_2_0:
--------------------------------------------------------------------------------
1 | 33
2 | 0
3 | 5
4 | 10
5 | 15
6 | 16
7 | 21
8 | 20
9 | 15
10 | 20
11 | 21
12 | 22
13 | 23
14 | 22
15 | 21
16 | 16
17 | 15
18 | 10
19 | 5
20 | 6
21 | 1
22 | 6
23 | 7
24 | 2
25 | 7
26 | 8
27 | 3
28 | 8
29 | 9
30 | 4
31 | 3
32 | 2
33 | 1
34 | 0
35 |
--------------------------------------------------------------------------------
/MSP/grid/grid_2_1:
--------------------------------------------------------------------------------
1 | 29
2 | 11
3 | 6
4 | 11
5 | 10
6 | 11
7 | 12
8 | 7
9 | 12
10 | 17
11 | 12
12 | 13
13 | 8
14 | 13
15 | 14
16 | 9
17 | 14
18 | 13
19 | 18
20 | 19
21 | 14
22 | 19
23 | 24
24 | 23
25 | 18
26 | 17
27 | 22
28 | 17
29 | 16
30 | 11
31 |
--------------------------------------------------------------------------------
/MSP/grid/grid_3_0:
--------------------------------------------------------------------------------
1 | 33
2 | 12
3 | 11
4 | 10
5 | 5
6 | 0
7 | 1
8 | 6
9 | 5
10 | 6
11 | 11
12 | 6
13 | 1
14 | 0
15 | 5
16 | 10
17 | 11
18 | 12
19 | 13
20 | 14
21 | 19
22 | 14
23 | 13
24 | 18
25 | 19
26 | 24
27 | 23
28 | 22
29 | 17
30 | 22
31 | 23
32 | 18
33 | 17
34 | 12
35 |
--------------------------------------------------------------------------------
/MSP/grid/grid_3_1:
--------------------------------------------------------------------------------
1 | 19
2 | 3
3 | 8
4 | 3
5 | 4
6 | 9
7 | 14
8 | 9
9 | 8
10 | 13
11 | 8
12 | 7
13 | 6
14 | 7
15 | 12
16 | 7
17 | 2
18 | 1
19 | 2
20 | 3
21 |
--------------------------------------------------------------------------------
/MSP/grid/grid_3_2:
--------------------------------------------------------------------------------
1 | 13
2 | 15
3 | 10
4 | 15
5 | 16
6 | 11
7 | 16
8 | 17
9 | 16
10 | 21
11 | 22
12 | 21
13 | 20
14 | 15
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_4_0:
--------------------------------------------------------------------------------
1 | 17
2 | 0
3 | 1
4 | 6
5 | 7
6 | 2
7 | 3
8 | 8
9 | 9
10 | 4
11 | 9
12 | 8
13 | 3
14 | 2
15 | 7
16 | 6
17 | 1
18 | 0
19 |
--------------------------------------------------------------------------------
/MSP/grid/grid_4_1:
--------------------------------------------------------------------------------
1 | 15
2 | 13
3 | 8
4 | 13
5 | 12
6 | 13
7 | 14
8 | 9
9 | 14
10 | 19
11 | 24
12 | 23
13 | 24
14 | 19
15 | 18
16 | 13
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_4_2:
--------------------------------------------------------------------------------
1 | 17
2 | 15
3 | 10
4 | 5
5 | 0
6 | 5
7 | 6
8 | 5
9 | 10
10 | 15
11 | 16
12 | 21
13 | 22
14 | 23
15 | 22
16 | 21
17 | 20
18 | 15
19 |
--------------------------------------------------------------------------------
/MSP/grid/grid_4_3:
--------------------------------------------------------------------------------
1 | 17
2 | 11
3 | 6
4 | 11
5 | 10
6 | 11
7 | 12
8 | 7
9 | 12
10 | 17
11 | 18
12 | 23
13 | 18
14 | 17
15 | 22
16 | 17
17 | 16
18 | 11
19 |
--------------------------------------------------------------------------------
/MSP/grid/grid_5_0:
--------------------------------------------------------------------------------
1 | 13
2 | 16
3 | 21
4 | 16
5 | 15
6 | 10
7 | 15
8 | 20
9 | 21
10 | 22
11 | 23
12 | 22
13 | 17
14 | 16
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_5_1:
--------------------------------------------------------------------------------
1 | 15
2 | 13
3 | 8
4 | 13
5 | 12
6 | 13
7 | 14
8 | 9
9 | 14
10 | 19
11 | 24
12 | 23
13 | 24
14 | 19
15 | 18
16 | 13
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_5_2:
--------------------------------------------------------------------------------
1 | 9
2 | 3
3 | 8
4 | 3
5 | 4
6 | 9
7 | 8
8 | 7
9 | 2
10 | 3
11 |
--------------------------------------------------------------------------------
/MSP/grid/grid_5_3:
--------------------------------------------------------------------------------
1 | 15
2 | 11
3 | 6
4 | 11
5 | 10
6 | 11
7 | 12
8 | 7
9 | 12
10 | 17
11 | 18
12 | 23
13 | 18
14 | 17
15 | 16
16 | 11
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_5_4:
--------------------------------------------------------------------------------
1 | 11
2 | 0
3 | 1
4 | 2
5 | 1
6 | 6
7 | 7
8 | 6
9 | 5
10 | 10
11 | 5
12 | 0
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_0:
--------------------------------------------------------------------------------
1 | 13
2 | 15
3 | 10
4 | 15
5 | 16
6 | 21
7 | 22
8 | 23
9 | 24
10 | 23
11 | 22
12 | 21
13 | 20
14 | 15
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_1:
--------------------------------------------------------------------------------
1 | 25
2 | 12
3 | 17
4 | 16
5 | 17
6 | 22
7 | 17
8 | 18
9 | 23
10 | 18
11 | 19
12 | 24
13 | 19
14 | 14
15 | 19
16 | 24
17 | 19
18 | 18
19 | 23
20 | 18
21 | 17
22 | 22
23 | 17
24 | 16
25 | 17
26 | 12
27 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_2:
--------------------------------------------------------------------------------
1 | 7
2 | 3
3 | 4
4 | 9
5 | 8
6 | 7
7 | 2
8 | 3
9 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_3:
--------------------------------------------------------------------------------
1 | 15
2 | 6
3 | 11
4 | 10
5 | 11
6 | 16
7 | 11
8 | 12
9 | 7
10 | 12
11 | 11
12 | 16
13 | 11
14 | 10
15 | 11
16 | 6
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_4:
--------------------------------------------------------------------------------
1 | 11
2 | 0
3 | 1
4 | 2
5 | 1
6 | 6
7 | 7
8 | 6
9 | 5
10 | 10
11 | 5
12 | 0
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_6_5:
--------------------------------------------------------------------------------
1 | 15
2 | 8
3 | 13
4 | 12
5 | 13
6 | 18
7 | 13
8 | 14
9 | 9
10 | 14
11 | 13
12 | 18
13 | 13
14 | 12
15 | 13
16 | 8
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_0:
--------------------------------------------------------------------------------
1 | 17
2 | 18
3 | 23
4 | 22
5 | 21
6 | 20
7 | 21
8 | 16
9 | 15
10 | 20
11 | 15
12 | 16
13 | 21
14 | 20
15 | 21
16 | 22
17 | 23
18 | 18
19 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_1:
--------------------------------------------------------------------------------
1 | 15
2 | 18
3 | 17
4 | 12
5 | 17
6 | 16
7 | 17
8 | 22
9 | 17
10 | 18
11 | 19
12 | 14
13 | 19
14 | 24
15 | 23
16 | 18
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_2:
--------------------------------------------------------------------------------
1 | 13
2 | 1
3 | 2
4 | 3
5 | 2
6 | 7
7 | 8
8 | 3
9 | 8
10 | 7
11 | 2
12 | 3
13 | 2
14 | 1
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_3:
--------------------------------------------------------------------------------
1 | 15
2 | 6
3 | 11
4 | 10
5 | 11
6 | 16
7 | 11
8 | 12
9 | 7
10 | 12
11 | 11
12 | 16
13 | 11
14 | 10
15 | 11
16 | 6
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_4:
--------------------------------------------------------------------------------
1 | 11
2 | 0
3 | 1
4 | 6
5 | 7
6 | 6
7 | 5
8 | 10
9 | 15
10 | 10
11 | 5
12 | 0
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_5:
--------------------------------------------------------------------------------
1 | 15
2 | 8
3 | 13
4 | 12
5 | 13
6 | 18
7 | 13
8 | 14
9 | 9
10 | 14
11 | 13
12 | 18
13 | 13
14 | 12
15 | 13
16 | 8
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_7_6:
--------------------------------------------------------------------------------
1 | 7
2 | 8
3 | 9
4 | 4
5 | 3
6 | 4
7 | 9
8 | 8
9 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_0:
--------------------------------------------------------------------------------
1 | 13
2 | 3
3 | 4
4 | 9
5 | 8
6 | 7
7 | 2
8 | 3
9 | 2
10 | 7
11 | 8
12 | 9
13 | 4
14 | 3
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_1:
--------------------------------------------------------------------------------
1 | 11
2 | 8
3 | 13
4 | 12
5 | 13
6 | 14
7 | 9
8 | 14
9 | 13
10 | 12
11 | 13
12 | 8
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_2:
--------------------------------------------------------------------------------
1 | 11
2 | 23
3 | 22
4 | 21
5 | 20
6 | 15
7 | 16
8 | 15
9 | 20
10 | 21
11 | 22
12 | 23
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_3:
--------------------------------------------------------------------------------
1 | 15
2 | 6
3 | 11
4 | 10
5 | 11
6 | 16
7 | 11
8 | 12
9 | 7
10 | 12
11 | 11
12 | 16
13 | 11
14 | 10
15 | 11
16 | 6
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_4:
--------------------------------------------------------------------------------
1 | 11
2 | 0
3 | 1
4 | 2
5 | 1
6 | 6
7 | 7
8 | 6
9 | 1
10 | 2
11 | 1
12 | 0
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_5:
--------------------------------------------------------------------------------
1 | 11
2 | 14
3 | 19
4 | 18
5 | 19
6 | 24
7 | 23
8 | 24
9 | 19
10 | 18
11 | 19
12 | 14
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_6:
--------------------------------------------------------------------------------
1 | 11
2 | 0
3 | 5
4 | 6
5 | 5
6 | 10
7 | 15
8 | 10
9 | 5
10 | 6
11 | 5
12 | 0
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_8_7:
--------------------------------------------------------------------------------
1 | 19
2 | 12
3 | 17
4 | 16
5 | 17
6 | 22
7 | 17
8 | 18
9 | 23
10 | 18
11 | 13
12 | 18
13 | 23
14 | 18
15 | 17
16 | 22
17 | 17
18 | 16
19 | 17
20 | 12
21 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_0:
--------------------------------------------------------------------------------
1 | 13
2 | 10
3 | 15
4 | 16
5 | 15
6 | 20
7 | 21
8 | 16
9 | 21
10 | 20
11 | 15
12 | 16
13 | 15
14 | 10
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_1:
--------------------------------------------------------------------------------
1 | 11
2 | 8
3 | 13
4 | 12
5 | 13
6 | 14
7 | 9
8 | 14
9 | 13
10 | 12
11 | 13
12 | 8
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_2:
--------------------------------------------------------------------------------
1 | 13
2 | 1
3 | 2
4 | 3
5 | 2
6 | 7
7 | 8
8 | 3
9 | 8
10 | 7
11 | 2
12 | 3
13 | 2
14 | 1
15 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_3:
--------------------------------------------------------------------------------
1 | 15
2 | 6
3 | 11
4 | 10
5 | 11
6 | 16
7 | 11
8 | 12
9 | 7
10 | 12
11 | 11
12 | 16
13 | 11
14 | 10
15 | 11
16 | 6
17 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_4:
--------------------------------------------------------------------------------
1 | 9
2 | 0
3 | 1
4 | 6
5 | 7
6 | 6
7 | 5
8 | 10
9 | 5
10 | 0
11 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_5:
--------------------------------------------------------------------------------
1 | 11
2 | 14
3 | 19
4 | 18
5 | 19
6 | 24
7 | 23
8 | 24
9 | 19
10 | 18
11 | 19
12 | 14
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_6:
--------------------------------------------------------------------------------
1 | 7
2 | 8
3 | 9
4 | 4
5 | 3
6 | 4
7 | 9
8 | 8
9 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_7:
--------------------------------------------------------------------------------
1 | 11
2 | 12
3 | 17
4 | 16
5 | 17
6 | 18
7 | 13
8 | 18
9 | 17
10 | 16
11 | 17
12 | 12
13 |
--------------------------------------------------------------------------------
/MSP/grid/grid_9_8:
--------------------------------------------------------------------------------
1 | 11
2 | 17
3 | 22
4 | 21
5 | 22
6 | 23
7 | 18
8 | 23
9 | 22
10 | 21
11 | 22
12 | 17
13 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | include $(shell rospack find mk)/cmake.mk
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | =================================
2 | patrolling_sim v2.2.4 (Jan. 2022)
3 | =================================
4 |
5 | patrolling_sim for ROS (Noetic) -- catkin version
6 |
7 | ## Instalation instructions for Noetic version:
8 |
9 | - For the ROS Noetic version to work it needs to use a modified version of stage_ros. Please clone this [repo](https://github.com/imranlivt/stage_ros) into your catkin workspace and compile it again.
10 |
11 | ## Authors:
12 |
13 | ### Main framework and basic algorithms:
14 | * David Portugal (2011-2014), Luca Iocchi (2014-2016)
15 |
16 | ### Additional algorithms:
17 | * DTAP: Alessandro Farinelli (2014)
18 |
19 | ### ROS Noetic migration:
20 | * João Pedro Castilho (2022)
21 |
22 | =================================
23 | # patrolling_sim v2.2.2 (Dec. 2016)
24 | =================================
25 |
26 | patrolling_sim for ROS (Groovy/Hydro/Indigo) -- catkin version
27 |
28 | Authors:
29 |
30 | Main framework and basic algorithms:
31 | David Portugal (2011-2014), Luca Iocchi (2014-2016)
32 |
33 | Additional algorithms:
34 | * DTAP: Alessandro Farinelli (2014)
35 |
36 |
37 | *** NOTE ***
38 | Fork https://github.com/gennari/patrolling_sim implements a distributed execution
39 | of the patrolling environment that can be used also on real robots.
40 | These two branches will be merged soon.
41 |
42 | ************
43 |
44 | This package contains the implementation of several algorithms for multi-robot patrolling and a general structure of a PatrolAgent that can be extended to implement other ones.
45 | It extends previous version of patrolling_sim with an improved structure of the code that allows easy integration of new algorithms, an improved navigation configuration that allows the robots to move at 1 m/s and to avoid most of conflicting situations, and a better management of the experiments and generation of the results.
46 |
47 | The software is released as a ROS catkin package and requires the navigation stack (e.g., ros-indigo-navigation).
48 | For a quick try, just compile the workspace ('catkin_make'), start the script './start_experiment.py',
49 | make your choices and see the experiment running.
50 |
51 | WARNING: sometimes (on some machines) the very first run does not work, because of timing problems with roscore.
52 | Either restart the experiment a second time, or run roscore once before starting the experiment.
53 |
54 | Several maps are available in the 'maps' folder. For map X the patrol graph is visible in the file
55 | maps/X/X-graph.png
56 |
57 | Several algorithms have been implemented in the 'src' folder. Each method is implemented through a class 'X_Agent' that inherits from the abstract class 'PatrolAgent' many common services and functions.
58 |
59 | Results of the experiments are stored in the 'results' folder.
60 |
61 | In order to run a particular experiment or a set of experiments, use the run-exp.sh script template.
62 | It is convenient to copy this file in a new file that you can edit as you wish.
63 | For example, the current version of run_exp.sh allows to run an experiment for
64 | DISlabs, with 8 robots, 30 minutes, using DTAP algorithm, and other standard parameters.
65 | After 30 minutes the experiment terminates and the results will be available in the files
66 | results/{map}_{n.robots}/{algorithm}/{machine}/{date}*
67 |
68 | The following result files are produced:
69 |
70 | 1) info.csv - contains a summary of the results of the experiment in a CSV format with the following values:
71 |
72 | Map ; N. robots ; Goal wait time ; Communication delay ; Navigation module ; MRP Algorithm ; MRP Algorithm parameters ; Machine ; Date ;
73 | Sim Time ; Real time ; Interferences ; Termination status ; Idleness min ; avg ; stddev ; max ;
74 | Interference rate ; Total visits ; Avg visit per node ; Complete patrol cycles
75 |
76 | 2) results.txt - contains some information about the evolution of results in a text format
77 |
78 | 3) idleness.csv - contains the following results in a CSV format
79 |
80 | Time ; Robot ; Node ; Node Idleness ; Interferences
81 |
82 | 4) timeresults.csv - contains evolution over time of the following results in a CSV format
83 |
84 | Time ; Idleness min ; avg ; stddev ; max ; Interferences
85 |
86 |
87 |
88 | The script can be extended to run multiple experiments in a single session, by just adding new commands like the one in the examples (possibly with different parameters).
89 |
90 | ************
91 |
92 | *** NEW NAVIGATION MODULES ***
93 |
94 | Default navigation modules are standard ROS nodes amcl (localization) and move_base (path planning and motion control).
95 | They work (usually) fine, but they require many computational resources that may limit the simulation of many robots
96 | in a single machine.
97 |
98 | New navigation modules, called spqrel_navigation, are available at https://github.com/LCAS/spqrel_navigation/wiki.
99 | The localizer and the planner have the same interface as amcl and move_base so they can be used in their replacement
100 | by just changing the launch file. To install spqrel_navigation, follow instructions in the web site.
101 |
102 | The spqrel_navigation modules have been fully integrated in patrolling_sim. Just select spqrel_navigation instead of ros
103 | as navigation module either in the start_experiment.py GUI or in the run_exp.sh script.
104 |
105 | ************
106 |
107 | *** NEW SUPPORT FOR EXTENDED STAGE API ***
108 |
109 | NOTE: Extended API for stage are available with customized versions of stage and stageros.
110 | (See https://github.com/iocchi/stage_ros for details).
111 |
112 | With the use of the extended API it is possible to control activation of some GUI elements
113 | in Stage (e.g., footprints, simulation speedup, and screenshots).
114 | Set the Custom Stage flag to true in run_exp.sh script to activate these functions.
115 |
116 |
117 |
--------------------------------------------------------------------------------
/abort_experiment.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | rostopic pub /stageGUIRequest std_msgs/String "data: 'screenshot'" --once
3 | rosparam set /simulation_abort true
4 | rosparam get /simulation_abort
5 |
--------------------------------------------------------------------------------
/beep.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/beep.wav
--------------------------------------------------------------------------------
/kill_all.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | sleep 5
3 | #killall -9 xterm
4 | kill $(ps aux | grep ros | grep -v grep | awk '{print $2}')
5 | #sleep 5
6 | #kill $(ps aux | grep monitor | grep -v grep | awk '{print $2}')
7 |
8 |
--------------------------------------------------------------------------------
/launch/map.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/launch/robot.launch:
--------------------------------------------------------------------------------
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 | srrg
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/launch/robot_fake_loc.launch:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/mainpage.dox:
--------------------------------------------------------------------------------
1 | /**
2 | \mainpage
3 | \htmlinclude manifest.html
4 |
5 | \b patrolling_sim is ...
6 |
7 |
10 |
11 |
12 | \section codeapi Code API
13 |
14 |
24 |
25 |
26 | */
27 |
--------------------------------------------------------------------------------
/maps/1r5/1r5 Graph Info:
--------------------------------------------------------------------------------
1 | #Vertices
2 | Width (px)
3 | Height (px)
4 | Resolution (m/px)
5 |
6 | ID Vertex
7 | X coordinate (px)
8 | Y coordinate (px)
9 | # Neighbors
10 | ID Neighbor 1
11 | Direction
12 | Cost
13 | ID Neighbor 2
14 | Direction
15 | Cost
16 | ...
17 |
18 | ID Vertex
19 | X coordinate (px)
20 | Y coordinate (px)
21 | # Neighbors
22 | ...
--------------------------------------------------------------------------------
/maps/1r5/1r5.graph:
--------------------------------------------------------------------------------
1 | 12
2 | 239
3 | 249
4 | 0.05
5 | 0
6 | 0
7 |
8 | 0
9 | 20
10 | 150
11 | 1
12 | 1
13 | E
14 | 15
15 |
16 | 1
17 | 35
18 | 152
19 | 3
20 | 0
21 | SW
22 | 15
23 | 3
24 | N
25 | 140
26 | 5
27 | SE
28 | 81
29 |
30 | 2
31 | 54
32 | 81
33 | 1
34 | 4
35 | S
36 | 84
37 |
38 | 3
39 | 88
40 | 192
41 | 1
42 | 1
43 | N
44 | 140
45 |
46 | 4
47 | 114
48 | 50
49 | 3
50 | 2
51 | W
52 | 84
53 | 7
54 | N
55 | 40
56 | 6
57 | S
58 | 31
59 |
60 | 5
61 | 116
62 | 147
63 | 3
64 | 1
65 | NW
66 | 81
67 | 7
68 | S
69 | 57
70 | 10
71 | NE
72 | 87
73 |
74 | 6
75 | 117
76 | 19
77 | 1
78 | 4
79 | N
80 | 31
81 |
82 | 7
83 | 120
84 | 90
85 | 3
86 | 5
87 | N
88 | 57
89 | 4
90 | S
91 | 40
92 | 9
93 | E
94 | 166
95 |
96 | 8
97 | 139
98 | 196
99 | 1
100 | 10
101 | N
102 | 133
103 |
104 | 9
105 | 165
106 | 40
107 | 1
108 | 7
109 | E
110 | 166
111 |
112 | 10
113 | 203
114 | 152
115 | 3
116 | 5
117 | SW
118 | 87
119 | 8
120 | N
121 | 133
122 | 11
123 | SE
124 | 16
125 |
126 | 11
127 | 219
128 | 150
129 | 1
130 | 10
131 | W
132 | 16
--------------------------------------------------------------------------------
/maps/1r5/1r5.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/1r5/1r5.pgm
--------------------------------------------------------------------------------
/maps/1r5/1r5.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 720 692 1] # Tamanho da janela em pixeis
7 | rotate [ 0.000 0.000 ] # Mapa não rodado
8 | center [5.975 6.225 ] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 35 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | floorplan (
14 | size [11.95 12.45 1] #metros (a imagem tem 239x249pixeis => 0.05 resolução no .yaml)
15 | pose [5.975 6.225 0 0]
16 | bitmap "1r5.pgm"
17 | )
18 |
19 | include "robots.inc"
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/maps/1r5/1r5.yaml:
--------------------------------------------------------------------------------
1 | image: 1r5.pgm
2 | resolution: 0.05
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0 #se negate=1 -> preto-free & branco-obstaculos
5 | occupied_thresh: 0.65
6 | free_thresh: 0.19
--------------------------------------------------------------------------------
/maps/1r5/robots.inc:
--------------------------------------------------------------------------------
1 | crobot( pose [ 4.4 9.6 0 90 ] name "robot0" color "blue")
2 | crobot( pose [ 2.7 4.05 0 90 ] name "robot1" color "red")
3 |
--------------------------------------------------------------------------------
/maps/DIAG_floor1/DIAG_floor1-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/DIAG_floor1/DIAG_floor1-graph.png
--------------------------------------------------------------------------------
/maps/DIAG_floor1/DIAG_floor1.graph:
--------------------------------------------------------------------------------
1 | 60
2 | 2289
3 | 927
4 | 0.05
5 | 0
6 | 0
7 |
8 | 0
9 | 208
10 | 386
11 | 1
12 | 6
13 | E
14 | 28
15 |
16 | 1
17 | 217
18 | 469
19 | 1
20 | 5
21 | E
22 | 19
23 |
24 | 2
25 | 219
26 | 728
27 | 1
28 | 7
29 | S
30 | 20
31 |
32 | 3
33 | 219
34 | 215
35 | 1
36 | 9
37 | E
38 | 27
39 |
40 | 4
41 | 222
42 | 300
43 | 1
44 | 8
45 | E
46 | 24
47 |
48 | 5
49 | 236
50 | 469
51 | 3
52 | 1
53 | W
54 | 19
55 | 7
56 | N
57 | 242
58 | 6
59 | S
60 | 83
61 |
62 | 6
63 | 236
64 | 386
65 | 3
66 | 0
67 | W
68 | 28
69 | 5
70 | N
71 | 83
72 | 8
73 | S
74 | 86
75 |
76 | 7
77 | 238
78 | 711
79 | 3
80 | 2
81 | W
82 | 20
83 | 5
84 | S
85 | 242
86 | 10
87 | E
88 | 18
89 |
90 | 8
91 | 246
92 | 300
93 | 3
94 | 4
95 | W
96 | 24
97 | 6
98 | N
99 | 86
100 | 9
101 | S
102 | 81
103 |
104 | 9
105 | 246
106 | 219
107 | 3
108 | 3
109 | W
110 | 27
111 | 8
112 | N
113 | 81
114 | 12
115 | E
116 | 85
117 |
118 | 10
119 | 250
120 | 726
121 | 1
122 | 7
123 | S
124 | 18
125 |
126 | 11
127 | 331
128 | 242
129 | 1
130 | 12
131 | S
132 | 23
133 |
134 | 12
135 | 331
136 | 219
137 | 4
138 | 9
139 | W
140 | 85
141 | 11
142 | N
143 | 23
144 | 13
145 | S
146 | 27
147 | 14
148 | E
149 | 85
150 |
151 | 13
152 | 331
153 | 192
154 | 1
155 | 12
156 | N
157 | 27
158 |
159 | 14
160 | 416
161 | 219
162 | 3
163 | 12
164 | W
165 | 85
166 | 15
167 | S
168 | 25
169 | 16
170 | E
171 | 262
172 |
173 | 15
174 | 416
175 | 194
176 | 1
177 | 14
178 | N
179 | 25
180 |
181 | 16
182 | 678
183 | 219
184 | 3
185 | 14
186 | W
187 | 262
188 | 17
189 | S
190 | 24
191 | 19
192 | E
193 | 88
194 |
195 | 17
196 | 678
197 | 195
198 | 1
199 | 16
200 | N
201 | 24
202 |
203 | 18
204 | 765
205 | 196
206 | 1
207 | 19
208 | N
209 | 23
210 |
211 | 19
212 | 766
213 | 219
214 | 4
215 | 16
216 | W
217 | 88
218 | 20
219 | N
220 | 27
221 | 18
222 | S
223 | 23
224 | 22
225 | E
226 | 86
227 |
228 | 20
229 | 767
230 | 246
231 | 1
232 | 19
233 | S
234 | 27
235 |
236 | 21
237 | 852
238 | 249
239 | 1
240 | 22
241 | S
242 | 30
243 |
244 | 22
245 | 852
246 | 219
247 | 3
248 | 19
249 | W
250 | 86
251 | 21
252 | N
253 | 30
254 | 25
255 | E
256 | 129
257 |
258 | 23
259 | 921
260 | 292
261 | 1
262 | 24
263 | E
264 | 47
265 |
266 | 24
267 | 968
268 | 292
269 | 3
270 | 23
271 | W
272 | 47
273 | 25
274 | S
275 | 63
276 | 26
277 | E
278 | 41
279 |
280 | 25
281 | 981
282 | 229
283 | 3
284 | 22
285 | W
286 | 129
287 | 24
288 | N
289 | 63
290 | 28
291 | E
292 | 79
293 |
294 | 26
295 | 1009
296 | 292
297 | 1
298 | 24
299 | W
300 | 41
301 |
302 | 27
303 | 1057
304 | 368
305 | 2
306 | 28
307 | S
308 | 141
309 | 30
310 | E
311 | 88
312 |
313 | 28
314 | 1060
315 | 227
316 | 4
317 | 25
318 | W
319 | 79
320 | 27
321 | N
322 | 141
323 | 29
324 | S
325 | 94
326 | 31
327 | E
328 | 85
329 |
330 | 29
331 | 1061
332 | 133
333 | 2
334 | 28
335 | N
336 | 94
337 | 32
338 | E
339 | 88
340 |
341 | 30
342 | 1145
343 | 368
344 | 3
345 | 27
346 | W
347 | 88
348 | 31
349 | S
350 | 141
351 | 33
352 | E
353 | 83
354 |
355 | 31
356 | 1145
357 | 227
358 | 4
359 | 28
360 | W
361 | 85
362 | 30
363 | N
364 | 141
365 | 32
366 | S
367 | 94
368 | 34
369 | E
370 | 89
371 |
372 | 32
373 | 1149
374 | 133
375 | 3
376 | 29
377 | W
378 | 88
379 | 31
380 | N
381 | 94
382 | 35
383 | E
384 | 85
385 |
386 | 33
387 | 1228
388 | 368
389 | 2
390 | 30
391 | W
392 | 83
393 | 34
394 | S
395 | 134
396 |
397 | 34
398 | 1234
399 | 234
400 | 4
401 | 31
402 | W
403 | 89
404 | 33
405 | N
406 | 134
407 | 35
408 | S
409 | 101
410 | 38
411 | E
412 | 95
413 |
414 | 35
415 | 1234
416 | 133
417 | 2
418 | 32
419 | W
420 | 85
421 | 34
422 | N
423 | 101
424 |
425 | 36
426 | 1282
427 | 301
428 | 1
429 | 37
430 | E
431 | 34
432 |
433 | 37
434 | 1316
435 | 301
436 | 3
437 | 36
438 | W
439 | 34
440 | 38
441 | S
442 | 58
443 | 39
444 | E
445 | 43
446 |
447 | 38
448 | 1329
449 | 243
450 | 3
451 | 34
452 | W
453 | 95
454 | 37
455 | N
456 | 58
457 | 41
458 | E
459 | 365
460 |
461 | 39
462 | 1359
463 | 305
464 | 1
465 | 37
466 | W
467 | 43
468 |
469 | 40
470 | 1694
471 | 260
472 | 1
473 | 41
474 | S
475 | 21
476 |
477 | 41
478 | 1694
479 | 239
480 | 3
481 | 38
482 | W
483 | 365
484 | 40
485 | N
486 | 21
487 | 42
488 | E
489 | 176
490 |
491 | 42
492 | 1870
493 | 239
494 | 3
495 | 41
496 | W
497 | 176
498 | 43
499 | S
500 | 26
501 | 46
502 | E
503 | 87
504 |
505 | 43
506 | 1870
507 | 213
508 | 1
509 | 42
510 | N
511 | 26
512 |
513 | 44
514 | 1900
515 | 818
516 | 1
517 | 45
518 | S
519 | 65
520 |
521 | 45
522 | 1900
523 | 753
524 | 2
525 | 44
526 | N
527 | 65
528 | 48
529 | E
530 | 86
531 |
532 | 46
533 | 1957
534 | 236
535 | 3
536 | 42
537 | W
538 | 87
539 | 47
540 | S
541 | 23
542 | 50
543 | E
544 | 85
545 |
546 | 47
547 | 1957
548 | 213
549 | 1
550 | 46
551 | N
552 | 23
553 |
554 | 48
555 | 1986
556 | 744
557 | 2
558 | 45
559 | W
560 | 86
561 | 55
562 | E
563 | 71
564 |
565 | 49
566 | 2022
567 | 571
568 | 1
569 | 53
570 | E
571 | 24
572 |
573 | 50
574 | 2042
575 | 237
576 | 3
577 | 46
578 | W
579 | 85
580 | 54
581 | N
582 | 161
583 | 51
584 | S
585 | 22
586 |
587 | 51
588 | 2044
589 | 215
590 | 1
591 | 50
592 | N
593 | 22
594 |
595 | 52
596 | 2046
597 | 653
598 | 3
599 | 55
600 | N
601 | 67
602 | 53
603 | S
604 | 82
605 | 58
606 | E
607 | 27
608 |
609 | 53
610 | 2046
611 | 571
612 | 4
613 | 49
614 | W
615 | 24
616 | 52
617 | N
618 | 82
619 | 54
620 | S
621 | 173
622 | 57
623 | E
624 | 25
625 |
626 | 54
627 | 2047
628 | 398
629 | 3
630 | 53
631 | N
632 | 173
633 | 50
634 | S
635 | 161
636 | 59
637 | E
638 | 28
639 |
640 | 55
641 | 2050
642 | 720
643 | 3
644 | 48
645 | W
646 | 71
647 | 52
648 | S
649 | 67
650 | 56
651 | E
652 | 28
653 |
654 | 56
655 | 2067
656 | 746
657 | 1
658 | 55
659 | SW
660 | 28
661 |
662 | 57
663 | 2071
664 | 571
665 | 1
666 | 53
667 | W
668 | 25
669 |
670 | 58
671 | 2073
672 | 653
673 | 1
674 | 52
675 | W
676 | 27
677 |
678 | 59
679 | 2075
680 | 398
681 | 1
682 | 54
683 | W
684 | 28
685 |
686 |
--------------------------------------------------------------------------------
/maps/DIAG_floor1/DIAG_floor1.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/DIAG_floor1/DIAG_floor1.pgm
--------------------------------------------------------------------------------
/maps/DIAG_floor1/DIAG_floor1.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 1146 502 1 ]
7 | rotate [ 0.000 0.000 ]
8 | center [ 56.400 20.500 ]
9 | scale 10.000
10 | show_data 0
11 | )
12 |
13 | floorplan (
14 | size [114.45 46.35 1]
15 | pose [57.225 23.175 0 0]
16 | bitmap "DIAG_floor1.pgm"
17 | )
18 |
19 | include "robots.inc"
20 |
--------------------------------------------------------------------------------
/maps/DIAG_floor1/DIAG_floor1.yaml:
--------------------------------------------------------------------------------
1 | image: DIAG_floor1.pgm
2 | resolution: 0.05
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.60
6 | free_thresh: 0.40
--------------------------------------------------------------------------------
/maps/DIAG_labs/DIAG_labs-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/DIAG_labs/DIAG_labs-graph.png
--------------------------------------------------------------------------------
/maps/DIAG_labs/DIAG_labs.graph:
--------------------------------------------------------------------------------
1 | 27
2 | 1000
3 | 800
4 | 0.05
5 | 0
6 | 0
7 |
8 | 0
9 | 171
10 | 442
11 | 1
12 | 8
13 | E
14 | 19
15 |
16 | 1
17 | 174
18 | 689
19 | 1
20 | 5
21 | E
22 | 46
23 |
24 | 2
25 | 175
26 | 565
27 | 1
28 | 6
29 | E
30 | 15
31 |
32 | 3
33 | 176
34 | 270
35 | 1
36 | 9
37 | E
38 | 14
39 |
40 | 4
41 | 184
42 | 129
43 | 1
44 | 10
45 | N
46 | 21
47 |
48 | 5
49 | 190
50 | 659
51 | 3
52 | 1
53 | N
54 | 46
55 | 6
56 | S
57 | 94
58 | 11
59 | E
60 | 18
61 |
62 | 6
63 | 190
64 | 565
65 | 3
66 | 2
67 | W
68 | 15
69 | 5
70 | N
71 | 94
72 | 7
73 | S
74 | 76
75 |
76 | 7
77 | 190
78 | 489
79 | 3
80 | 6
81 | N
82 | 76
83 | 8
84 | S
85 | 47
86 | 12
87 | E
88 | 18
89 |
90 | 8
91 | 190
92 | 442
93 | 3
94 | 0
95 | W
96 | 19
97 | 7
98 | N
99 | 47
100 | 9
101 | S
102 | 172
103 |
104 | 9
105 | 190
106 | 270
107 | 3
108 | 3
109 | W
110 | 14
111 | 8
112 | N
113 | 172
114 | 10
115 | S
116 | 120
117 |
118 | 10
119 | 190
120 | 150
121 | 3
122 | 9
123 | N
124 | 120
125 | 4
126 | S
127 | 21
128 | 14
129 | E
130 | 93
131 |
132 | 11
133 | 208
134 | 659
135 | 1
136 | 5
137 | W
138 | 18
139 |
140 | 12
141 | 208
142 | 489
143 | 1
144 | 7
145 | W
146 | 18
147 |
148 | 13
149 | 283
150 | 170
151 | 1
152 | 14
153 | S
154 | 20
155 |
156 | 14
157 | 283
158 | 150
159 | 3
160 | 10
161 | W
162 | 93
163 | 13
164 | N
165 | 20
166 | 15
167 | E
168 | 83
169 |
170 | 15
171 | 366
172 | 150
173 | 3
174 | 14
175 | W
176 | 83
177 | 16
178 | S
179 | 18
180 | 17
181 | E
182 | 178
183 |
184 | 16
185 | 366
186 | 132
187 | 1
188 | 15
189 | N
190 | 18
191 |
192 | 17
193 | 544
194 | 144
195 | 3
196 | 15
197 | W
198 | 178
199 | 18
200 | S
201 | 15
202 | 20
203 | E
204 | 133
205 |
206 | 18
207 | 544
208 | 129
209 | 1
210 | 17
211 | N
212 | 15
213 |
214 | 19
215 | 677
216 | 159
217 | 1
218 | 20
219 | S
220 | 16
221 |
222 | 20
223 | 677
224 | 143
225 | 3
226 | 17
227 | W
228 | 133
229 | 19
230 | N
231 | 16
232 | 21
233 | E
234 | 133
235 |
236 | 21
237 | 810
238 | 141
239 | 3
240 | 20
241 | W
242 | 133
243 | 22
244 | S
245 | 14
246 | 24
247 | E
248 | 115
249 |
250 | 22
251 | 810
252 | 127
253 | 1
254 | 21
255 | N
256 | 14
257 |
258 | 23
259 | 925
260 | 159
261 | 1
262 | 24
263 | S
264 | 19
265 |
266 | 24
267 | 925
268 | 140
269 | 4
270 | 21
271 | W
272 | 115
273 | 23
274 | N
275 | 19
276 | 25
277 | S
278 | 21
279 | 26
280 | E
281 | 31
282 |
283 | 25
284 | 925
285 | 119
286 | 1
287 | 24
288 | N
289 | 21
290 |
291 | 26
292 | 956
293 | 140
294 | 1
295 | 24
296 | W
297 | 31
298 |
299 |
--------------------------------------------------------------------------------
/maps/DIAG_labs/DIAG_labs.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/DIAG_labs/DIAG_labs.pgm
--------------------------------------------------------------------------------
/maps/DIAG_labs/DIAG_labs.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 600 500 1 ]
7 | rotate [ 0.000 0.000 ]
8 | center [ 25.0 20.0 ]
9 | scale 10
10 | show_data 0
11 | )
12 |
13 | floorplan (
14 | size [50.0 40.0 1]
15 | pose [25.0 20.0 0 0]
16 | bitmap "DIAG_labs.pgm"
17 | )
18 |
19 | include "robots.inc"
20 |
--------------------------------------------------------------------------------
/maps/DIAG_labs/DIAG_labs.yaml:
--------------------------------------------------------------------------------
1 | image: DIAG_labs.pgm
2 | resolution: 0.05
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.40
6 | free_thresh: 0.10
7 |
--------------------------------------------------------------------------------
/maps/broughton/broughton-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/broughton/broughton-graph.png
--------------------------------------------------------------------------------
/maps/broughton/broughton.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/broughton/broughton.pgm
--------------------------------------------------------------------------------
/maps/broughton/broughton.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 950 840 1] # Windows size in pixels
7 | rotate [ 0.000 0.000 ] # Rotation
8 | center [49.512 38.974] # Center of the window in meters
9 | scale 9.330 # Zoom factor
10 | show_data 0
11 | )
12 |
13 | # load an environment bitmap
14 | floorplan (
15 | size [100.0 80.0 1] # size of the environment in meters
16 | pose [50.0 40.0 0 0] # coordinates of the center of the environment in meters
17 | bitmap "broughton.pgm"
18 | )
19 |
20 | include "robots.inc"
21 |
--------------------------------------------------------------------------------
/maps/broughton/broughton.yaml:
--------------------------------------------------------------------------------
1 | image: broughton.pgm
2 | resolution: 0.1
3 | origin: [0.0, 0.0, 0.0]
4 | negate: 0
5 | occupied_thresh: 0.40
6 | free_thresh: 0.10
--------------------------------------------------------------------------------
/maps/crobot.inc:
--------------------------------------------------------------------------------
1 | define crobot position(
2 | size [0.33 0.33 0.25]
3 | origin [0 0 0 0]
4 | gui_nose 1
5 | drive "diff"
6 |
7 | # This block approximates a circular shape of a Robot
8 | block( points 16
9 | point[0] [ 0.225 0.000 ]
10 | point[1] [ 0.208 0.086 ]
11 | point[2] [ 0.159 0.159 ]
12 | point[3] [ 0.086 0.208 ]
13 | point[4] [ 0.000 0.225 ]
14 | point[5] [ -0.086 0.208 ]
15 | point[6] [ -0.159 0.159 ]
16 | point[7] [ -0.208 0.086 ]
17 | point[8] [ -0.225 0.000 ]
18 | point[9] [ -0.208 -0.086 ]
19 | point[10] [ -0.159 -0.159 ]
20 | point[11] [ -0.086 -0.208 ]
21 | point[12] [ -0.000 -0.225 ]
22 | point[13] [ 0.086 -0.208 ]
23 | point[14] [ 0.159 -0.159 ]
24 | point[15] [ 0.208 -0.086 ]
25 | z [0 1]
26 | )
27 |
28 | hokuyo( pose [0.15 0 -0.1 0] )
29 |
30 | # Report error-free position in world coordinates
31 | #localization "gps"
32 | #localization_origin [ 0 0 0 0 ]
33 |
34 | # Some more realistic localization error
35 | localization "odom"
36 | odom_error [ 0.01 0.01 0.0 0.1 ]
37 | )
38 |
--------------------------------------------------------------------------------
/maps/ctcv/CTCV Graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/ctcv/CTCV Graph.png
--------------------------------------------------------------------------------
/maps/ctcv/ctcv.graph:
--------------------------------------------------------------------------------
1 | 18
2 | 1187
3 | 296
4 | 0.05
5 | -29.675
6 | -7.4
7 |
8 | 0
9 | 33
10 | 211
11 | 1
12 | 1
13 | E
14 | 146
15 |
16 | 1
17 | 177
18 | 196
19 | 3
20 | 0
21 | W
22 | 146
23 | 4
24 | NE
25 | 18
26 | 2
27 | SE
28 | 41
29 |
30 | 2
31 | 168
32 | 156
33 | 1
34 | 1
35 | N
36 | 41
37 |
38 | 3
39 | 188
40 | 244
41 | 1
42 | 4
43 | S
44 | 30
45 |
46 | 4
47 | 188
48 | 214
49 | 3
50 | 1
51 | SW
52 | 18
53 | 3
54 | N
55 | 30
56 | 5
57 | E
58 | 64
59 |
60 | 5
61 | 252
62 | 220
63 | 2
64 | 4
65 | NW
66 | 64
67 | 6
68 | SE
69 | 64
70 |
71 | 6
72 | 311
73 | 195
74 | 2
75 | 5
76 | NW
77 | 64
78 | 7
79 | S
80 | 173
81 |
82 | 7
83 | 481
84 | 186
85 | 2
86 | 6
87 | W
88 | 173
89 | 9
90 | SE
91 | 20
92 |
93 | 8
94 | 486
95 | 138
96 | 1
97 | 9
98 | N
99 | 29
100 |
101 | 9
102 | 501
103 | 167
104 | 3
105 | 7
106 | NW
107 | 20
108 | 8
109 | SW
110 | 29
111 | 10
112 | E
113 | 42
114 |
115 | 10
116 | 543
117 | 167
118 | 3
119 | 9
120 | W
121 | 42
122 | 12
123 | NE
124 | 41
125 | 11
126 | SE
127 | 36
128 |
129 | 11
130 | 568
131 | 141
132 | 1
133 | 10
134 | N
135 | 36
136 |
137 | 12
138 | 584
139 | 181
140 | 2
141 | 10
142 | W
143 | 41
144 | 13
145 | E
146 | 99
147 |
148 | 13
149 | 682
150 | 174
151 | 2
152 | 12
153 | SW
154 | 99
155 | 14
156 | E
157 | 130
158 |
159 | 14
160 | 811
161 | 179
162 | 2
163 | 13
164 | NW
165 | 130
166 | 15
167 | E
168 | 123
169 |
170 | 15
171 | 933
172 | 171
173 | 2
174 | 14
175 | W
176 | 123
177 | 16
178 | E
179 | 56
180 |
181 | 16
182 | 989
183 | 169
184 | 2
185 | 15
186 | NW
187 | 56
188 | 17
189 | SE
190 | 84
191 |
192 | 17
193 | 1073
194 | 160
195 | 1
196 | 16
197 | W
198 | 84
199 |
200 |
--------------------------------------------------------------------------------
/maps/ctcv/ctcv.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/ctcv/ctcv.pgm
--------------------------------------------------------------------------------
/maps/ctcv/ctcv.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 1280 320 1] # Tamanho da janela em pixeis
7 | rotate [ 0.000 0.000 ] # Mapa não rodado
8 | center [ 0 0] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 15 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | floorplan (
14 | size [59.35 14.8 1]
15 | #pose [0 0 0 0]
16 | bitmap "ctcv.pgm"
17 | )
18 |
19 | include "robots.inc"
20 |
--------------------------------------------------------------------------------
/maps/ctcv/ctcv.yaml:
--------------------------------------------------------------------------------
1 | image: ctcv_map.pgm
2 | resolution: 0.050000
3 | origin: [-29.675, -7.4, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.65
6 | free_thresh: 0.196
7 |
8 |
--------------------------------------------------------------------------------
/maps/ctcv/ctcv_no_borders.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/ctcv/ctcv_no_borders.pgm
--------------------------------------------------------------------------------
/maps/cumberland/cumberland-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/cumberland/cumberland-graph.png
--------------------------------------------------------------------------------
/maps/cumberland/cumberland.graph:
--------------------------------------------------------------------------------
1 | 40
2 | 688
3 | 499
4 | 0.075
5 | 0
6 | 0
7 |
8 | 0
9 | 31
10 | 289
11 | 1
12 | 2
13 | S
14 | 177
15 |
16 | 1
17 | 82
18 | 287
19 | 1
20 | 2
21 | S
22 | 127
23 |
24 | 2
25 | 82
26 | 160
27 | 3
28 | 0
29 | W
30 | 177
31 | 1
32 | N
33 | 127
34 | 4
35 | E
36 | 61
37 |
38 | 3
39 | 143
40 | 197
41 | 1
42 | 4
43 | S
44 | 37
45 |
46 | 4
47 | 143
48 | 160
49 | 3
50 | 2
51 | W
52 | 61
53 | 3
54 | N
55 | 37
56 | 6
57 | E
58 | 78
59 |
60 | 5
61 | 200
62 | 366
63 | 1
64 | 7
65 | S
66 | 66
67 |
68 | 6
69 | 221
70 | 165
71 | 3
72 | 4
73 | SW
74 | 78
75 | 7
76 | N
77 | 136
78 | 13
79 | E
80 | 87
81 |
82 | 7
83 | 226
84 | 301
85 | 3
86 | 5
87 | W
88 | 66
89 | 6
90 | S
91 | 136
92 | 8
93 | NE
94 | 64
95 |
96 | 8
97 | 255
98 | 365
99 | 1
100 | 7
101 | S
102 | 64
103 |
104 | 9
105 | 287
106 | 334
107 | 1
108 | 16
109 | E
110 | 94
111 |
112 | 10
113 | 295
114 | 367
115 | 1
116 | 16
117 | E
118 | 85
119 |
120 | 11
121 | 303
122 | 232
123 | 1
124 | 13
125 | S
126 | 72
127 |
128 | 12
129 | 304
130 | 293
131 | 1
132 | 16
133 | E
134 | 128
135 |
136 | 13
137 | 308
138 | 160
139 | 3
140 | 6
141 | W
142 | 87
143 | 11
144 | N
145 | 72
146 | 15
147 | E
148 | 65
149 |
150 | 14
151 | 368
152 | 228
153 | 1
154 | 15
155 | S
156 | 67
157 |
158 | 15
159 | 373
160 | 161
161 | 3
162 | 13
163 | W
164 | 65
165 | 14
166 | N
167 | 67
168 | 17
169 | E
170 | 65
171 |
172 | 16
173 | 377
174 | 350
175 | 4
176 | 9
177 | W
178 | 94
179 | 10
180 | N
181 | 85
182 | 12
183 | S
184 | 128
185 | 19
186 | E
187 | 78
188 |
189 | 17
190 | 438
191 | 138
192 | 3
193 | 15
194 | W
195 | 65
196 | 27
197 | S
198 | 177
199 | 18
200 | NE
201 | 22
202 |
203 | 18
204 | 453
205 | 160
206 | 3
207 | 21
208 | N
209 | 53
210 | 17
211 | S
212 | 22
213 | 22
214 | E
215 | 39
216 |
217 | 19
218 | 455
219 | 350
220 | 3
221 | 16
222 | W
223 | 78
224 | 20
225 | S
226 | 36
227 | 23
228 | E
229 | 53
230 |
231 | 20
232 | 455
233 | 314
234 | 3
235 | 21
236 | SW
237 | 122
238 | 19
239 | N
240 | 36
241 | 24
242 | E
243 | 95
244 |
245 | 21
246 | 467
247 | 213
248 | 3
249 | 18
250 | SW
251 | 53
252 | 20
253 | N
254 | 122
255 | 24
256 | E
257 | 49
258 |
259 | 22
260 | 492
261 | 160
262 | 1
263 | 18
264 | W
265 | 39
266 |
267 | 23
268 | 508
269 | 350
270 | 3
271 | 19
272 | W
273 | 53
274 | 26
275 | N
276 | 77
277 | 29
278 | E
279 | 51
280 |
281 | 24
282 | 515
283 | 220
284 | 4
285 | 20
286 | NW
287 | 95
288 | 21
289 | SW
290 | 49
291 | 32
292 | NE
293 | 109
294 | 28
295 | SE
296 | 70
297 |
298 | 25
299 | 537
300 | 460
301 | 1
302 | 26
303 | S
304 | 34
305 |
306 | 26
307 | 537
308 | 426
309 | 3
310 | 23
311 | SW
312 | 77
313 | 25
314 | N
315 | 34
316 | 29
317 | SE
318 | 76
319 |
320 | 27
321 | 542
322 | 43
323 | 3
324 | 17
325 | W
326 | 177
327 | 28
328 | NE
329 | 109
330 | 34
331 | SE
332 | 110
333 |
334 | 28
335 | 546
336 | 152
337 | 3
338 | 24
339 | N
340 | 70
341 | 27
342 | S
343 | 109
344 | 33
345 | E
346 | 78
347 |
348 | 29
349 | 559
350 | 350
351 | 3
352 | 23
353 | W
354 | 51
355 | 26
356 | N
357 | 76
358 | 30
359 | S
360 | 81
361 |
362 | 30
363 | 618
364 | 324
365 | 1
366 | 29
367 | W
368 | 81
369 |
370 | 31
371 | 624
372 | 289
373 | 1
374 | 32
375 | S
376 | 72
377 |
378 | 32
379 | 624
380 | 217
381 | 4
382 | 24
383 | W
384 | 109
385 | 31
386 | N
387 | 72
388 | 33
389 | S
390 | 65
391 | 37
392 | E
393 | 34
394 |
395 | 33
396 | 624
397 | 152
398 | 4
399 | 28
400 | W
401 | 78
402 | 32
403 | N
404 | 65
405 | 34
406 | S
407 | 64
408 | 36
409 | E
410 | 33
411 |
412 | 34
413 | 629
414 | 88
415 | 3
416 | 33
417 | N
418 | 64
419 | 27
420 | S
421 | 110
422 | 38
423 | E
424 | 35
425 |
426 | 35
427 | 647
428 | 289
429 | 1
430 | 37
431 | S
432 | 58
433 |
434 | 36
435 | 657
436 | 152
437 | 1
438 | 33
439 | W
440 | 33
441 |
442 | 37
443 | 658
444 | 233
445 | 3
446 | 35
447 | NW
448 | 58
449 | 32
450 | SW
451 | 34
452 | 39
453 | NE
454 | 56
455 |
456 | 38
457 | 664
458 | 91
459 | 1
460 | 34
461 | W
462 | 35
463 |
464 | 39
465 | 669
466 | 289
467 | 1
468 | 37
469 | S
470 | 56
471 |
472 |
--------------------------------------------------------------------------------
/maps/cumberland/cumberland.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/cumberland/cumberland.pgm
--------------------------------------------------------------------------------
/maps/cumberland/cumberland.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 800 700 1] # Tamanho da janela em pixeis
7 | rotate [ 0.000 0.000 ] # Mapa não rodado
8 | center [ 25.8 18.7125] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 15 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | floorplan (
14 | size [51.6 37.425 1] #metros (a imagem tem 688x499pixeis => 0.075 resolução no .yaml)
15 | pose [25.8 18.7125 0 0]
16 | bitmap "cumberland.pgm"
17 | )
18 |
19 | include "robots.inc"
20 |
--------------------------------------------------------------------------------
/maps/cumberland/cumberland.yaml:
--------------------------------------------------------------------------------
1 | image: cumberland.pgm
2 | resolution: 0.075
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0 #se negate=1 -> preto-free & branco-obstaculos
5 | occupied_thresh: 0.65
6 | free_thresh: 0.19
--------------------------------------------------------------------------------
/maps/example/example-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/example/example-graph.png
--------------------------------------------------------------------------------
/maps/example/example.graph:
--------------------------------------------------------------------------------
1 | 29
2 | 313
3 | 219
4 | 0.15
5 | 0
6 | 0
7 |
8 | 0
9 | 26
10 | 190
11 | 1
12 | 1
13 | SE
14 | 20
15 |
16 | 1
17 | 38
18 | 170
19 | 3
20 | 0
21 | NW
22 | 20
23 | 5
24 | S
25 | 93
26 | 4
27 | NE
28 | 19
29 |
30 | 2
31 | 40
32 | 63
33 | 1
34 | 5
35 | N
36 | 38
37 |
38 | 3
39 | 47
40 | 25
41 | 1
42 | 13
43 | E
44 | 52
45 |
46 | 4
47 | 52
48 | 189
49 | 1
50 | 1
51 | SW
52 | 19
53 |
54 | 5
55 | 54
56 | 101
57 | 4
58 | 1
59 | W
60 | 93
61 | 6
62 | N
63 | 36
64 | 2
65 | S
66 | 38
67 | 11
68 | E
69 | 45
70 |
71 | 6
72 | 65
73 | 137
74 | 1
75 | 5
76 | SW
77 | 36
78 |
79 | 7
80 | 76
81 | 186
82 | 1
83 | 9
84 | E
85 | 23
86 |
87 | 8
88 | 93
89 | 82
90 | 3
91 | 12
92 | W
93 | 65
94 | 11
95 | N
96 | 19
97 | 12
98 | E
99 | 65
100 |
101 | 9
102 | 99
103 | 186
104 | 3
105 | 7
106 | W
107 | 23
108 | 10
109 | S
110 | 54
111 | 15
112 | E
113 | 50
114 |
115 | 10
116 | 99
117 | 132
118 | 3
119 | 9
120 | N
121 | 54
122 | 11
123 | S
124 | 31
125 | 14
126 | E
127 | 28
128 |
129 | 11
130 | 99
131 | 101
132 | 4
133 | 5
134 | W
135 | 45
136 | 10
137 | N
138 | 31
139 | 8
140 | S
141 | 19
142 | 17
143 | E
144 | 54
145 |
146 | 12
147 | 99
148 | 47
149 | 3
150 | 8
151 | W
152 | 65
153 | 13
154 | S
155 | 22
156 | 8
157 | E
158 | 65
159 |
160 | 13
161 | 99
162 | 25
163 | 3
164 | 3
165 | W
166 | 52
167 | 12
168 | N
169 | 22
170 | 18
171 | E
172 | 54
173 |
174 | 14
175 | 127
176 | 132
177 | 3
178 | 10
179 | W
180 | 28
181 | 16
182 | N
183 | 139
184 | 16
185 | S
186 | 139
187 |
188 | 15
189 | 149
190 | 186
191 | 3
192 | 9
193 | W
194 | 50
195 | 16
196 | S
197 | 29
198 | 20
199 | E
200 | 70
201 |
202 | 16
203 | 149
204 | 157
205 | 3
206 | 14
207 | W
208 | 139
209 | 15
210 | N
211 | 29
212 | 14
213 | E
214 | 139
215 |
216 | 17
217 | 153
218 | 101
219 | 3
220 | 11
221 | W
222 | 54
223 | 18
224 | S
225 | 76
226 | 22
227 | E
228 | 66
229 |
230 | 18
231 | 153
232 | 25
233 | 3
234 | 13
235 | W
236 | 54
237 | 17
238 | N
239 | 76
240 | 26
241 | E
242 | 104
243 |
244 | 19
245 | 213
246 | 66
247 | 1
248 | 26
249 | E
250 | 71
251 |
252 | 20
253 | 219
254 | 186
255 | 3
256 | 15
257 | W
258 | 70
259 | 21
260 | S
261 | 49
262 | 27
263 | E
264 | 115
265 |
266 | 21
267 | 219
268 | 137
269 | 3
270 | 20
271 | N
272 | 49
273 | 22
274 | S
275 | 36
276 | 24
277 | E
278 | 33
279 |
280 | 22
281 | 219
282 | 101
283 | 3
284 | 17
285 | W
286 | 66
287 | 21
288 | N
289 | 36
290 | 28
291 | E
292 | 66
293 |
294 | 23
295 | 252
296 | 153
297 | 1
298 | 24
299 | S
300 | 16
301 |
302 | 24
303 | 252
304 | 137
305 | 4
306 | 21
307 | W
308 | 33
309 | 23
310 | N
311 | 16
312 | 25
313 | S
314 | 14
315 | 27
316 | E
317 | 33
318 |
319 | 25
320 | 252
321 | 123
322 | 1
323 | 24
324 | N
325 | 14
326 |
327 | 26
328 | 257
329 | 25
330 | 3
331 | 18
332 | W
333 | 104
334 | 19
335 | N
336 | 71
337 | 28
338 | E
339 | 104
340 |
341 | 27
342 | 285
343 | 137
344 | 3
345 | 24
346 | W
347 | 33
348 | 20
349 | N
350 | 115
351 | 28
352 | S
353 | 36
354 |
355 | 28
356 | 285
357 | 101
358 | 3
359 | 22
360 | W
361 | 66
362 | 27
363 | N
364 | 36
365 | 26
366 | S
367 | 104
368 |
369 |
--------------------------------------------------------------------------------
/maps/example/example.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/example/example.pgm
--------------------------------------------------------------------------------
/maps/example/example.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 850 700 1] # Tamanho da janela em pixeis
7 | rotate [ 0.000 0.000 ] # Mapa não rodado
8 | center [23.475 16.425] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 17 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | # load an environment bitmap
14 | floorplan (
15 | size [46.95 32.85 1] #metros (a imagem tem 313x219 pixeis => 0.1 resolução no .yaml)
16 | pose [23.475 16.425 0 0]
17 | bitmap "example.pgm"
18 | )
19 |
20 | include "robots.inc"
21 |
--------------------------------------------------------------------------------
/maps/example/example.yaml:
--------------------------------------------------------------------------------
1 | image: example.pgm
2 | resolution: 0.15
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0 #se negate=1 -> preto-free & branco-obstaculos
5 | occupied_thresh: 0.65
6 | free_thresh: 0.19
--------------------------------------------------------------------------------
/maps/floorplan.inc:
--------------------------------------------------------------------------------
1 | define floorplan model (
2 | # Sombre, sensible, artistic
3 | color "black"
4 | # Most maps will need a bounding box
5 | boundary 1
6 | gui_nose 0
7 | gui_grid 0
8 | gui_move 0
9 | gui_outline 0
10 | gripper_return 0
11 | fiducial_return 0
12 | )
13 |
--------------------------------------------------------------------------------
/maps/grid/grid Graph Info:
--------------------------------------------------------------------------------
1 | ID= 0
2 | X= 1.425000, Y= 24.375002
3 | #Neigh= 2
4 | ID = 1, DIR = S, COST = 76
5 | ID = 5, DIR = E, COST = 76
6 |
7 | ID= 1
8 | X= 1.425000, Y= 18.675001
9 | #Neigh= 3
10 | ID = 0, DIR = N, COST = 76
11 | ID = 2, DIR = S, COST = 76
12 | ID = 6, DIR = E, COST = 76
13 |
14 | ID= 2
15 | X= 1.425000, Y= 12.975000
16 | #Neigh= 3
17 | ID = 1, DIR = N, COST = 76
18 | ID = 3, DIR = S, COST = 76
19 | ID = 7, DIR = E, COST = 76
20 |
21 | ID= 3
22 | X= 1.425000, Y= 7.275000
23 | #Neigh= 3
24 | ID = 2, DIR = N, COST = 76
25 | ID = 4, DIR = S, COST = 76
26 | ID = 8, DIR = E, COST = 76
27 |
28 | ID= 4
29 | X= 1.425000, Y= 1.575000
30 | #Neigh= 2
31 | ID = 3, DIR = N, COST = 76
32 | ID = 9, DIR = E, COST = 76
33 |
34 | ID= 5
35 | X= 7.125000, Y= 24.375002
36 | #Neigh= 3
37 | ID = 0, DIR = W, COST = 76
38 | ID = 6, DIR = S, COST = 76
39 | ID = 10, DIR = E, COST = 76
40 |
41 | ID= 6
42 | X= 7.125000, Y= 18.675001
43 | #Neigh= 4
44 | ID = 1, DIR = W, COST = 76
45 | ID = 5, DIR = N, COST = 76
46 | ID = 7, DIR = S, COST = 76
47 | ID = 11, DIR = E, COST = 76
48 |
49 | ID= 7
50 | X= 7.125000, Y= 12.975000
51 | #Neigh= 4
52 | ID = 2, DIR = W, COST = 76
53 | ID = 6, DIR = N, COST = 76
54 | ID = 8, DIR = S, COST = 76
55 | ID = 12, DIR = E, COST = 76
56 |
57 | ID= 8
58 | X= 7.125000, Y= 7.275000
59 | #Neigh= 4
60 | ID = 3, DIR = W, COST = 76
61 | ID = 7, DIR = N, COST = 76
62 | ID = 9, DIR = S, COST = 76
63 | ID = 13, DIR = E, COST = 76
64 |
65 | ID= 9
66 | X= 7.125000, Y= 1.575000
67 | #Neigh= 3
68 | ID = 4, DIR = W, COST = 76
69 | ID = 8, DIR = N, COST = 76
70 | ID = 14, DIR = E, COST = 76
71 |
72 | ID= 10
73 | X= 12.825001, Y= 24.375002
74 | #Neigh= 3
75 | ID = 5, DIR = W, COST = 76
76 | ID = 11, DIR = S, COST = 76
77 | ID = 15, DIR = E, COST = 76
78 |
79 | ID= 11
80 | X= 12.825001, Y= 18.675001
81 | #Neigh= 4
82 | ID = 6, DIR = W, COST = 76
83 | ID = 10, DIR = N, COST = 76
84 | ID = 12, DIR = S, COST = 76
85 | ID = 16, DIR = E, COST = 76
86 |
87 | ID= 12
88 | X= 12.825001, Y= 12.975000
89 | #Neigh= 4
90 | ID = 7, DIR = W, COST = 76
91 | ID = 11, DIR = N, COST = 76
92 | ID = 13, DIR = S, COST = 76
93 | ID = 17, DIR = E, COST = 76
94 |
95 | ID= 13
96 | X= 12.825001, Y= 7.275000
97 | #Neigh= 4
98 | ID = 8, DIR = W, COST = 76
99 | ID = 12, DIR = N, COST = 76
100 | ID = 14, DIR = S, COST = 76
101 | ID = 18, DIR = E, COST = 76
102 |
103 | ID= 14
104 | X= 12.825001, Y= 1.575000
105 | #Neigh= 3
106 | ID = 9, DIR = W, COST = 76
107 | ID = 13, DIR = N, COST = 76
108 | ID = 19, DIR = E, COST = 76
109 |
110 | ID= 15
111 | X= 18.525002, Y= 24.375002
112 | #Neigh= 3
113 | ID = 10, DIR = W, COST = 76
114 | ID = 16, DIR = S, COST = 76
115 | ID = 20, DIR = E, COST = 76
116 |
117 | ID= 16
118 | X= 18.525002, Y= 18.675001
119 | #Neigh= 4
120 | ID = 11, DIR = W, COST = 76
121 | ID = 15, DIR = N, COST = 76
122 | ID = 17, DIR = S, COST = 76
123 | ID = 21, DIR = E, COST = 76
124 |
125 | ID= 17
126 | X= 18.525002, Y= 12.975000
127 | #Neigh= 4
128 | ID = 12, DIR = W, COST = 76
129 | ID = 16, DIR = N, COST = 76
130 | ID = 18, DIR = S, COST = 76
131 | ID = 22, DIR = E, COST = 76
132 |
133 | ID= 18
134 | X= 18.525002, Y= 7.275000
135 | #Neigh= 4
136 | ID = 13, DIR = W, COST = 76
137 | ID = 17, DIR = N, COST = 76
138 | ID = 19, DIR = S, COST = 76
139 | ID = 23, DIR = E, COST = 76
140 |
141 | ID= 19
142 | X= 18.525002, Y= 1.575000
143 | #Neigh= 3
144 | ID = 14, DIR = W, COST = 76
145 | ID = 18, DIR = N, COST = 76
146 | ID = 24, DIR = E, COST = 76
147 |
148 | ID= 20
149 | X= 24.225000, Y= 24.375002
150 | #Neigh= 2
151 | ID = 15, DIR = W, COST = 76
152 | ID = 21, DIR = S, COST = 76
153 |
154 | ID= 21
155 | X= 24.225000, Y= 18.675001
156 | #Neigh= 3
157 | ID = 16, DIR = W, COST = 76
158 | ID = 20, DIR = N, COST = 76
159 | ID = 22, DIR = S, COST = 76
160 |
161 | ID= 22
162 | X= 24.225000, Y= 12.975000
163 | #Neigh= 3
164 | ID = 17, DIR = W, COST = 76
165 | ID = 21, DIR = N, COST = 76
166 | ID = 23, DIR = S, COST = 76
167 |
168 | ID= 23
169 | X= 24.225000, Y= 7.275000
170 | #Neigh= 3
171 | ID = 18, DIR = W, COST = 76
172 | ID = 22, DIR = N, COST = 76
173 | ID = 24, DIR = S, COST = 76
174 |
175 | ID= 24
176 | X= 24.225000, Y= 1.575000
177 | #Neigh= 2
178 | ID = 19, DIR = W, COST = 76
179 | ID = 23, DIR = N, COST = 76
180 |
--------------------------------------------------------------------------------
/maps/grid/grid-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/grid/grid-graph.png
--------------------------------------------------------------------------------
/maps/grid/grid.graph:
--------------------------------------------------------------------------------
1 | 25
2 | 344
3 | 344
4 | 0.075
5 | 0
6 | 0
7 |
8 | 0
9 | 19
10 | 325
11 | 2
12 | 1
13 | S
14 | 76
15 | 5
16 | E
17 | 76
18 |
19 | 1
20 | 19
21 | 249
22 | 3
23 | 0
24 | N
25 | 76
26 | 2
27 | S
28 | 76
29 | 6
30 | E
31 | 76
32 |
33 | 2
34 | 19
35 | 173
36 | 3
37 | 1
38 | N
39 | 76
40 | 3
41 | S
42 | 76
43 | 7
44 | E
45 | 76
46 |
47 | 3
48 | 19
49 | 97
50 | 3
51 | 2
52 | N
53 | 76
54 | 4
55 | S
56 | 76
57 | 8
58 | E
59 | 76
60 |
61 | 4
62 | 19
63 | 21
64 | 2
65 | 3
66 | N
67 | 76
68 | 9
69 | E
70 | 76
71 |
72 | 5
73 | 95
74 | 325
75 | 3
76 | 0
77 | W
78 | 76
79 | 6
80 | S
81 | 76
82 | 10
83 | E
84 | 76
85 |
86 | 6
87 | 95
88 | 249
89 | 4
90 | 1
91 | W
92 | 76
93 | 5
94 | N
95 | 76
96 | 7
97 | S
98 | 76
99 | 11
100 | E
101 | 76
102 |
103 | 7
104 | 95
105 | 173
106 | 4
107 | 2
108 | W
109 | 76
110 | 6
111 | N
112 | 76
113 | 8
114 | S
115 | 76
116 | 12
117 | E
118 | 76
119 |
120 | 8
121 | 95
122 | 97
123 | 4
124 | 3
125 | W
126 | 76
127 | 7
128 | N
129 | 76
130 | 9
131 | S
132 | 76
133 | 13
134 | E
135 | 76
136 |
137 | 9
138 | 95
139 | 21
140 | 3
141 | 4
142 | W
143 | 76
144 | 8
145 | N
146 | 76
147 | 14
148 | E
149 | 76
150 |
151 | 10
152 | 171
153 | 325
154 | 3
155 | 5
156 | W
157 | 76
158 | 11
159 | S
160 | 76
161 | 15
162 | E
163 | 76
164 |
165 | 11
166 | 171
167 | 249
168 | 4
169 | 6
170 | W
171 | 76
172 | 10
173 | N
174 | 76
175 | 12
176 | S
177 | 76
178 | 16
179 | E
180 | 76
181 |
182 | 12
183 | 171
184 | 173
185 | 4
186 | 7
187 | W
188 | 76
189 | 11
190 | N
191 | 76
192 | 13
193 | S
194 | 76
195 | 17
196 | E
197 | 76
198 |
199 | 13
200 | 171
201 | 97
202 | 4
203 | 8
204 | W
205 | 76
206 | 12
207 | N
208 | 76
209 | 14
210 | S
211 | 76
212 | 18
213 | E
214 | 76
215 |
216 | 14
217 | 171
218 | 21
219 | 3
220 | 9
221 | W
222 | 76
223 | 13
224 | N
225 | 76
226 | 19
227 | E
228 | 76
229 |
230 | 15
231 | 247
232 | 325
233 | 3
234 | 10
235 | W
236 | 76
237 | 16
238 | S
239 | 76
240 | 20
241 | E
242 | 76
243 |
244 | 16
245 | 247
246 | 249
247 | 4
248 | 11
249 | W
250 | 76
251 | 15
252 | N
253 | 76
254 | 17
255 | S
256 | 76
257 | 21
258 | E
259 | 76
260 |
261 | 17
262 | 247
263 | 173
264 | 4
265 | 12
266 | W
267 | 76
268 | 16
269 | N
270 | 76
271 | 18
272 | S
273 | 76
274 | 22
275 | E
276 | 76
277 |
278 | 18
279 | 247
280 | 97
281 | 4
282 | 13
283 | W
284 | 76
285 | 17
286 | N
287 | 76
288 | 19
289 | S
290 | 76
291 | 23
292 | E
293 | 76
294 |
295 | 19
296 | 247
297 | 21
298 | 3
299 | 14
300 | W
301 | 76
302 | 18
303 | N
304 | 76
305 | 24
306 | E
307 | 76
308 |
309 | 20
310 | 323
311 | 325
312 | 2
313 | 15
314 | W
315 | 76
316 | 21
317 | S
318 | 76
319 |
320 | 21
321 | 323
322 | 249
323 | 3
324 | 16
325 | W
326 | 76
327 | 20
328 | N
329 | 76
330 | 22
331 | S
332 | 76
333 |
334 | 22
335 | 323
336 | 173
337 | 3
338 | 17
339 | W
340 | 76
341 | 21
342 | N
343 | 76
344 | 23
345 | S
346 | 76
347 |
348 | 23
349 | 323
350 | 97
351 | 3
352 | 18
353 | W
354 | 76
355 | 22
356 | N
357 | 76
358 | 24
359 | S
360 | 76
361 |
362 | 24
363 | 323
364 | 21
365 | 2
366 | 19
367 | W
368 | 76
369 | 23
370 | N
371 | 76
372 |
373 |
--------------------------------------------------------------------------------
/maps/grid/grid.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/grid/grid.pgm
--------------------------------------------------------------------------------
/maps/grid/grid.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 500 500 1] # Tamanho da janela em pixeis
7 | rotate [ 0.000 0.000 ] # Mapa não rodado
8 | center [12.0 12.0 ] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 15 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | #window(
14 | # size [ 950 950 1] # Tamanho da janela em pixeis
15 | # rotate [ 0.000 0.000 ] # Mapa não rodado
16 | # center [12.9 12.9 ] # Centro da Janela no ponto central do ambiente (em metros)
17 | # scale 30 # zoom da janela
18 | # show_data 0
19 | #)
20 |
21 | # load an environment bitmap
22 | floorplan (
23 | size [25.8 25.8 1] #metros (a imagem tem 344x344pixeis => 0.075 resolução no .yaml)
24 | pose [12.9 12.9 0 0]
25 | bitmap "grid.pgm"
26 | )
27 |
28 | include "robots.inc"
29 |
30 |
--------------------------------------------------------------------------------
/maps/grid/grid.yaml:
--------------------------------------------------------------------------------
1 | image: grid.pgm
2 | resolution: 0.075
3 | origin: [0.000000, 0.000000, 0.000000]
4 | negate: 0 #se negate=1 -> preto-free & branco-obstaculos
5 | occupied_thresh: 0.65
6 | free_thresh: 0.19
--------------------------------------------------------------------------------
/maps/hokuyo.inc:
--------------------------------------------------------------------------------
1 | define hokuyo ranger
2 | (
3 | sensor(
4 | range [ 0.0 20.0 ]
5 | fov 270.25
6 | samples 1081
7 | )
8 |
9 | # model properties
10 | color "orange"
11 | size [ 0.10 0.10 0.10 ]
12 |
13 | block( points 4
14 | point[0] [0 0]
15 | point[1] [0 1]
16 | point[2] [1 1]
17 | point[3] [1 0]
18 | z [0 1]
19 | )
20 | )
21 |
--------------------------------------------------------------------------------
/maps/move_base_arena/graph move_base_arena.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/move_base_arena/graph move_base_arena.ods
--------------------------------------------------------------------------------
/maps/move_base_arena/move_base_arena.graph:
--------------------------------------------------------------------------------
1 | 14
2 | 215
3 | 210
4 | 0.05
5 | 0.0
6 | 0.0
7 |
8 | 0
9 | -80
10 | 80
11 | 1
12 | 1
13 | E
14 | 60
15 |
16 | 1
17 | -80
18 | -20
19 | 4
20 | 0
21 | W
22 | 60
23 | 2
24 | E
25 | 100
26 | 10
27 | SW
28 | 40
29 | 12
30 | SE
31 | 74
32 |
33 | 2
34 | -80
35 | 80
36 | 2
37 | 1
38 | W
39 | 100
40 | 3
41 | S
42 | 110
43 |
44 | 3
45 | 30
46 | 80
47 | 5
48 | 2
49 | N
50 | 110
51 | 4
52 | S
53 | 51
54 | 11
55 | W
56 | 70
57 | 12
58 | NW
59 | 83
60 | 13
61 | W
62 | 98
63 |
64 | 4
65 | 80
66 | 90
67 | 2
68 | 3
69 | N
70 | 51
71 | 5
72 | W
73 | 80
74 |
75 | 5
76 | 85
77 | 10
78 | 3
79 | 4
80 | E
81 | 80
82 | 6
83 | W
84 | 80
85 | 11
86 | N
87 | 55
88 |
89 | 6
90 | 85
91 | -70
92 | 3
93 | 5
94 | E
95 | 80
96 | 7
97 | N
98 | 97
99 | 11
100 | NE
101 | 97
102 |
103 | 7
104 | -10
105 | -90
106 | 2
107 | 6
108 | S
109 | 97
110 | 8
111 | E
112 | 64
113 |
114 | 8
115 | -10
116 | -26
117 | 4
118 | 7
119 | W
120 | 64
121 | 10
122 | N
123 | 30
124 | 11
125 | S
126 | 54
127 | 13
128 | E
129 | 16
130 |
131 | 9
132 | -40
133 | -86
134 | 1
135 | 10
136 | E
137 | 60
138 |
139 | 10
140 | -40
141 | -26
142 | 4
143 | 1
144 | N
145 | 40
146 | 13
147 | SE
148 | 34
149 | 8
150 | S
151 | 30
152 | 9
153 | W
154 | 60
155 |
156 | 11
157 | 30
158 | 10
159 | 5
160 | 8
161 | NW
162 | 54
163 | 13
164 | N
165 | 45
166 | 3
167 | E
168 | 70
169 | 5
170 | S
171 | 55
172 | 6
173 | SW
174 | 97
175 |
176 | 12
177 | -45
178 | 45
179 | 3
180 | 1
181 | NW
182 | 74
183 | 3
184 | SE
185 | 49
186 | 13
187 | SW
188 | 65
189 |
190 | 13
191 | -10
192 | 10
193 | 5
194 | 3
195 | SE
196 | 98
197 | 11
198 | S
199 | 45
200 | 8
201 | W
202 | 16
203 | 10
204 | NW
205 | 34
206 | 12
207 | NE
208 | 65
209 |
--------------------------------------------------------------------------------
/maps/move_base_arena/move_base_arena.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidbsp/patrolling_sim/560839a2116a30eded22dd73765141aa1edaafd9/maps/move_base_arena/move_base_arena.pgm
--------------------------------------------------------------------------------
/maps/move_base_arena/move_base_arena.world:
--------------------------------------------------------------------------------
1 | include "../hokuyo.inc"
2 | include "../crobot.inc"
3 | include "../floorplan.inc"
4 |
5 | window(
6 | size [ 880 880 1] # Tamanho da janela em pixeis
7 | rotate [0.000 0.000 ] # Mapa não rodado
8 | center [0 0 0] # Centro da Janela no ponto central do ambiente (em metros)
9 | scale 70 # zoom da janela
10 | show_data 0
11 | )
12 |
13 | # load an environment bitmap
14 | floorplan (
15 | size [10.75 10.5 1] #metros (a imagem tem 344x344pixeis => 0.075 resolução no .yaml)
16 | #pose [0 0 0 270]
17 | bitmap "move_base_arena.pgm"
18 | )
19 |
20 | include "robots.inc"
21 |
22 |
23 |
--------------------------------------------------------------------------------
/maps/move_base_arena/move_base_arena.yaml:
--------------------------------------------------------------------------------
1 | image: move_base_arena.pgm
2 | resolution: 0.050000
3 | origin: [-5.375, -5.25, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.65
6 | free_thresh: 0.196
7 |
8 |
--------------------------------------------------------------------------------
/maps/move_base_arena/move_base_arena_points:
--------------------------------------------------------------------------------
1 |
2 |
3 | Graph Points (move_base arena)
4 |
5 | x y
6 |
7 | A -4 -4
8 | B -4 -1
9 | C -4 4
10 | D 1,5 4
11 | E 4 4,5
12 | F 4,25 0,5
13 | G 4,25 -3,5
14 | H -0,5 -4,5
15 | I -0,5 -1,3
16 | J -2 -4,3
17 | K -2 -1,3
18 | L 1,5 0,5
19 | M -2,25 2,25
20 | N -0,5 -0,5
21 |
22 |
23 | x,y,yaw
24 |
25 | robot_0 (A):
26 | -4, -4, 1.57
27 |
28 | robot_1 (D):
29 | 1,5 4 -1.57
30 |
31 | robot_2 (G):
32 | 4,25 -3,5 1.57
--------------------------------------------------------------------------------
/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | patrolling_sim
4 | 2.2.4
5 | Multi-Robot Patrolling Stage/ROS Simulation Package.
6 |
7 |
8 |
9 |
10 | David Portugal
11 | Luca Iocchi
12 | João Castilho
13 |
14 |
15 |
16 |
17 |
18 | BSD
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 | catkin
45 | actionlib
46 | move_base_msgs
47 | nav_msgs
48 | roscpp
49 | tf
50 | stage_ros
51 | roslib
52 | message_generation
53 | actionlib
54 | move_base_msgs
55 | nav_msgs
56 | roscpp
57 | tf
58 | stage_ros
59 | roslib
60 | message_runtime
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/params/DTA/DTAGreedy.params:
--------------------------------------------------------------------------------
1 | [SECTION Main]
2 |
3 | PROFILE default
4 |
5 |
6 | [END]
7 |
8 |
9 | [PROFILE default]
10 |
11 | theta_idleness 1.0
12 | theta_navigation -0.75
13 | theta_distance_from_origin -5.0
14 |
15 | [END]
16 |
17 |
18 |
--------------------------------------------------------------------------------
/params/DTA/DTASSI.params:
--------------------------------------------------------------------------------
1 | [SECTION Main]
2 |
3 | PROFILE default
4 |
5 | [END]
6 |
7 | [PROFILE default]
8 |
9 | timeout 3.0
10 | theta_idleness 1.0
11 | theta_hop -2.0
12 |
13 | theta_navigation 0.0
14 | threshold 0.0
15 | hist 0.0
16 |
17 | [END]
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/params/amcl/amcl_diff.launch:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/params/initial_poses.txt:
--------------------------------------------------------------------------------
1 | [InitialPoses]
2 | grid_1: [1.425, 24.375]
3 | grid_2: [1.425, 24.375, 12.825, 18.675]
4 | grid_4: [1.425, 24.375, 12.825, 7.275, 24.375, 24.375, 12.825, 18.675]
5 | grid_4_a: [1.5, 1.5, 1.5, 0.7, 0.7, 1.5, 0.7, 0.7]
6 | grid_5: [1.425, 13.0, 7.275, 13.0, 12.825, 13.0, 18.525, 13.0, 24.375, 13.0]
7 | grid_6: [18.525, 24.375, 12.825, 12.975, 1.425, 7.275, 7.125, 18.675, 1.425, 24.375, 7.125, 7.275]
8 | grid_8: [1.425, 7.275, 7.125, 7.275, 24.225, 7.275, 7.125, 18.675, 1.425, 23.375, 12.825, 1.575, 24.2, 24.38, 12.825, 12.975]
9 | grid_10: [12.825, 24.375, 7.125, 7.275, 1.425, 18.675, 7.125, 18.675, 1.425, 24.375, 12.825, 1.575, 24.225, 24.375, 12.825, 12.975, 18.525, 7.275, 24.225, 1.575]
10 | grid_12: [12.825, 24.375, 7.125, 7.275, 1.425, 18.675, 7.125, 18.675, 1.425, 24.375, 12.825, 1.575, 24.225, 24.375, 12.825, 12.975, 18.525, 7.275, 24.225, 1.575, 1.425, 1.575, 18.525, 18.675]
11 | example_1: [42.45, 19.80]
12 | example_2: [23.40, 12.90, 3.90, 27.60 ]
13 | example_4: [5.1, 3.75, 14.4, 28.05, 32.70, 15.6, 3.90, 27.6]
14 | example_4_a: [6.0, 3.75, 9.0, 3.75, 12.0, 3.75, 15.0, 3.75]
15 | example_6: [32.55, 27.0, 10.65, 23.40, 23.4, 6.9, 3.9, 27.6, 5.1, 3.75, 27.6, 23.1]
16 | example_8: [42.45, 19.80, 27.60, 23.10, 37.95, 22.80, 10.65, 23.40, 38.10, 3.90, 14.55, 16.75, 15.55, 14.75, 3.90, 27.60]
17 | example_10: [32.55, 27.0, 10.65, 23.40, 23.4, 6.9, 3.9, 27.6, 5.1, 3.75, 27.6, 23.1, 31.25, 9.75, 42.3, 15.15, 6.75, 8.7, 38.1, 3.9]
18 | example_12: [32.55, 27.0, 10.65, 23.40, 23.4, 6.9, 3.9, 27.6, 5.1, 3.75, 27.6, 23.1, 31.25, 9.75, 42.3, 15.15, 6.75, 8.7, 38.1, 3.9, 23.4, 12.9, 11.55, 28.5]
19 | cumberland_1: [2.325, 21.675]
20 | cumberland_2: [22.8, 21.975, 2.325, 21.675]
21 | cumberland_4: [49.875, 11.325, 2.325, 21.675, 22.8, 21.975, 26.25, 18.525]
22 | cumberland_4_a: [49.0, 11.0, 49.0, 10.0, 49.0, 9.0, 49.0, 8.0]
23 | cumberland_4_b: [3.0, 12.0, 6.0, 12.0, 9.0, 12.0, 12.0, 12.0]
24 | cumberland_4_c: [22.0, 21.0, 24.0, 21.0, 22.0, 23.0, 24.0, 23.0]
25 | cumberland_6: [38.625, 16.5, 26.25, 18.525, 46.0, 24.5, 2.325, 21.675, 21.525, 25.05, 23.1, 12.0]
26 | cumberland_8: [46.0, 24.5, 2.325, 21.675, 22.8, 21.975, 37.05, 10.875, 44.0, 11.0, 10.725, 12.0, 41.775, 30.375, 16.575, 12.375]
27 | cumberland_10: [35.175, 22.575, 16.575, 14.5, 22.125, 27.525, 27.975, 12.075, 46.8, 21.9, 6.15, 21.0, 40.0, 34.0, 18.5, 12.375, 40.65, 3.225, 6.15, 12.0]
28 | cumberland_12: [35.175, 22.575, 16.575, 14.5, 22.125, 27.525, 27.975, 12.075, 46.8, 21.9, 6.15, 21.0, 21.525, 25.05, 18.5, 12.375, 40.65, 3.225, 6.15, 12.0, 41.775, 30.375, 35.025, 15.975]
29 | 1r5_1: [10.15, 7.60]
30 | 1r5_2: [4.4, 9.6, 2.7, 4.05 ]
31 | 1r5_4: [5.8, 7.35, 1.00, 7.50, 2.00, 2.00, 10.15, 7.60 ]
32 | broughton_1: [28.5, 9.5]
33 | broughton_2: [28.5, 9.5, 75.5, 63.5]
34 | broughton_4: [28.5, 9.5, 39.0, 20.0, 72.0, 19.5, 75.5, 63.5]
35 | broughton_6: [28.5, 9.5, 39.0, 20.0, 52.0, 19.5, 72.0, 19.5, 72.0, 40.0, 75.5, 63.5]
36 | broughton_8: [28.5, 9.5, 39.0, 20.0, 52.0, 19.5, 72.0, 19.5, 72.0, 40.0, 75.5, 63.5, 56.0, 63.5, 92.0, 63.5]
37 | DIAG_labs_1: [9.5, 22.0]
38 | DIAG_labs_2: [9.5, 22.0, 18.5, 7.5]
39 | DIAG_labs_4: [9.5, 22.0, 18.5, 7.5, 9.5, 33.0, 38.5, 7.0]
40 | DIAG_labs_6: [9.5, 22.0, 18.5, 7.5, 9.5, 33.0, 38.5, 7.0, 9.5, 13.0, 29.0, 7.0]
41 | DIAG_labs_8: [9.5, 22.0, 18.5, 7.5, 9.5, 33.0, 38.5, 7.0, 9.5, 13.0, 29.0, 7.0, 9.5, 7.0, 46.0, 7.0]
42 | DIAG_floor1_2: [12.0, 11.0, 102.0, 12.0]
43 | DIAG_floor1_4: [12.0, 11.0, 102.0, 12.0, 12.0, 35.0, 102.5, 36.0]
44 | DIAG_floor1_6: [12.0, 11.0, 102.0, 12.0, 12.0, 35.0, 102.5, 36.0, 66.0, 11.5, 48.5, 11.0]
45 | DIAG_floor1_8: [12.0, 11.0, 102.0, 12.0, 12.0, 35.0, 102.5, 36.0, 66.0, 11.5, 48.5, 11.0, 12.0, 24.0, 102.0, 24.0 ]
46 | ctcv_3: [24.0, 0.5, -0.5, 2.0, -28.0, 3.0]
47 | move_base_arena_3: [-4.0, -4.0, 1.5, 4.0, 4.25, -3.5]
--------------------------------------------------------------------------------
/params/move_base/base_local_planner_params.yaml:
--------------------------------------------------------------------------------
1 | controller_frequency: 5.0
2 | TrajectoryPlannerROS:
3 | max_vel_x: 1.00
4 | min_vel_x: 0.10
5 | max_trans_vel: 1.00
6 | min_trans_vel: 0.10
7 | max_rot_vel: 1.0
8 | min_in_place_rotational_vel: 0.1
9 | acc_lim_th: 0.75
10 | acc_lim_x: 0.50
11 | acc_lim_y: 0.50
12 |
13 | holonomic_robot: false
14 | #yaw_goal_tolerance: 0.05
15 | yaw_goal_tolerance: 6.28
16 | xy_goal_tolerance: 0.40
17 |
18 | #~/pdist_scale (double, default: 0.6)
19 | # The weighting for how much the controller should stay close to the path it was given
20 | #~/gdist_scale (double, default: 0.8)
21 | # The weighting for how much the controller should attempt to reach its local goal, also controls speed
22 | #~/occdist_scale (double, default: 0.01)
23 | # The weighting for how much the controller should attempt to avoid obstacles
24 |
25 | pdist_scale: 0.6
26 | gdist_scale: 0.8
27 | occdist_scale: 0.2
28 |
29 |
30 | meter_scoring: true
31 |
32 | sim_time: 1.5
33 | heading_lookahead: 0.325
34 | oscillation_reset_dist: 0.05
35 |
36 | vx_samples: 6
37 | vtheta_samples: 20
38 |
39 | dwa: true
40 |
41 | # goal_distance_bias: 32 # default 32.0
42 | # path_distance_bias: 24 # default 24.0
43 |
44 |
45 |
--------------------------------------------------------------------------------
/params/move_base/costmap_common_params.yaml:
--------------------------------------------------------------------------------
1 | obstacle_range: 2.5
2 | raytrace_range: 3.0
3 | robot_radius: 0.33
4 | inflation_radius: 0.33
5 | # cost_scaling_factor (double, default: 10.0)
6 | # A scaling factor to apply to cost values during inflation. The cost function is computed as follows for all cells in the costmap further than the inscribed radius distance and closer than the inflation radius distance away from an actual obstacle: exp(-1.0 * cost_scaling_factor * (distance_from_obstacle - inscribed_radius)) * (costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1), where costmap_2d::INSCRIBED_INFLATED_OBSTACLE is currently 254. NOTE: since the cost_scaling_factor is multiplied by a negative in the formula, increasing the factor will decrease the resulting cost values.
7 | #cost_scaling_factor: 10.0
8 | observation_sources: laser_scan_sensor
9 | laser_scan_sensor: {sensor_frame: base_laser_link, data_type: LaserScan, topic: base_scan, marking: true, clearing: true}
10 |
--------------------------------------------------------------------------------
/params/move_base/global_costmap_params.yaml:
--------------------------------------------------------------------------------
1 | global_costmap:
2 | global_frame: map
3 | robot_base_frame: base_link
4 | update_frequency: 3.0
5 | publish_frequency: 0.0
6 | static_map: true
7 | inflation_radius: 0.66
8 |
--------------------------------------------------------------------------------
/params/move_base/local_costmap_params.yaml:
--------------------------------------------------------------------------------
1 | local_costmap:
2 | global_frame: odom
3 | robot_base_frame: base_link
4 | update_frequency: 3.0
5 | publish_frequency: 2.0
6 | static_map: false
7 | rolling_window: true
8 | width: 4.0
9 | height: 4.0
10 | resolution: 0.05
11 |
--------------------------------------------------------------------------------
/run_exp.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # GIT version. Please do not edit this file.
4 | # Make a copy and edit the copy.
5 | #
6 | # MAP: Available maps: grid, example, cumberland, broughton, DIAG_labs, DIAG_floor1
7 | # NROBOTS: number of robots
8 | # INITPOS: initial positions of the robots: (default,a,b,c,...)
9 | # ALG: Algorithm: RAND,CR,HCR,HPCC,CGG,MSP,GBS,SEBS,CBLS,DTAG,DTAP
10 | # LOC: Localization mode: AMCL, fake_localization
11 | # NAV: Navigation module: ros, spqrel_navigation
12 | # GWAIT: Goal wait: how much time the robot stops when it reaches a goal
13 | # COMMDELAY: communication delay of all messages (in seconds)
14 | # TERM: Terminal to use gnome-terminal,xterm
15 | # TIMEOUT: simulation timeout (seconds)
16 | # CUSTOM_STAGE: flag if custom version of Stage is used: true, false
17 | # SPEEDUP: simulator speedup (if Custom Stage is used)
18 |
19 | MAP=DISlabs
20 | NROBOTS=8
21 | INITPOS=default
22 | ALG=DTAP
23 | LOC=AMCL
24 | NAV=ros
25 | GWAIT=3
26 | COMMDELAY=0.2
27 | TERM=gnome-terminal
28 | TIMEOUT=1800
29 | CUSTOM_STAGE=false
30 | SPEEDUP=1.0
31 |
32 | ./start_experiment.py $MAP $NROBOTS $INITPOS $ALG $LOC $NAV $GWAIT $COMMDELAY $TERM $TIMEOUT $CUSTOM_STAGE $SPEEDUP
33 |
34 | # The command terminates after TIMEOUT. More instances of this command can be repeated for performing
35 | # multiple batch experiments.
36 | #
37 | # E.g., the following script runs three experiments with different number of robots
38 | #
39 | # NROBOTS=4
40 | # ./start_experiment.py $MAP $NROBOTS $INITPOS $ALG $LOC $NAV $GWAIT $COMMDELAY $TERM $TIMEOUT $CUSTOM_STAGE $SPEEDUP
41 | # NROBOTS=6
42 | # ./start_experiment.py $MAP $NROBOTS $INITPOS $ALG $LOC $NAV $GWAIT $COMMDELAY $TERM $TIMEOUT $CUSTOM_STAGE $SPEEDUP
43 | # NROBOTS=8
44 | # ./start_experiment.py $MAP $NROBOTS $INITPOS $ALG $LOC $NAV $GWAIT $COMMDELAY $TERM $TIMEOUT $CUSTOM_STAGE $SPEEDUP
45 |
46 |
--------------------------------------------------------------------------------
/setinitposes.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 |
4 | import sys, time, os
5 | from math import degrees, radians
6 |
7 | colors = ['blue', 'red', 'cyan', 'magenta', 'blue', 'red', 'cyan', 'magenta', 'blue', 'red', 'cyan', 'magenta']
8 |
9 | def setIP(mapname,vip):
10 | cmd = 'rosparam set initial_pos "'+vip+'"'
11 | print(cmd)
12 | os.system(cmd)
13 | ip = eval(vip)
14 | n = int(len(ip)/2)
15 | print("Set initial poses of ",n," robots")
16 |
17 | fnr = 'maps/'+mapname+'/robots.inc'
18 | fr = open(fnr, 'w')
19 |
20 | for i in range(0,n):
21 | x = ip[i*2]
22 | y = ip[i*2+1]
23 | th = 90
24 | fn = 'params/amcl/robot_'+str(i)+'_initial_pose.xml'
25 | f = open(fn, 'w')
26 | f.write('\n')
27 | f.write(' \n')
28 | f.write(' \n')
29 | f.write(' \n')
30 | f.write(' \n')
31 | f.write(' \n')
32 | f.write(' \n')
33 | f.write('\n')
34 | f.close()
35 |
36 | fr.write('crobot( pose [ '+str(x)+' '+str(y)+' 0 '+str(th)+' ] name "robot'+str(i)+'" color "'+colors[i]+'")\n')
37 |
38 |
39 | if (n==1):
40 | # inactive robot for having correct namespaces
41 | fr.write('crobot( pose [ -2.0 -2.0 0 0.0 ] name "robot1" color "red")\n')
42 |
43 | fr.close()
44 |
45 |
46 |
47 | if __name__ == '__main__':
48 | if (len(sys.argv)<3):
49 | sys.exit(0)
50 | mapname = sys.argv[1]
51 | vip = sys.argv[2]
52 | setIP(mapname,vip)
53 |
--------------------------------------------------------------------------------
/src/Conscientious_Cognitive_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: David Portugal (2011-2014), and Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 |
48 | #include "algorithms.h"
49 |
50 | class Conscientious_Cognitive_Agent: public PatrolAgent {
51 | private:
52 | bool inpath;
53 | uint *path;
54 | uint elem_s_path, i_path;
55 | public:
56 | virtual void init(int argc, char** argv);
57 | virtual int compute_next_vertex();
58 | virtual void onGoalComplete();
59 | //virtual void send_results();
60 | //virtual void receive_results();
61 | };
62 |
63 | void Conscientious_Cognitive_Agent::init(int argc, char** argv)
64 | {
65 | PatrolAgent::init(argc,argv);
66 |
67 | inpath = false;
68 | path = new uint[dimension];
69 | elem_s_path=0; i_path=0;
70 | }
71 |
72 | int Conscientious_Cognitive_Agent::compute_next_vertex() {
73 | return heuristic_pathfinder_conscientious_cognitive(current_vertex, vertex_web, instantaneous_idleness, dimension, path);
74 | }
75 |
76 |
77 | void Conscientious_Cognitive_Agent::onGoalComplete()
78 | {
79 |
80 | if (i_path>0) { //nao faz update no inicio
81 | //Update Idleness Table:
82 | update_idleness();
83 | current_vertex = next_vertex;
84 | }
85 |
86 | if (inpath){
87 | //The robot is on its way to a global objective -> get NEXT_VERTEX from its path:
88 | i_path++; //desde que nao passe o tamanho do path
89 |
90 | if (i_path
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 |
48 |
49 |
50 | class Conscientious_Reactive_Agent: public PatrolAgent {
51 |
52 | public:
53 | virtual int compute_next_vertex();
54 | //virtual void send_results();
55 | //virtual void receive_results();
56 | };
57 |
58 |
59 |
60 | int Conscientious_Reactive_Agent::compute_next_vertex() {
61 |
62 | //number of neighbors of current vertex (number of existing possibilites)
63 | uint num_neighs = vertex_web[current_vertex].num_neigh;
64 | uint next_vertex;
65 |
66 | if (num_neighs > 1){
67 |
68 | double decision_table [num_neighs];
69 | uint neighbors [num_neighs];
70 | uint possibilities[num_neighs];
71 |
72 | uint i, hits=0;
73 | double max_idleness= -1;
74 |
75 | for (i=0; i idleness %.1f\n",neighbors[i],decision_table[i]);
79 |
80 | //choose the one with maximum idleness:
81 | if (decision_table[i] > max_idleness){
82 | max_idleness = decision_table[i]; //maximum idleness
83 | hits=0;
84 | possibilities[hits] = neighbors[i];
85 | }
86 | else if(decision_table[i] == max_idleness) {
87 | hits ++;
88 | possibilities[hits] = neighbors[i];
89 | }
90 | }
91 |
92 | if(hits>0){ //more than one possibility (choose at random)
93 | srand ( time(NULL) );
94 | i = rand() % (hits+1) + 0; //0, ... ,hits
95 |
96 | //printf("rand integer = %d\n", i);
97 | next_vertex = possibilities [i]; // random vertex with higher idleness
98 |
99 | }else{
100 | next_vertex = possibilities[hits]; //vertex with higher idleness
101 | }
102 |
103 | }else{
104 | next_vertex = vertex_web[current_vertex].id_neigh[0]; //only one possibility
105 | }
106 |
107 | ROS_INFO("Conscientious_Reactive choice: %d",next_vertex);
108 | return next_vertex;
109 | }
110 |
111 | #if 0
112 | // FIXME Not needed at all, right?
113 | void Conscientious_Reactive_Agent::send_results() {
114 | ros::spinOnce();
115 | }
116 |
117 | void Conscientious_Reactive_Agent::receive_results() {
118 | ros::spinOnce();
119 | }
120 | #endif
121 |
122 | int main(int argc, char** argv) {
123 |
124 | Conscientious_Reactive_Agent agent;
125 | agent.init(argc,argv);
126 | agent.run();
127 |
128 | return 0;
129 | }
130 |
131 |
--------------------------------------------------------------------------------
/src/Cyclic_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: David Portugal (2011-2014), and Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 | #include "algorithms.h"
48 |
49 | class Cyclic_Agent: public PatrolAgent {
50 | private:
51 | int *path;
52 | int path_elements;
53 | int i_vertex;
54 | public:
55 | virtual void init(int argc, char** argv);
56 | virtual int compute_next_vertex();
57 | //virtual void send_results();
58 | //virtual void receive_results();
59 | };
60 |
61 | void Cyclic_Agent::init(int argc, char** argv) {
62 |
63 | PatrolAgent::init(argc,argv);
64 |
65 | //robot's cyclic path:
66 | path = new int[8*dimension];
67 |
68 | //get cyclic path:
69 | path_elements = cyclic(dimension, vertex_web, path);
70 |
71 | //Shift the cyclic path to start at the current vertex:
72 | shift_cyclic_path (current_vertex, path, path_elements);
73 |
74 | printf("\nFinal Path: ");
75 | for(int i=0; i1) { i_vertex=1; next_vertex = path[i_vertex]; }
81 |
82 | }
83 |
84 | int Cyclic_Agent::compute_next_vertex() {
85 | i_vertex++;
86 | if ( i_vertex>=path_elements ){ i_vertex=1;}
87 | return path[i_vertex];
88 | }
89 |
90 | #if 0
91 | // FIXME DONE
92 | void Cyclic_Agent::send_results() {
93 | ros::spinOnce();
94 | }
95 |
96 | // FIXME DONE
97 | void Cyclic_Agent::receive_results() {
98 | ros::spinOnce();
99 | }
100 | #endif
101 |
102 |
103 | int main(int argc, char** argv) {
104 |
105 | Cyclic_Agent agent;
106 | agent.init(argc,argv);
107 | agent.run();
108 |
109 | return 0;
110 | }
111 |
--------------------------------------------------------------------------------
/src/DTASSIPart_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include "SSIPatrolAgent.h"
39 |
40 |
41 |
42 |
43 | //Sequential Single Item Auction with dynamic compact partition of the environment
44 | class DTASSIPart_Agent: public SSIPatrolAgent {
45 |
46 | protected:
47 | //center location given current tasks: task location that is at minimum path distance from all other locations. This is always a task location.
48 | size_t current_center_location;
49 |
50 | //compute minimum path cost considering all tasks (tasks) and the next vertex (nv).
51 | //The first room is always the current goal (if any), then rooms are visited in decreasing order of utility.
52 | //The path cost is sum of travel cost given the order.
53 | double compute_bid(int nv);
54 |
55 | //update tasks setting to true only the vertices for which this robot has the current highest bid
56 | //based on the array bids
57 | void update_tasks();
58 |
59 | //compute center point given current tasks
60 | void compute_center_location();
61 |
62 | double compute_sum_distance(int cv);
63 |
64 |
65 |
66 | public:
67 |
68 | DTASSIPart_Agent(){}
69 |
70 | void init(int argc, char** argv);
71 |
72 |
73 | };
74 |
75 | void DTASSIPart_Agent::init(int argc, char** argv) {
76 |
77 | // logfile = fopen("DTASSIOut.log","w");
78 |
79 | // fprintf(logfile,"INITIALIZING \n");
80 | // fflush(logfile);
81 |
82 | SSIPatrolAgent::init(argc,argv);
83 |
84 | // fprintf(logfile,"INITIALIZING 2 \n");
85 | // fflush(logfile);
86 |
87 | //set current center location to current vertex
88 | current_center_location = current_vertex;
89 |
90 | // fprintf(logfile,"initialised current center location to: %d \n",current_center_location);
91 |
92 | //initialize parameters
93 |
94 | }
95 |
96 | double DTASSIPart_Agent::compute_bid(int nv){
97 |
98 | /*printf("computing bid for vertex %d (using dynamic partition) \n ",nv);
99 | printf("current tasks = ");
100 | for (size_t i = 0; i= 0 && next_vertex = dimension){
152 | // printf("return big number: cv = %d",cv);
153 | return BIG_NUMBER;
154 | }
155 | double sum = 0.;
156 | for (size_t i = 0; i, ",bids[i].bidValue,bids[i].robotId);
177 | }
178 | printf("] \n");
179 |
180 | printf("center location before %d \n",current_center_location);
181 |
182 | ------------*/
183 |
184 | int value = ID_ROBOT;
185 | if (value==-1){value=0;}
186 |
187 | nactivetasks=0;
188 | bool changed = false;
189 | for (size_t i = 0; i< dimension; i++){
190 | if (!changed && tasks[i] != (bids[i].robotId == value)){
191 | changed = true;
192 | }
193 | tasks[i] = (bids[i].robotId == value);
194 | if (tasks[i]) nactivetasks++;
195 | }
196 |
197 | if (changed){
198 | compute_center_location();
199 | }
200 |
201 | #if DEBUG_PRINT
202 |
203 | printf("DTAP current center location: %lu\n",current_center_location);
204 | printf("DTAP: Active Tasks %d [",nactivetasks);
205 | for (size_t i = 0; i
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 | #include "getgraph.h"
48 | #include "algorithms.h"
49 |
50 |
51 | using namespace std;
52 |
53 | class GBS_Agent: public PatrolAgent {
54 |
55 | private:
56 |
57 | double G1, G2;
58 | double edge_min;
59 | int NUMBER_OF_ROBOTS;
60 | bool arrived;
61 | uint vertex_arrived;
62 | int robot_arrived;
63 |
64 | public:
65 | virtual void init(int argc, char** argv);
66 | virtual int compute_next_vertex();
67 | virtual void send_results();
68 | virtual void receive_results();
69 | virtual void processEvents();
70 | };
71 |
72 |
73 |
74 | void GBS_Agent::init(int argc, char** argv) {
75 |
76 | PatrolAgent::init(argc,argv);
77 |
78 | NUMBER_OF_ROBOTS = atoi(argv[3]);
79 | arrived = false;
80 |
81 | /** Define G1 and G2 **/
82 | G1 = 0.1;
83 |
84 | //default:
85 | G2 = 100.0;
86 | edge_min = 1.0;
87 |
88 | if (graph_file=="maps/grid/grid.graph") {
89 | if (NUMBER_OF_ROBOTS == 1){G2 = 20.54;}
90 | if (NUMBER_OF_ROBOTS == 2){G2 = 17.70;}
91 | if (NUMBER_OF_ROBOTS == 4){G2 = 11.15;}
92 | if (NUMBER_OF_ROBOTS == 6){G2 = 10.71;}
93 | if (NUMBER_OF_ROBOTS == 8){G2 = 10.29;}
94 | if (NUMBER_OF_ROBOTS == 12){G2 = 9.13;}
95 |
96 | }else if (graph_file=="maps/example/example.graph") {
97 | if (NUMBER_OF_ROBOTS == 1){G2 = 220.0;}
98 | if (NUMBER_OF_ROBOTS == 2){G2 = 180.5;}
99 | if (NUMBER_OF_ROBOTS == 4){G2 = 159.3;}
100 | if (NUMBER_OF_ROBOTS == 6){G2 = 137.15;}
101 | if (NUMBER_OF_ROBOTS == 8 || NUMBER_OF_ROBOTS == 12){G2 = 126.1;}
102 | edge_min = 20.0;
103 |
104 | }else if (graph_file=="maps/cumberland/cumberland.graph") {
105 | if (NUMBER_OF_ROBOTS == 1){G2 = 152.0;}
106 | if (NUMBER_OF_ROBOTS == 2){G2 = 100.4;}
107 | if (NUMBER_OF_ROBOTS == 4){G2 = 80.74;}
108 | if (NUMBER_OF_ROBOTS == 6){G2 = 77.0;}
109 | if (NUMBER_OF_ROBOTS == 8 || NUMBER_OF_ROBOTS == 12){G2 = 63.5;}
110 | edge_min = 50.0;
111 |
112 | }
113 |
114 | printf("G1 = %f, G2 = %f\n", G1, G2);
115 | }
116 |
117 | // Executed at any cycle when goal is not reached
118 | void GBS_Agent::processEvents() {
119 |
120 | if (arrived && NUMBER_OF_ROBOTS>1){ //a different robot arrived at a vertex: update idleness table and keep track of last vertices positions of other robots.
121 |
122 | //Update Idleness Table:
123 | double now = ros::Time::now().toSec();
124 |
125 | for(int i=0; i::const_iterator it = vresults.begin();
161 | int id_sender = *it; it++;
162 | int msg_type = *it; it++;
163 |
164 | int value = ID_ROBOT;
165 | if (value==-1){value=0;}
166 |
167 | if ((id_sender==value) || (msg_type!=GBS_MSG_TYPE))
168 | return;
169 |
170 | robot_arrived = vresults[0];
171 | vertex_arrived = vresults[2];
172 | arrived = true;
173 | }
174 |
175 |
176 | int main(int argc, char** argv) {
177 |
178 | GBS_Agent agent;
179 | agent.init(argc,argv);
180 | agent.run();
181 |
182 | return 0;
183 | }
184 |
--------------------------------------------------------------------------------
/src/GoToStartPos.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include "patrolling_sim/GoToStartPosSrv.h"
7 |
8 |
9 | typedef actionlib::SimpleActionClient MoveBaseClient;
10 |
11 | using namespace std;
12 |
13 | ros::NodeHandle* n_ptr;
14 | int teamsize;
15 | double last_cmd_vel_time;
16 |
17 |
18 | void cmd_velCB(const geometry_msgs::Twist::ConstPtr& msg){
19 | //ROS_INFO("receiving cmd_vels");
20 | last_cmd_vel_time = ros::Time::now().toSec();
21 | }
22 |
23 |
24 | bool GotoStartPosSrvCallback(patrolling_sim::GoToStartPosSrv::Request& Req, patrolling_sim::GoToStartPosSrv::Response& Rep){
25 |
26 | if (Req.teamsize.data != teamsize) {
27 | ROS_INFO("Service was called with a different team size (%d) than expected (%d). Leaving.", Req.teamsize.data, teamsize);
28 | return false;
29 | }
30 |
31 | double starting_patrol_pos_x [teamsize];
32 | double starting_patrol_pos_y [teamsize];
33 |
34 | //list of doubles from the parameter server
35 | vector initial_pos_list;
36 | n_ptr->getParam("initial_pos", initial_pos_list);
37 |
38 | unsigned i;
39 | int j=0; //robot id
40 |
41 | for(i = 0; i < initial_pos_list.size(); i++) {
42 | if ( i % 2 == 0 ){ //even: x
43 | starting_patrol_pos_x[j] = initial_pos_list[i];
44 | //ROS_INFO("starting_patrol_pos_x[%d] = %f", j, starting_patrol_pos_x[j]);
45 |
46 | }else{ //odd: y
47 | starting_patrol_pos_y[j] = initial_pos_list[i];
48 | //ROS_INFO("starting_patrol_pos_y[%d] = %f", j, starting_patrol_pos_y[j]);
49 | j++;
50 | }
51 | }
52 |
53 |
54 | //connect to move_base server and send robots one by one to starting positions...
55 |
56 | //array of pointers:
57 | MoveBaseClient *ac_ptr[teamsize];
58 | ros::Rate loop_rate(1); //1 sec
59 |
60 | for (j=teamsize-1; j>=0; j--){
61 |
62 | char move_string[20];
63 | sprintf(move_string,"robot_%d/move_base",j);
64 | //ROS_INFO("%s",move_string);
65 |
66 |
67 | MoveBaseClient ac(move_string, true);
68 | ac_ptr[j] = ∾
69 |
70 | //wait for the action server to come up
71 | while(!ac.waitForServer(ros::Duration(5.0))){
72 | ROS_INFO("Waiting for the move_base action server to come up");
73 | }
74 | ROS_INFO("Connected with move_base action server");
75 |
76 | move_base_msgs::MoveBaseGoal goal;
77 |
78 | geometry_msgs::Quaternion angle_quat = tf::createQuaternionMsgFromYaw(0.0);
79 |
80 | //we'll send a goal to the robot to move 1 meter forward
81 | goal.target_pose.header.frame_id = "/map";
82 | goal.target_pose.header.stamp = ros::Time::now();
83 | goal.target_pose.pose.position.x = starting_patrol_pos_x[j];
84 | goal.target_pose.pose.position.y = starting_patrol_pos_y[j];
85 | goal.target_pose.pose.orientation = angle_quat; //doesn't matter really.
86 |
87 | ROS_INFO("Sending goal");
88 | ac.sendGoal(goal);
89 |
90 | //wait a bit and send next goal to other robots.
91 |
92 | i=0;
93 |
94 | while( i cmd_vel_topic_array(32, "");
130 | teamsize=0;
131 |
132 | for (ros::master::V_TopicInfo::iterator it = master_topics.begin() ; it != master_topics.end(); it++) {
133 | const ros::master::TopicInfo& info = *it;
134 | if(info.datatype=="geometry_msgs/Twist"){ //cmd_vel topics
135 | cmd_vel_topic_array[teamsize] = info.name;
136 | teamsize++;
137 | }
138 | }
139 |
140 | //for(int o=0; o cmd_vel_sub(teamsize);
151 |
152 | for(int o=0; o
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 | #include "algorithms.h"
48 |
49 | class Heuristic_Conscientious_Reactive_Agent: public PatrolAgent {
50 |
51 | public:
52 | virtual int compute_next_vertex();
53 | //virtual void send_results();
54 | //virtual void receive_results();
55 | };
56 |
57 | int Heuristic_Conscientious_Reactive_Agent::compute_next_vertex() {
58 | return heuristic_conscientious_reactive(current_vertex, vertex_web, instantaneous_idleness);
59 | }
60 |
61 | #if 0
62 | // FIXME DONE
63 | void Heuristic_Conscientious_Reactive_Agent::send_results() {
64 | ros::spinOnce();
65 | }
66 |
67 | // FIXME DONE
68 | void Heuristic_Conscientious_Reactive_Agent::receive_results() {
69 | ros::spinOnce();
70 | }
71 | #endif
72 |
73 | int main(int argc, char** argv) {
74 |
75 | Heuristic_Conscientious_Reactive_Agent agent;
76 | agent.init(argc,argv);
77 | agent.run();
78 |
79 | return 0;
80 | }
81 |
82 |
--------------------------------------------------------------------------------
/src/MSP_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: David Portugal (2011-2014), and Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 |
47 | #include "PatrolAgent.h"
48 | #include "algorithms.h"
49 |
50 | using namespace std;
51 |
52 | class MSP_Agent: public PatrolAgent {
53 |
54 | private:
55 | int i_vertex;
56 | uint route_dimension;
57 | uint *route;
58 |
59 | public:
60 | virtual void init(int argc, char** argv);
61 | virtual int compute_next_vertex();
62 | //virtual void send_results();
63 | //virtual void receive_results();
64 | };
65 |
66 |
67 |
68 | void MSP_Agent::init(int argc, char** argv) {
69 |
70 | string msp_file = string(argv[4]);
71 |
72 | PatrolAgent::init(argc,argv);
73 |
74 | //Check Route Dimension:
75 | route_dimension = get_MSP_dimension(msp_file.c_str());
76 |
77 | //Create Structure to save the Route Info;
78 | route = new uint[route_dimension];
79 |
80 | //Get the Route info from the MSP Route File
81 | get_MSP_route (route, route_dimension, msp_file.c_str());
82 |
83 | printf("\nFinal Path: ");
84 | for(size_t i=0; i1){ i=1; next_vertex = route[i]; }
94 |
95 | }
96 |
97 | int MSP_Agent::compute_next_vertex() {
98 | i_vertex++;
99 | if ( i_vertex>=route_dimension )
100 | i_vertex=1;
101 | return route[i_vertex];
102 | }
103 |
104 | #if 0
105 | // FIXME DONE
106 | void MSP_Agent::send_results() {
107 | ros::spinOnce();
108 | }
109 |
110 | // FIXME DONE
111 | void MSP_Agent::receive_results() {
112 | ros::spinOnce();
113 | }
114 | #endif
115 |
116 | int main(int argc, char** argv) {
117 |
118 | MSP_Agent agent;
119 | agent.init(argc,argv);
120 | agent.run();
121 |
122 | return 0;
123 | }
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/src/PatrolAgent.h:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 | #include
47 | #include
48 |
49 |
50 | #include "getgraph.h"
51 |
52 | #define NUM_MAX_ROBOTS 32
53 | #define INTERFERENCE_DISTANCE 2
54 |
55 | #include "message_types.h"
56 |
57 | typedef unsigned int uint;
58 | typedef actionlib::SimpleActionClient MoveBaseClient;
59 |
60 | class PatrolAgent {
61 |
62 | protected:
63 |
64 | int TEAMSIZE;
65 | int ID_ROBOT;
66 |
67 | double xPos[NUM_MAX_ROBOTS]; //tabelas de posições (atençao ao index pro caso de 1 so robot)
68 | double yPos[NUM_MAX_ROBOTS]; //tabelas de posições (atençao ao index pro caso de 1 so robot)
69 |
70 | tf::TransformListener *listener;
71 |
72 | std::string graph_file, mapname;
73 | uint dimension; // Graph Dimension
74 | uint current_vertex; // current vertex
75 | bool ResendGoal; // Send the same goal again (if goal failed...)
76 | bool interference;
77 | double last_interference;
78 | bool goal_complete;
79 | bool initialize;
80 | bool end_simulation;
81 | int next_vertex;
82 | // uint backUpCounter;
83 | vertex *vertex_web;
84 | double *instantaneous_idleness; // local idleness
85 | double *last_visit;
86 | std::vector vresults; // results exchanged among robots
87 | bool goal_canceled_by_user;
88 | double goal_reached_wait, communication_delay, last_communication_delay_time, lost_message_rate;
89 | std::string initial_positions;
90 | int aborted_count, resend_goal_count;
91 |
92 | MoveBaseClient *ac; // action client for reaching target goals
93 |
94 | ros::Subscriber odom_sub, positions_sub;
95 | ros::Publisher positions_pub;
96 | ros::Subscriber results_sub;
97 | ros::Publisher results_pub;
98 | ros::Publisher cmd_vel_pub;
99 |
100 |
101 | public:
102 |
103 | PatrolAgent() {
104 | listener=NULL;
105 | next_vertex = -1;
106 | initialize = true;
107 | end_simulation = false;
108 | ac = NULL;
109 | }
110 |
111 | virtual void init(int argc, char** argv);
112 | void ready();
113 | void initialize_node();
114 | void readParams(); // read ROS parameters
115 | void update_idleness(); // local idleness
116 |
117 | virtual void run();
118 |
119 | void getRobotPose(int robotid, float &x, float &y, float &theta);
120 | void odomCB(const nav_msgs::Odometry::ConstPtr& msg);
121 |
122 | void sendGoal(int next_vertex);
123 | void cancelGoal();
124 |
125 | void goalDoneCallback(const actionlib::SimpleClientGoalState &state, const move_base_msgs::MoveBaseResultConstPtr &result);
126 | void goalActiveCallback();
127 | void goalFeedbackCallback(const move_base_msgs::MoveBaseFeedbackConstPtr &feedback);
128 |
129 |
130 | void send_goal_reached();
131 | bool check_interference (int ID_ROBOT);
132 | void do_interference_behavior();
133 | void backup();
134 |
135 | void onGoalNotComplete(); // what to do when a goal has NOT been reached (aborted)
136 |
137 | // Events
138 | virtual void onGoalComplete(); // what to do when a goal has been reached
139 | virtual void processEvents(); // processes algorithm-specific events
140 |
141 | // Robot-Robot Communication
142 | void send_positions();
143 | void receive_positions();
144 | virtual void send_results(); // when goal is completed
145 | virtual void receive_results(); // asynchronous call
146 | void do_send_message(std_msgs::Int16MultiArray &msg);
147 | void send_interference();
148 | void positionsCB(const nav_msgs::Odometry::ConstPtr& msg);
149 | void resultsCB(const std_msgs::Int16MultiArray::ConstPtr& msg);
150 |
151 | // Must be implemented by sub-classes
152 | virtual int compute_next_vertex() = 0;
153 |
154 | };
155 |
156 |
157 |
--------------------------------------------------------------------------------
/src/Random_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 | #include
47 |
48 | #include "PatrolAgent.h"
49 |
50 | class Random_Agent: public PatrolAgent {
51 |
52 | public:
53 | virtual int compute_next_vertex();
54 |
55 | };
56 |
57 |
58 | int Random_Agent::compute_next_vertex() {
59 | // Random algorithm
60 |
61 | //number of neighbors of current vertex (number of existing possibilites)
62 | uint num_neighs = vertex_web[current_vertex].num_neigh;
63 | uint next_vertex;
64 |
65 | srand ( time(NULL) );
66 | int i = rand() % num_neighs;
67 | next_vertex = vertex_web[current_vertex].id_neigh[i];
68 |
69 | ROS_INFO("Random choice: %d",next_vertex);
70 |
71 | return next_vertex;
72 | }
73 |
74 | int main(int argc, char** argv) {
75 |
76 | Random_Agent agent;
77 | agent.init(argc,argv);
78 | agent.run();
79 |
80 | return 0;
81 | }
82 |
--------------------------------------------------------------------------------
/src/SEBS_Agent.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: David Portugal (2011-2014), and Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 |
46 | #include "PatrolAgent.h"
47 | #include "getgraph.h"
48 | #include "algorithms.h"
49 |
50 |
51 | using namespace std;
52 |
53 | class SEBS_Agent: public PatrolAgent {
54 |
55 | private:
56 |
57 | double G1, G2;
58 | double edge_min;
59 | int NUMBER_OF_ROBOTS;
60 | int *tab_intention;
61 | bool arrived;
62 | uint vertex_arrived;
63 | int robot_arrived;
64 | bool intention;
65 | uint vertex_intention;
66 | int robot_intention;
67 |
68 | public:
69 | virtual void init(int argc, char** argv);
70 | virtual int compute_next_vertex();
71 | virtual void processEvents();
72 | virtual void send_results();
73 | virtual void receive_results();
74 | };
75 |
76 |
77 | void SEBS_Agent::init(int argc, char** argv) {
78 |
79 | PatrolAgent::init(argc,argv);
80 |
81 | NUMBER_OF_ROBOTS = atoi(argv[3]);
82 | arrived=false;
83 | intention=false;
84 |
85 | /** Define G1 and G2 **/
86 | G1 = 0.1;
87 |
88 | //default:
89 | G2 = 100.0;
90 | edge_min = 1.0;
91 |
92 | #if 0
93 | if (graph_file=="maps/grid/grid.graph") {
94 | if (NUMBER_OF_ROBOTS == 1){G2 = 20.54;}
95 | if (NUMBER_OF_ROBOTS == 2){G2 = 17.70;}
96 | if (NUMBER_OF_ROBOTS == 4){G2 = 11.15;}
97 | if (NUMBER_OF_ROBOTS == 6){G2 = 10.71;}
98 | if (NUMBER_OF_ROBOTS == 8){G2 = 10.29;}
99 | if (NUMBER_OF_ROBOTS == 12){G2 = 9.13;}
100 |
101 | }else if (graph_file=="maps/example/example.graph") {
102 | if (NUMBER_OF_ROBOTS == 1){G2 = 220.0;}
103 | if (NUMBER_OF_ROBOTS == 2){G2 = 180.5;}
104 | if (NUMBER_OF_ROBOTS == 4){G2 = 159.3;}
105 | if (NUMBER_OF_ROBOTS == 6){G2 = 137.15;}
106 | if (NUMBER_OF_ROBOTS == 8 || NUMBER_OF_ROBOTS == 12){G2 = 126.1;}
107 | edge_min = 20.0;
108 |
109 | }else if (graph_file=="maps/cumberland/cumberland.graph") {
110 | if (NUMBER_OF_ROBOTS == 1){G2 = 152.0;}
111 | if (NUMBER_OF_ROBOTS == 2){G2 = 100.4;}
112 | if (NUMBER_OF_ROBOTS == 4){G2 = 80.74;}
113 | if (NUMBER_OF_ROBOTS == 6){G2 = 77.0;}
114 | if (NUMBER_OF_ROBOTS == 8 || NUMBER_OF_ROBOTS == 12){G2 = 63.5;}
115 | edge_min = 50.0;
116 | }
117 | #endif
118 |
119 | printf("G1 = %f, G2 = %f\n", G1, G2);
120 |
121 | std::stringstream paramss;
122 | paramss << G1 << "," << G2;
123 |
124 | ros::param::set("/algorithm_params",paramss.str());
125 |
126 |
127 | //INITIALIZE tab_intention:
128 | tab_intention = new int[NUMBER_OF_ROBOTS];
129 | for (int i=0; i1){ //a different robot arrived at a vertex: update idleness table and keep track of last vertices positions of other robots.
139 |
140 | //ROS_INFO("Robot %d reached Goal %d.\n", robot_arrived, vertex_arrived);
141 |
142 | //Update Idleness Table:
143 | double now = ros::Time::now().toSec();
144 |
145 | for(int i=0; i1) {
159 | tab_intention[robot_intention] = vertex_intention;
160 | //printf("tab_intention[ID=%d]=%d\n",robot_intention,tab_intention[robot_intention]);
161 | intention = false;
162 | }
163 | // ros::spinOnce();
164 | }
165 |
166 | int SEBS_Agent::compute_next_vertex() {
167 | return state_exchange_bayesian_strategy(current_vertex, vertex_web, instantaneous_idleness, tab_intention, NUMBER_OF_ROBOTS, G1, G2, edge_min);
168 | }
169 |
170 |
171 | void SEBS_Agent::send_results() {
172 | int value = ID_ROBOT;
173 | if (value==-1){value=0;}
174 | // [ID,msg_type,vertex,intention]
175 | std_msgs::Int16MultiArray msg;
176 | msg.data.clear();
177 | msg.data.push_back(value);
178 | msg.data.push_back(SEBS_MSG_TYPE);
179 | msg.data.push_back(current_vertex);
180 | msg.data.push_back(next_vertex);
181 | do_send_message(msg);
182 | }
183 |
184 | void SEBS_Agent::receive_results() {
185 |
186 | std::vector::const_iterator it = vresults.begin();
187 | int id_sender = *it; it++;
188 | int msg_type = *it; it++;
189 |
190 | int value = ID_ROBOT;
191 | if (value==-1){value=0;}
192 |
193 | if ((id_sender==value) || (msg_type!=SEBS_MSG_TYPE))
194 | return;
195 |
196 | robot_arrived = vresults[0];
197 | vertex_arrived = vresults[2];
198 | arrived = true;
199 | robot_intention = vresults[0];
200 | vertex_intention = vresults[3];
201 | intention = true;
202 | }
203 |
204 | int main(int argc, char** argv) {
205 |
206 | SEBS_Agent agent;
207 | agent.init(argc,argv);
208 | agent.run();
209 |
210 | return 0;
211 | }
212 |
213 |
214 |
--------------------------------------------------------------------------------
/src/algorithms.h:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: David Portugal (2011-2014), and Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | typedef unsigned int uint;
39 |
40 |
41 | typedef struct {
42 | int id, dist, elem_path;
43 | int path[1000];
44 | bool visit;
45 | }s_path;
46 |
47 | typedef struct {
48 | int id, elem_path;
49 | double dist;
50 | int path[1000];
51 | bool visit;
52 | }s_path_mcost;
53 |
54 | typedef struct {
55 | uint current_vertex, next_vertex;
56 | double time_then;
57 | uint num_possible_neighs;
58 | uint id_neighbors [8];
59 | double idleness_old[8];
60 | uint node_count [8];
61 | double entropy;
62 |
63 | }reinforcement_learning;
64 |
65 |
66 | //inline long double log2_new(const long double x);
67 |
68 | uint random (uint current_vertex, vertex *vertex_web);
69 |
70 | uint conscientious_reactive (uint current_vertex, vertex *vertex_web, double *instantaneous_idleness);
71 |
72 | uint heuristic_conscientious_reactive (uint current_vertex, vertex *vertex_web, double *instantaneous_idleness);
73 |
74 | uint greedy_bayesian_strategy (uint current_vertex, vertex *vertex_web, double *instantaneous_idleness, double G1, double G2, double edge_min);
75 |
76 | int count_intention (uint vertex, int *tab_intention, int nr_robots);
77 |
78 | uint state_exchange_bayesian_strategy (uint current_vertex, vertex *vertex_web, double *instantaneous_idleness, int *tab_intention, int nr_robots, double G1, double G2, double edge_min);
79 |
80 | void dijkstra( uint source, uint destination, int *shortest_path, uint &elem_s_path, vertex *vertex_web, uint dimension);
81 |
82 | int is_neigh(uint vertex1, uint vertex2, vertex *vertex_web, uint dimension);
83 |
84 | void dijkstra_mcost( uint source, uint destination, int *shortest_path, uint &elem_s_path, vertex *vertex_web, double new_costs[][8], uint dimension);
85 |
86 | uint heuristic_pathfinder_conscientious_cognitive (uint current_vertex, vertex *vertex_web, double *instantaneous_idleness, uint dimension, uint *path);
87 |
88 | //Check if an element belongs to a table
89 | bool pertence (int elemento, int *tab, int tam_tab);
90 |
91 | int pertence_idx (int elemento, int *tab, int tam_tab);
92 |
93 | bool UHC (vertex *vertex_web, int v1, int *caminho_principal, uint dimension);
94 |
95 | void clear_visited (vertex *vertex_web, uint dimension);
96 |
97 | bool procurar_ciclo (vertex *vertex_web, uint dimension, int *caminho_principal, int &elem_caminho, int &custo_max, int seed);
98 |
99 | int devolve_viz_unicos (vertex *vertex_web, int vertice);
100 |
101 | int longest_path (vertex *vertex_web, int origem, int destino, int *lista_v1v, int i_list, int dimension, int seed, int *caminho_parcial, int &elem_cp);
102 |
103 | bool caminho_apartir_vizinhos_unicos (vertex *vertex_web, int dimension, int *caminho_principal, int &elem_max, int &custo_max, int seed);
104 |
105 | bool verificar_arco_cp (int no_1, int no_2, int *caminho_principal, int elem_cp);
106 |
107 | bool check_visited (vertex *vertex_web, int dimension);
108 |
109 | int devolve_vizinhos_nao_visitados (vertex *vertex_web, int dimension, int vertice);
110 |
111 | bool computar_caminho_de_ida (vertex *vertex_web, int dimension, int *caminho_de_ida, int &elem_c_ida, int *caminho_principal, int elem_cp, int num_arcos);
112 |
113 | int computar_custo_caminho_final (vertex *vertex_web, int *caminho_final, int elem_caminho_final);
114 |
115 | int cyclic (uint dimension, vertex *vertex_web, int *caminho_final);
116 |
117 | void shift_cyclic_path (uint start_vertex, int *caminho_final, int elem_caminho_final);
118 |
119 | uint get_MSP_dimension (const char* msp_file);
120 |
121 | void get_MSP_route (uint *route, uint dimension, const char* msp_file);
122 |
123 | void create_source_and_dest_tables(vertex *vertex_web, uint *source, uint *destination, uint dimension);
124 |
125 | void get_hist_sort(vertex *vertex_web, double *hist_sort, uint dimension);
126 |
127 | int get_hist_idx_from_edge_cost (double *hist_sort, uint size, double edge_cost);
128 |
129 | int get_hist_idx (uint *source, uint *destination, uint source_vertex, uint dest_vertex, uint hist_dimension);
130 |
131 | double get_edge_cost_between (vertex *vertex_web, uint vertex_A, uint vertex_B);
132 |
133 | void load_real_histogram(double *real_histogram, uint size_hist, char* filename);
134 |
135 | void normalize_histogram(double *real_histogram, double *histogram, uint size_hist);
136 |
137 | int pertence_uint_idx (uint elemento, uint *tab, uint tam_tab);
138 |
139 | int get_min(uint *tab, uint tam_tab);
140 |
141 | double get_min_dbl(double *tab, uint tam_tab);
142 |
143 | int get_max(uint *tab, uint tam_tab);
144 |
145 | double get_max_dbl(double *tab, uint tam_tab);
146 |
147 | void write_histogram_to_file (vertex *vertex_web, double *real_histogram, double *histogram, uint *source, uint *destination, uint hist_dimension, uint number, uint robotid);
148 |
149 | void write_reward_evolution(double reward, uint robotid);
150 |
151 | void update_likelihood_old (reinforcement_learning RL, double *real_histogram, double *hist_sort, uint size_hist, vertex *vertex_web);
152 |
153 | void update_likelihood (reinforcement_learning RL, double *real_histogram, uint *source, uint *destination, uint hist_dimension, vertex *vertex_web, int minimum_global_node_count, uint robotid);
154 |
155 | void update_likelihood_new (reinforcement_learning RL, uint *node_count_table, double *inst_idleness, uint dimension, double *real_histogram, uint *source, uint *destination, uint hist_dimension, vertex *vertex_web, uint robotid);
156 |
157 | int learning_algorithm(uint current_vertex, vertex *vertex_web, double *instantaneous_idleness, double *avg_idleness, int *tab_intention, double *histogram, uint *source, uint *destination, uint hist_dimension, int nr_robots, int id_robot, uint *node_count, reinforcement_learning &RL);
158 |
159 |
160 |
--------------------------------------------------------------------------------
/src/config.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #include "config.h"
39 | #include
40 | #include
41 |
42 | #define STRLEN 200
43 |
44 |
45 | ConfigFile::ConfigFile(const char *filename)
46 | {
47 | f.open(filename);
48 | if (!f.good()) {
49 | printf("ERROR. Cannot open config file %s.\n",filename);
50 | return;
51 | }
52 |
53 | printf("Opened config file %s\n",filename);
54 | char buf[STRLEN]; char *p; char par[STRLEN], val[STRLEN], profile[STRLEN];
55 | int state=0;
56 | while (f.good()) {
57 | f.getline(buf,STRLEN);
58 | switch (state) {
59 | case 0: // find SECTION
60 | p = strstr(buf,"[SECTION Main]");
61 | if (p)
62 | state++;
63 | break;
64 | case 1: // find PROFILE
65 | p = strstr(buf,"PROFILE");
66 | if (p) {
67 | sscanf(buf,"%s %s",par,profile);
68 | printf("Config Profile %s\n",profile);
69 | state++;
70 | }
71 | break;
72 |
73 | case 2: // find correct profile
74 | p = strstr(buf,"PROFILE");
75 | if (p) {
76 | sscanf(p,"%s %s",par,val); int n = strlen(val);
77 | int k=0;
78 | while (val[k]!=']' && k0) {
97 | char *p = strstr(buf,"\"");
98 | if (p) {
99 | char *r = strstr(p+1,"\"");
100 | if (r) {
101 | *r='\0';
102 | params[string(par)] = string(p+1);
103 | printf(" %s = %s\n",par,p+1);
104 | }
105 | }
106 | else {
107 | params[string(par)] = string(val);
108 | printf(" %s = %s\n",par,val);
109 | }
110 | }
111 | }
112 | }
113 | break;
114 |
115 | case 4: // end
116 | break;
117 | }
118 | // cout << buf << endl;
119 | }
120 |
121 | f.close();
122 | }
123 |
124 | ConfigFile::~ConfigFile()
125 | {
126 |
127 | }
128 |
129 | string ConfigFile::getParam(string p) {
130 | map::const_iterator it = params.find(p);
131 | if (it!=params.end())
132 | return it->second;
133 | else
134 | return string("");
135 | }
136 |
137 | string ConfigFile::getParam(const char *p) {
138 | return getParam(string(p));
139 | }
140 |
141 |
142 | int ConfigFile::getIParam(const char *p, int def)
143 | {
144 | map::const_iterator it = params.find(string(p));
145 | if (it!=params.end())
146 | return atoi(it->second.c_str());
147 | else
148 | return def;
149 | }
150 |
151 | double ConfigFile::getDParam(const char *p, double def)
152 | {
153 | map::const_iterator it = params.find(string(p));
154 | if (it!=params.end())
155 | return atof(it->second.c_str());
156 | else
157 | return def;
158 | }
159 |
160 |
--------------------------------------------------------------------------------
/src/config.h:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | *
3 | * Software License Agreement (BSD License)
4 | *
5 | * Copyright (c) 2014, ISR University of Coimbra.
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * * Redistributions in binary form must reproduce the above
15 | * copyright notice, this list of conditions and the following
16 | * disclaimer in the documentation and/or other materials provided
17 | * with the distribution.
18 | * * Neither the name of the ISR University of Coimbra nor the names of its
19 | * contributors may be used to endorse or promote products derived
20 | * from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * Author: Luca Iocchi (2014-2016)
36 | *********************************************************************/
37 |
38 | #ifndef __CONFIG_H__
39 | #define __CONFIG_H__
40 |
41 | #include
42 | #include
43 | #include
44 | #include