@@ -214,13 +214,51 @@ $ ogma ros --handlers filename --variable-file variables --variable-db ros-varia
214
214
215
215
The application generated by Ogma contains the following files:
216
216
```
217
- ros_demo/CMakeLists.txt
218
- ros_demo/src/copilot_monitor.cpp
219
- ros_demo/src/copilot_logger.cpp
220
- ros_demo/src/.keep
221
- ros_demo/package.xml
217
+ ros_demo/copilot/CMakeLists.txt
218
+ ros_demo/copilot/src/copilot_monitor.cpp
219
+ ros_demo/copilot/src/copilot_logger.cpp
220
+ ros_demo/copilot/src/.keep
221
+ ros_demo/copilot/package.xml
222
+ ros_demo/Dockerfile
222
223
```
223
224
225
+ The Dockerfile can be used to compile the application inside the base image for
226
+ the Space ROS distribution. To build the image, first place the core
227
+ implementation of the monitors in C inside the directory
228
+ ` ros_demo/copilot/src/ ` (see 'Current limitations' for details). After, you can
229
+ compile the image with:
230
+ ```
231
+ docker build .
232
+ ```
233
+
234
+ ### Format of the Variables DB File
235
+
236
+ The argument variable DB passed to the ROS backend should contain a list of
237
+ variables, together with their types and the corresponding ROS topic in which
238
+ those variables are passed. Each line in that file has the format:
239
+
240
+ ```
241
+ ("<NAME>","<TYPE>","<TOPIC_NAME>","<RESERVED_FOR_FUTURE_USE>")
242
+ ```
243
+
244
+ For example, an input variable called "temperature" of type 64-bit signed
245
+ integer coming in a ROS topic called "/battery/temperature" should have a
246
+ matching entry in the variable DB file like the following:
247
+
248
+ ```
249
+ ("temperature","int64_t","/battery/temperature","ignore")
250
+ ```
251
+
252
+ There should never be two lines in the same file with the same variable name.
253
+ Variables in the DB that are not not used in any of the properties being
254
+ monitored and/or are not listed in the variable file passed as argument to the
255
+ ROS command will be ignored.
256
+
257
+ For a more concrete example, see the files in ` ogma-cli/examples/ros-copilot/ `
258
+ and the last step of the script
259
+ ` .github/workflows/repo-ghc-8.6-cabal-2.4-ros.yml ` , which generates a ROS
260
+ monitor with multiple variables and compiles the resulting code.
261
+
224
262
### Current limitations
225
263
226
264
The user must place the code generated by Copilot monitors in two files,
0 commit comments