Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for data collection node #222

Merged
merged 10 commits into from
Jan 30, 2024
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