Running CAMS in simulation mode (Tutorial) » History » Version 8
Rafael Bailon-Ruiz, 2020-10-08 11:56
1 | 3 | Rafael Bailon-Ruiz | h1. Running CAMS (Tutorial) |
---|---|---|---|
2 | |||
3 | This tutorial will teach you how to run the CAMS GUI with a simple scenario in simulation mode. |
||
4 | |||
5 | {{toc}} |
||
6 | |||
7 | First of all, *make sure you successfully completed the [[Installation#Developer installation process|Installation (Developer)]] tutorial*. Then, open a terminal and change the current directory to the folder where the core packages are installed. |
||
8 | |||
9 | 6 | Rafael Bailon-Ruiz | <pre><code class="shell"> |
10 | cd /path/to/nephelae_workspace |
||
11 | </code></pre> |
||
12 | |||
13 | 4 | Rafael Bailon-Ruiz | h2. Accessing the files for a simulated cloud environment |
14 | 3 | Rafael Bailon-Ruiz | |
15 | 7 | Rafael Bailon-Ruiz | In order to run CAMS in fully simulated mode first yout need a mesoNH file describing a synthetic atmospheric environment. MesoNH files are databases in "NetCDF _(.nc)_ format":https://en.wikipedia.org/wiki/NetCDF. |
16 | 3 | Rafael Bailon-Ruiz | |
17 | 5 | Rafael Bailon-Ruiz | The computer @girofle@ at LAAS contains a mesoNH file that can be used with CAMS. You can use the command below to mount the folder the remote folder as a local directory: |
18 | 3 | Rafael Bailon-Ruiz | |
19 | <pre><code class="shell"> |
||
20 | sshfs girofle.laas.fr:/media/Nephelae-Data/data/Nephelae/ mesonh_girofle_mount/ |
||
21 | </code></pre> |
||
22 | |||
23 | 7 | Rafael Bailon-Ruiz | The recommended file for this tutorial is: |
24 | 1 | Rafael Bailon-Ruiz | |
25 | 7 | Rafael Bailon-Ruiz | <pre> |
26 | REFHR.1.ARMCu.4D.nc |
||
27 | </pre> |
||
28 | 3 | Rafael Bailon-Ruiz | |
29 | 7 | Rafael Bailon-Ruiz | Despite its huge size (~72 GB), the best way to work with this particular file is to download it to your computer. If you are at LAAS connected with an Ethernet cable, you have a high-bandwith and low-lattency link. Therefore you can read the files in the remote folder directly, but beware of errors that can occur if the quality of the connection degrades. |
30 | 1 | Rafael Bailon-Ruiz | |
31 | 3 | Rafael Bailon-Ruiz | |
32 | 1 | Rafael Bailon-Ruiz | h2. Scenario setup |
33 | |||
34 | 7 | Rafael Bailon-Ruiz | A valid configuration file is required to run the graphical interface server. Scenario configuration files describe the atmospheric environment and the UAVs so CAMS can use the appropriate algorithms and models to manage them. |
35 | 3 | Rafael Bailon-Ruiz | |
36 | 7 | Rafael Bailon-Ruiz | For this tutorial a simple |
37 | |||
38 | 3 | Rafael Bailon-Ruiz | There are dedicated tutorial and reference guide wiki pages for scenario configuration, but for an initial run let's use a simple file. |
39 | |||
40 | 8 | Rafael Bailon-Ruiz | To configure manually: |
41 | |||
42 | database/filepath: '/home/rbailonr/src/nephelae/nephelae_workdir/database01.neph' |
||
43 | aircrafts/200/plugins/Missions/backup_file: '/home/rbailonr/src/nephelae/nephelae_workdir/backup_200.bin' |
||
44 | aircrafts/201/plugins/Missions/backup_file: '/home/rbailonr/src/nephelae/nephelae_workdir/backup_201.bin' |
||
45 | |||
46 | <pre> |
||
47 | |||
48 | --- |
||
49 | # local frame must be given in utm coordinates |
||
50 | local_frame: |
||
51 | east: &local_frame_east 360284.0 |
||
52 | north: &local_frame_north 4813595.0 |
||
53 | alt: &local_frame_alt 0.0 |
||
54 | utm_zone: &local_frame_utm_zone 31N |
||
55 | |||
56 | # flight area in local coordinates |
||
57 | flight_area: &flight_area [[-1000.0, -5000.0, -100.0], [15000.0, 5000.0, 4000.0]] |
||
58 | |||
59 | # allow_warm_start: True |
||
60 | allow_warm_start: False |
||
61 | |||
62 | # database config |
||
63 | database: |
||
64 | enable_save: False |
||
65 | filepath: '/home/rbailonr/src/nephelae/nephelae_workdir/database01.neph' |
||
66 | overwrite_existing: True |
||
67 | |||
68 | mesonh_files: &mesonh_files '/home/rbailonr/src/nephelae/REFHR.1.ARMCu.4D.nc' |
||
69 | |||
70 | # Setting this to true will activate feedback to WORLD_ENV requests |
||
71 | # Do not pass it to True : NOT WORKING... |
||
72 | wind_feedback: False |
||
73 | |||
74 | # Setting this value forces the mesonh variables to read only this time |
||
75 | mesonh_fixed_time: &mesonh_fixed_time 96 |
||
76 | |||
77 | # WindMap is constant => no wind here [0, 0] |
||
78 | wind_map: |
||
79 | type: 'WindMapConstant' |
||
80 | name: 'Horizontal Wind' |
||
81 | wind: [-0.0, 0.0] |
||
82 | |||
83 | # DataViews |
||
84 | data_views: |
||
85 | # View of liquid water content (data from Mesonh) |
||
86 | humidity: |
||
87 | type: 'FetchView' |
||
88 | name: 'Humidity' |
||
89 | tags: ['RCT'] |
||
90 | displayable: true |
||
91 | |||
92 | # View of vertical wind (data from Mesonh) |
||
93 | verticalWind: |
||
94 | type: 'FetchView' |
||
95 | name: 'Vertical Wind' |
||
96 | tags: ['WT'] |
||
97 | displayable: true |
||
98 | |||
99 | # View of temperature (data from Mesonh) |
||
100 | temperature: |
||
101 | type: 'FetchView' |
||
102 | name: 'Temperature' |
||
103 | tags: ['THT'] |
||
104 | displayable: true |
||
105 | |||
106 | # View of altitude (data from the autopilot / registered data) |
||
107 | altitude: |
||
108 | type: 'StatusView' |
||
109 | name: 'Altitude' |
||
110 | tags: null |
||
111 | displayable: true |
||
112 | |||
113 | # View of time (since the task has started / registered data) |
||
114 | time: |
||
115 | type: 'StatusView' |
||
116 | name: 'Time' |
||
117 | info: 'time' |
||
118 | tags: null |
||
119 | displayable: true |
||
120 | |||
121 | # Play with the mesonh origin if you want to have a cloud near your standby |
||
122 | # position [t, x, y ,z] |
||
123 | mesonh_origin: &mesonh_origin [-460.0, -1400.0, -3000.0, -280.0] |
||
124 | |||
125 | |||
126 | |||
127 | # Default fields. Used to define yaml aliases, to define values in one single place. |
||
128 | defaults: |
||
129 | start: &start_defaults |
||
130 | - Length: [3] |
||
131 | - SimpleBounds: [*flight_area] |
||
132 | circle_radius: |
||
133 | - &circle_radius_min 80.0 |
||
134 | - &circle_radius_max 500.0 |
||
135 | - defaults: &circle_radius_defaults |
||
136 | - DefaultValue: [120.0] |
||
137 | - SimpleBounds: [[*circle_radius_min, *circle_radius_max]] |
||
138 | altitude: |
||
139 | - &altitude_min 185.0 |
||
140 | - &altitude_max 4000.0 |
||
141 | - defaults: &altitude_defaults |
||
142 | - SimpleBounds: [[-1000.0, 4000.0]] |
||
143 | drift: |
||
144 | - &xdrift_min -10.0 |
||
145 | - &xdrift_max 10.0 |
||
146 | - &ydrift_min -10.0 |
||
147 | - &ydrift_max 10.0 |
||
148 | - &zdrift_min -3.0 |
||
149 | - &zdrift_max 3.0 |
||
150 | - drift: &drift_defaults |
||
151 | - DefaultValue: [[0.0,0.0,0.0]] |
||
152 | - Length: [3] |
||
153 | - SimpleBounds: [[[*xdrift_min, *ydrift_min, *zdrift_min], |
||
154 | [*xdrift_max, *ydrift_max, *zdrift_max]]] |
||
155 | - hdrift: &hdrift_defaults |
||
156 | - Length: [2] |
||
157 | - SimpleBounds: [[[*xdrift_min, *ydrift_min], |
||
158 | [*xdrift_max, *ydrift_max]]] |
||
159 | - zdrift: &zdrift_defaults |
||
160 | - SimpleBounds: [[*zdrift_min, *zdrift_max]] |
||
161 | |||
162 | lace: &lace_defaults |
||
163 | parameters: |
||
164 | start: *start_defaults |
||
165 | first_turn_direction: |
||
166 | - DefaultValue: [1.0] |
||
167 | - AllowedValues: [[-1.0, 1.0]] |
||
168 | circle_radius: *circle_radius_defaults |
||
169 | drift: *drift_defaults |
||
170 | updatables: |
||
171 | hdrift: *hdrift_defaults |
||
172 | zdrift: *zdrift_defaults |
||
173 | |||
174 | rosette: &rosette_defaults |
||
175 | parameters: |
||
176 | start: *start_defaults |
||
177 | first_turn_direction: |
||
178 | - DefaultValue: [1.0] |
||
179 | - AllowedValues: [[-1.0, 1.0]] |
||
180 | circle_radius: *circle_radius_defaults |
||
181 | drift: *drift_defaults |
||
182 | updatables: |
||
183 | hdrift: *hdrift_defaults |
||
184 | zdrift: *zdrift_defaults |
||
185 | |||
186 | spiral3d: &spiral3d_defaults |
||
187 | parameters: |
||
188 | start: *start_defaults |
||
189 | alt_stop: *altitude_defaults |
||
190 | radius_start: *circle_radius_defaults |
||
191 | radius_stop: *circle_radius_defaults |
||
192 | drift: *drift_defaults |
||
193 | updatables: |
||
194 | hdrift: *hdrift_defaults |
||
195 | zdrift: *zdrift_defaults |
||
196 | |||
197 | trinity: &trinity_defaults |
||
198 | parameters: |
||
199 | start: *start_defaults |
||
200 | first_turn_direction: |
||
201 | - DefaultValue: [1.0] |
||
202 | - AllowedValues: [[-1.0, 1.0]] |
||
203 | circle_radius: *circle_radius_defaults |
||
204 | drift: *drift_defaults |
||
205 | updatables: |
||
206 | hdrift: *hdrift_defaults |
||
207 | zdrift: *zdrift_defaults |
||
208 | |||
209 | # List of possible UAVS : 200, 201, 202, 203, 204 |
||
210 | # Configuration given : |
||
211 | # - Autopilot : Paparazzi |
||
212 | # - No replay |
||
213 | aircrafts: |
||
214 | 200: |
||
215 | replay: false |
||
216 | type: 'pprz' |
||
217 | plugins: |
||
218 | - MesonhProbe: |
||
219 | mesonhFiles: *mesonh_files |
||
220 | mesonhVariables: ['RCT', 'RRT', 'WT', 'THT', ['UT','VT']] |
||
221 | rctFeedback: True |
||
222 | mesonhOrigin: *mesonh_origin |
||
223 | fixTime: *mesonh_fixed_time |
||
224 | - Missions: |
||
225 | backup_file: '/home/rbailonr/src/nephelae/nephelae_workdir/backup_200.bin' |
||
226 | Lace: *lace_defaults |
||
227 | Rosette: *rosette_defaults |
||
228 | Spiral3D: *spiral3d_defaults |
||
229 | Trinity: *trinity_defaults |
||
230 | - CloudCenterTracker: |
||
231 | mapWhereCenterIs: 'LWC' |
||
232 | - MissionWindUpdater: |
||
233 | period: 10.0 |
||
234 | - Monitor |
||
235 | 201: |
||
236 | replay: false |
||
237 | type: 'pprz' |
||
238 | plugins: |
||
239 | - MesonhProbe: |
||
240 | mesonhFiles: *mesonh_files |
||
241 | mesonhVariables: ['RCT', 'RRT', 'WT', 'THT', ['UT','VT']] |
||
242 | rctFeedback: True |
||
243 | mesonhOrigin: *mesonh_origin |
||
244 | fixTime: *mesonh_fixed_time |
||
245 | - Missions: |
||
246 | backup_file: '/home/rbailonr/src/nephelae/nephelae_workdir/backup_201.bin' |
||
247 | Lace: *lace_defaults |
||
248 | Rosette: *rosette_defaults |
||
249 | Spiral3D: *spiral3d_defaults |
||
250 | Trinity: *trinity_defaults |
||
251 | - CloudCenterTracker: |
||
252 | mapWhereCenterIs: 'LWC' |
||
253 | - MissionWindUpdater: |
||
254 | period: 10.0 |
||
255 | - Monitor |
||
256 | |||
257 | maps: |
||
258 | kernels: |
||
259 | lwc_kernel: |
||
260 | type: 'WindKernel' |
||
261 | length_scales: [120.0, 60.0, 60.0, 60.0] |
||
262 | variance: 1.0e-8 |
||
263 | noise_variance: 1.0e-10 |
||
264 | LWC: |
||
265 | name: 'Liquid Water Cyan' |
||
266 | type: 'GprMap' |
||
267 | kernel: 'lwc_kernel' |
||
268 | data_view: 'humidity' |
||
269 | data_range: [0.0, 1.0e-4] |
||
270 | threshold: 2.0e-4 |
||
271 | std_map: 'Liquid Water std' # optional |
||
272 | border_map: 'Liquid Water border' # optional |
||
273 | |||
274 | clouds: |
||
275 | name: 'Liquid Water (MesoNH)' |
||
276 | type: 'MesonhMap' |
||
277 | mesonh_variable: 'RCT' |
||
278 | origin: *mesonh_origin |
||
279 | </pre> |
||
280 | |||
281 | 3 | Rafael Bailon-Ruiz | |
282 | h2. |