Repository navigation
diagnostic_aggregator: accept integer-typed values for floating point parameters - #683
Open
fujitatomoya wants to merge 1 commit into
Open
fujitatomoya wants to merge 1 commit into
fujitatomoya wants to merge 1 commit into
Conversation
… parameters "pub_rate: 2" or "timeout: 5" in a parameter file are typed INTEGER by rclcpp, and rclcpp::Parameter::as_double() throws ParameterTypeException on them, which terminates the aggregator during initialization. Users had to know to write "5.0" even though these are conceptually floating point values. Add getDoubleParam(), which converts integer-typed parameters to double and otherwise falls back to as_double(), and use it for pub_rate and the GenericAnalyzer timeout. Add a launch test that starts the aggregator with integer-valued pub_rate and timeout and checks that it produces output; it fails with ParameterTypeException without the fix. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
fujitatomoya
commented
Nov 8, 2026
fujitatomoya
left a comment
Author
There was a problem hiding this comment.
minor fix, most of them are just test codes.
@ct2034 can you take a look?
Timple
approved these changes
Nov 13, 2026
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.
Description
pub_rate: 2ortimeout: 5in a parameter file are typedINTEGERby rclcpp, andrclcpp::Parameter::as_double()throwsParameterTypeExceptionon them, which terminates the aggregator during initialization. Users had to know to write5.0even though these are conceptually floating point values.This was noticed while reviewing #680 (#680 (comment)) and split out so the pre-existing problem can be fixed and backported on its own.
Changes
getDoubleParam()instatus_item.hpp, which converts integer-typed parameters todoubleand otherwise falls back toas_double().pub_rateand theGenericAnalyzertimeout.test_integer_parameters.py, a launch test that starts the aggregator with integer-valuedpub_rateandtimeoutand checks that it produces output. Without the fix the aggregator dies withParameterTypeExceptionand the test fails.Backport
This is a small, self-contained robustness fix with no behaviour change for existing float-valued configurations. Please add the
backportlabel so it reachesros2-humble,ros2-jazzy,ros2-kiltedandros2-lyrical; I do not have permission to set labels on this repository.🤖 Generated with Claude Code