diagnostics aggregator: discard_stale with no effect
I am testing how I can setup GenericAnalyzer for a node that is not always present.
I was expecting discard_stale: True
to do the trick, so the stale state is not posted when the data is missing.
My test node diagnosticerrorfaker produces diagnostics data like:
rostopic echo /diagnostics
[snip]
level: 1
name: "diagnostic_error_faker: Device A"
message: "Non-optimal value: 22"
hardware_id: "Faked Device"
values:
-
key: "tick value"
value: "22"
yaml loaded to aggregator_node:
[snip]
fake:
type: diagnostic_aggregator/GenericAnalyzer
path: fake_errors
startswith: 'diagnostic_error_faker'
find_and_remove_prefix: 'diagnostic_error_faker: '
discard_stale: true
Aggregator topic is ok:
rostopic echo /diagnostics_agg
[snip]
level: 1
name: "/fake_errors/Device A"
message: "some value: 12"
hardware_id: "Faked Device"
values:
-
key: "tick value"
value: "12"
But if I then kill the node that produces the diagnosticerrorfaker data, I would expect the diagnosticsagg to no longer show the fakeerrors due to the setting discard_stale: True
.
But:
rostopic echo /diagnostics_agg
[snip]
level: 3
name: "/fake_errors"
message: "Stale"
hardware_id: ''
values: []
What am I doing wrong?
Asked by knxa on 2018-09-19 15:58:17 UTC
Comments
This might be an example of this bug
Asked by knxa on 2019-04-02 06:14:57 UTC