Groups

Description

Each measurement is part of a group. This allows measurements to be grouped together later on. For example, having the measurements cpu and position belonging to the same group, data will be published together on /dc/group/my_group

{
    "cpu": ...,
    "position": ...,
}

Currently, this node is written in python. The main reason for it is that we don't know how to allocate and pass different amount of variables to the TimeSynchronizer. In python it is quite simple, but not so in C++.

Node parameters

ParameterDescriptionTypeDefault
groupsGroups to enablelist[str]N/A

Group parameters

ParameterDescriptionTypeDefault
inputsName of the input topics to grouplist[str]N/A
outputOutput topic to send the data tostr"/dc/group/{group}"
sync_delayDelay to wait during all subscriber data need to reach before being published againfloat5.0
group_keyDictionary key under which data is groupedstr{group_name}
exclude_keysList of keys to exclude from the published data. Data depth is separated by a dotlist[str]N/A
tagsDestination names, used to know where data will be forwarded tolist[str]N/A
nested_dataWhether measurements are nested dictionaries or flatboolfalse
include_group_nameInclude group name in the JSON as key="name" and value=<group_key>booltrue

Example

group_server:
  ros__parameters:
    groups: ["map", "memory_uptime"]
    memory_cpu:
      inputs: ["/dc/measurement/memory", "/dc/measurement/cpu"]
      output: "/dc/group/memory_cpu"
      sync_delay: 5.0
      group_key: "memory_cpu"
      tags: ["flb_pgsql"]
    memory_uptime:
      inputs: ["/dc/measurement/memory", "/dc/measurement/uptime"]
      output: "/dc/group/memory_uptime"
      sync_delay: 5.0
      group_key: "memory_uptime"
      tags: ["flb_stdout"]
    cameras:
      inputs: ["/dc/measurement/camera"]
      output: "/dc/group/cameras"
      sync_delay: 5.0
      group_key: "cameras"
      tags: ["flb_minio", "flb_stdout"]
    map:
      inputs: ["/dc/measurement/map"]
      output: "/dc/group/map"
      sync_delay: 5.0
      group_key: "map"
      tags: ["flb_minio", "flb_stdout"]