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 nameDescriptionType(s)Default
measurement_pluginsName of the measurement plugins to loadlist[str]N/A (mandatory)
condition_pluginsName of the condition plugins to loadlist[str]N/A (mandatory)
save_local_base_pathPath where files will be saved locally (e.g camera images). Expands $X to environment variables and =Y to custom string parametersstr"$HOME/ros2/data/%Y/%M/%D/%H"
all_base_pathPath where files will be saved at their destination (S3, minio...). Expands $X to environment variables and =Y to custom string parametersstr""
custom_str_params_listCustom strings to use in other parameters. They are also appended in the json sent to the destinationlist[str]N/A
custom_str_params.force_overrideOverride values if the keys are already present in the measurement. Applies to all and can be overridden by custom_str_params.<param_name>.force_overrideboolfalse
custom_str_params.<param_name>.nameKey to add in the serialized datastrN/A (optional)
custom_str_params.<param_name>.valueValue to set for the key as a fixed stringstrN/A (optional)
custom_str_params.<param_name>.value_from_filePath to a file containing the value to setstrN/A (optional)
custom_str_params.<param_name>.force_overrideOverride value if the key is already present in the measurementboolfalse
run_id.enabledIdentify which run the robot is. A new one is generated at every start of the node. Uses either a counter or UUIDstrtrue
run_id.counterEnable counter for the run_idstrtrue
run_id.counter_pathPath to store the last run. It is expanded with environment variables idstr"$HOME/run_id"
run_id.uuidGenerate a new run ID by using a random UUIDstrfalse

Plugin parameters

Each measurement is collected through a node and has these configuration parameters:

Parameter nameDescriptionType(s)Default
pluginName of the plugin to loadstrN/A (mandatory)
topic_outputTopic where result will be publishedstr"/dc/measurement/<measurement_name>"
group_keyValue of the key used when groupedstrN/A (mandatory)
debugMore verbose outputboolfalse
polling_intervalInterval to which data is collected in millisecondsint (>=100)1000
init_collectCollect when the node starts instead of waiting the first tickbooltrue
init_max_measurementsCollect a maximum of n measurements when starting the node (-1 = never, 0 = infinite)int0
condition_max_measurementsCollect a maximum of n measurements when conditions are activated (-1 = never, 0 = infinite)int0
enable_validatorWill validate the data against a JSON schemabooltrue
json_schema_pathPath to the JSON schema, ignored if empty stringstrN/A (optional)
tagsTags used by Fluent Bit to do the matching to destinationslist[str]N/A (mandatory)
remote_prefixesPrefixes to apply to the paths when sending files to a destinationstrN/A (optional)
remote_keysUsed by some plugins to generate remote pathslist[str]N/A (optional)
if_all_conditionsCollect only if all conditions are activatedlist[str]N/A (optional)
if_any_conditionsCollect if any conditions is activatedlist[str]N/A (optional)
if_none_conditionsCollect only if all conditions are not activatedlist[str]N/A (optional)
include_measurement_nameInclude measurement name in the JSON databoolfalse
include_measurement_pluginInclude measurement plugin name in the JSON databoolfalse

Available plugins:

NameDescription
CameraCamera images, images can be rotated and inspected to detect content in images. They are saved as files
Command velocityCommand velocity: navigation commands
CPUCPU statistics
Distance traveledTotal distance traveled by the robot
DummyDummy event, for testing and debugging
IP CameraIP camera videos as files
MapROS map files (yaml and pgm) and metadata used by the robot to localize and navigate
MemorySystem memory usage
NetworkNetwork interfaces, availability
OSOperating System information
PermissionsPermissions of a file or directory
PositionRobot position
SpeedRobot speed
StorageAvailable and used space in a directory
String stampedRepublish a string stamped message, can be used for external data
TCP HealthHealth status of a TCP Server
UptimeHow long the machine has been turned on