From 7e6a046349f7eb97ea5b2cf081b3c6014ec1b7a0 Mon Sep 17 00:00:00 2001 From: eomielan Date: Fri, 8 Dec 2023 20:42:24 -0800 Subject: [PATCH 1/4] Add configuration for data collection node --- src/global_launch/config/globals.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/global_launch/config/globals.yaml b/src/global_launch/config/globals.yaml index 99c999f21..26f572e0f 100644 --- a/src/global_launch/config/globals.yaml +++ b/src/global_launch/config/globals.yaml @@ -41,3 +41,13 @@ physics_engine_node: corr_xy: 0. constant_params: value: [1.0, 0.0] +data_collection_node: + ros__parameters: + file_name: 'data_collection_test' + qos_depth: 10 + # Define topics to subscribe to in the format ['topic_name', 'topic_type'] + topics: ['/mock_gps', 'GPS', '/mock_wind_sensors', 'WindSensors'] + bag: false + json: true + # JSON file write interval (seconds) + write_period_sec: 0.5 From e91b8ac86763841204b453ffc8fc4796b257fe7d Mon Sep 17 00:00:00 2001 From: eomielan Date: Fri, 8 Dec 2023 20:52:48 -0800 Subject: [PATCH 2/4] Change default filename --- src/global_launch/config/globals.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global_launch/config/globals.yaml b/src/global_launch/config/globals.yaml index 26f572e0f..7eedbb42c 100644 --- a/src/global_launch/config/globals.yaml +++ b/src/global_launch/config/globals.yaml @@ -43,7 +43,7 @@ physics_engine_node: value: [1.0, 0.0] data_collection_node: ros__parameters: - file_name: 'data_collection_test' + file_name: 'ros_data_collection' qos_depth: 10 # Define topics to subscribe to in the format ['topic_name', 'topic_type'] topics: ['/mock_gps', 'GPS', '/mock_wind_sensors', 'WindSensors'] From a35eec0a74090f7d51235c648f28ab8a31195528 Mon Sep 17 00:00:00 2001 From: Devon Friend Date: Sun, 31 Dec 2023 18:37:49 -0800 Subject: [PATCH 3/4] Add boat simulator output directory to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 70e79bd47..f470bc20a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ __pycache__/ # exported plantuml diagrams /diagrams/out/ + +# data collection node output +/boat_simulator_output/ From 82a4e71f09ca944b61d6585234463ba228912094 Mon Sep 17 00:00:00 2001 From: eomielan Date: Sat, 20 Jan 2024 16:33:27 -0800 Subject: [PATCH 4/4] Update config README & remove comments from yaml file --- src/global_launch/config/README.md | 39 +++++++++++++++++++++++++++ src/global_launch/config/globals.yaml | 2 -- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/global_launch/config/README.md b/src/global_launch/config/README.md index 8b14098bb..fe918cfb8 100644 --- a/src/global_launch/config/README.md +++ b/src/global_launch/config/README.md @@ -230,3 +230,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)` diff --git a/src/global_launch/config/globals.yaml b/src/global_launch/config/globals.yaml index 636be3eae..ad9743e47 100644 --- a/src/global_launch/config/globals.yaml +++ b/src/global_launch/config/globals.yaml @@ -55,9 +55,7 @@ data_collection_node: ros__parameters: file_name: 'ros_data_collection' qos_depth: 10 - # Define topics to subscribe to in the format ['topic_name', 'topic_type'] topics: ['/mock_gps', 'GPS', '/mock_wind_sensors', 'WindSensors'] bag: false json: true - # JSON file write interval (seconds) write_period_sec: 0.5