Repository navigation
diagnostic_aggregator: honour publisher-marked persistent statuses - #680
Open
fujitatomoya wants to merge 2 commits into
Open
fujitatomoya wants to merge 2 commits into
fujitatomoya wants to merge 2 commits into
Conversation
Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
fujitatomoya
commented
Nov 8, 2026
- Accept integer-typed values for persistent_timeout. A YAML value such as "persistent_timeout: 3600" is typed INTEGER by rclcpp and as_double() would throw and kill the aggregator at startup. - Add an aggregator-level other_persistent_timeout parameter (default unlimited) and forward it to OtherAnalyzer, which otherwise hard-codes its init() arguments and had no way to cap persistent items. - Document both in the README and header comments, and extend the launch test with an Other-analyzer cap case; two cases now use integer timeout values on purpose. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Analyzers decide staleness purely from the age of the last message. A status
that stops being updated is rewritten to STALE, or dropped when discard_stale
is set, and OtherAnalyzer drops it after 5 s. The publisher had no way to say
"this is my final, intentional state, keep it".
Introduce the reserved key-value "persistent_state: True" in
DiagnosticStatus.values. StatusItem parses it on every update, and
GenericAnalyzerBase skips the stale and discard handling for such items, so
they keep their last level and message. A "last_update_age" value is appended
to persistent items only, so output for everything else is unchanged.
Publishing the status again without the key restores the normal behaviour.
GenericAnalyzer gains an optional persistent_timeout parameter (default
unlimited) to cap how long a persistent item is honoured.
DiagnosticStatusWrapper gets setPersistentState() in C++ and Python as a
typo-safe way to set the key.
Add a launch test covering GenericAnalyzer, OtherAnalyzer, discard_stale,
persistent_timeout and the reset path, and document the feature and its
limits (meant for terminal/latched states, not kept across aggregator
restarts).
Fixes #679