Measurements
Description
Measurements are a single data unit presented in JSON format, that can contain different fields. For example, Memory measurement:
{
"date": "2022-12-04T14:16:06.810999008",
"memory": {
"used": 76.007431
},
"id": "3c70afdcb6f248f28f4c3980734064c5",
"robot_name": "C3PO",
"run_id": 358
}
Node parameters
The node starts the fluent bit engine and its ros2 plugin and enables data collection from ROS 2 topics. This plugin will subscribe to the configured ROS 2 topics and data will be collected by Fluent Bit to destinations enabled by the destination node. Each topic is configured in a measurement, which is loaded in this node with pluginlib. In addition, conditions are pluginlibs plugin also loaded dynamically. They are optional plugins that allow to collect on some conditions, e.g robot is moving.
Parameter name | Description | Type(s) | Default |
---|---|---|---|
measurement_plugins | Name of the measurement plugins to load | list[str] | N/A (mandatory) |
condition_plugins | Name of the condition plugins to load | list[str] | N/A (mandatory) |
save_local_base_path | Path where files will be saved locally (e.g camera images). Expands $X to environment variables and =Y to custom string parameters | str | "$HOME/ros2/data/%Y/%M/%D/%H" |
all_base_path | Path where files will be saved at their destination (S3, minio...). Expands $X to environment variables and =Y to custom string parameters | str | "" |
custom_str_params_list | Custom strings to use in other parameters. They are also appended in the json sent to the destination | list[str] | N/A |
custom_str_params.force_override | Override values if the keys are already present in the measurement. Applies to all and can be overridden by custom_str_params.<param_name>.force_override | bool | false |
custom_str_params.<param_name>.name | Key to add in the serialized data | str | N/A (optional) |
custom_str_params.<param_name>.value | Value to set for the key as a fixed string | str | N/A (optional) |
custom_str_params.<param_name>.value_from_file | Path to a file containing the value to set | str | N/A (optional) |
custom_str_params.<param_name>.force_override | Override value if the key is already present in the measurement | bool | false |
run_id.enabled | Identify which run the robot is. A new one is generated at every start of the node. Uses either a counter or UUID | str | true |
run_id.counter | Enable counter for the run_id | str | true |
run_id.counter_path | Path to store the last run. It is expanded with environment variables id | str | "$HOME/run_id" |
run_id.uuid | Generate a new run ID by using a random UUID | str | false |
Plugin parameters
Each measurement is collected through a node and has these configuration parameters:
Parameter name | Description | Type(s) | Default |
---|---|---|---|
plugin | Name of the plugin to load | str | N/A (mandatory) |
topic_output | Topic where result will be published | str | "/dc/measurement/<measurement_name>" |
group_key | Value of the key used when grouped | str | N/A (mandatory) |
debug | More verbose output | bool | false |
polling_interval | Interval to which data is collected in milliseconds | int (>=100) | 1000 |
init_collect | Collect when the node starts instead of waiting the first tick | bool | true |
init_max_measurements | Collect a maximum of n measurements when starting the node (-1 = never, 0 = infinite) | int | 0 |
condition_max_measurements | Collect a maximum of n measurements when conditions are activated (-1 = never, 0 = infinite) | int | 0 |
enable_validator | Will validate the data against a JSON schema | bool | true |
json_schema_path | Path to the JSON schema, ignored if empty string | str | N/A (optional) |
tags | Tags used by Fluent Bit to do the matching to destinations | list[str] | N/A (mandatory) |
remote_prefixes | Prefixes to apply to the paths when sending files to a destination | str | N/A (optional) |
remote_keys | Used by some plugins to generate remote paths | list[str] | N/A (optional) |
if_all_conditions | Collect only if all conditions are activated | list[str] | N/A (optional) |
if_any_conditions | Collect if any conditions is activated | list[str] | N/A (optional) |
if_none_conditions | Collect only if all conditions are not activated | list[str] | N/A (optional) |
include_measurement_name | Include measurement name in the JSON data | bool | false |
include_measurement_plugin | Include measurement plugin name in the JSON data | bool | false |
Available plugins:
Name | Description |
---|---|
Camera | Camera images, images can be rotated and inspected to detect content in images. They are saved as files |
Command velocity | Command velocity: navigation commands |
CPU | CPU statistics |
Distance traveled | Total distance traveled by the robot |
Dummy | Dummy event, for testing and debugging |
IP Camera | IP camera videos as files |
Map | ROS map files (yaml and pgm) and metadata used by the robot to localize and navigate |
Memory | System memory usage |
Network | Network interfaces, availability |
OS | Operating System information |
Permissions | Permissions of a file or directory |
Position | Robot position |
Speed | Robot speed |
Storage | Available and used space in a directory |
String stamped | Republish a string stamped message, can be used for external data |
TCP Health | Health status of a TCP Server |
Uptime | How long the machine has been turned on |