Skip to content

Commit

Permalink
Add configuration for data collection node (#222)
Browse files Browse the repository at this point in the history
* Add configuration for data collection node

* Change default filename

* Add boat simulator output directory to .gitignore

* Update config README & remove comments from yaml file

---------

Co-authored-by: Devon Friend <devon.fri.2000@gmail.com>
  • Loading branch information
eomielan and DFriend01 authored Jan 30, 2024
1 parent 064f78f commit 38eb393
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ __pycache__/

# exported plantuml diagrams
/diagrams/out/

# data collection node output
/boat_simulator_output/
39 changes: 39 additions & 0 deletions src/global_launch/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,42 @@ specified within an array: one for the `x` component, and one for the `y` compon
- _Description_: How often the sail action server requests a wingsail actuation.
- _Datatype_: `double`
- _Range_: `(0.0, MAX_DOUBLE)`

### `data_collection_node`

**`file_name`**

- _Description_: The name of the file in which the data is saved, excluding the file extension.
- _Datatype_: `string`
- _Acceptable Values_: Any valid file name.

**`qos_depth`**

- _Description_: The maximum number of subscription messages to queue for further processing.
- _Datatype_: `int`
- _Range_: `[1, MAX_INT)`

**`topics`**

- _Description_: Specifies the topics to subscribe to. It should adhere to the format `['topic_name_1', 'topic_type_1', ...]`.
- _Datatype_: `string` array with an even length
- _Acceptable Values_: Each pair within the array must consist of a valid topic name as the first string and the
corresponding correct type as the second string.

**`bag`**

- _Description_: Determines whether to save recorded data as a ROS bag.
- _Datatype_: `boolean`
- _Acceptable Values_: `true`, `false`

**`json`**

- _Description_: Determines whether to save recorded data as a JSON file.
- _Datatype_: `boolean`
- _Acceptable Values_: `true`, `false`

**`write_period_sec`**

- _Description_: The interval (in seconds) for writing queued data to the JSON file.
- _Datatype_: `double`
- _Range_: `(0.0, MAX_DOUBLE)`
8 changes: 8 additions & 0 deletions src/global_launch/config/globals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ physics_engine_node:
corr_xy: 0.
constant_params:
value: [1.0, 0.0]
data_collection_node:
ros__parameters:
file_name: 'ros_data_collection'
qos_depth: 10
topics: ['/mock_gps', 'GPS', '/mock_wind_sensors', 'WindSensors']
bag: false
json: true
write_period_sec: 0.5

0 comments on commit 38eb393

Please sign in to comment.