fix(action_status_bridge): start with the default config#459
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a ROS 2 startup crash in ros2_medkit_action_status_bridge caused by shipping untyped empty YAML lists for parameters that are declared as std::vector<std::string> in the node. The change aligns the default config behavior with the node’s typed declared defaults so the bridge starts cleanly when launched with its packaged params file.
Changes:
- Remove untyped empty-list parameter assignments from
config/action_status_bridge.yamland replace them with commented, non-empty examples so ROS 2 uses the node’s typed defaults.
bburda
left a comment
There was a problem hiding this comment.
Out-of-diff note:
- The packaged config is not loaded by any test, so this startup crash has no regression guard.
test/test_integration.test.pylaunches the bridge with inline params (parameters=[{'rescan_period_sec': 1.0}]), and the launch file that loadsconfig/action_status_bridge.yamlis never run by the suite (the GTest can't load a params file either). Pointing the integration test's node at the packaged config (parameters=[config_file, {'rescan_period_sec': 1.0}], config first) would turn the existingassertExitCodesinto a guard so an empty-untyped-list value can't silently bring the crash back.
Address review: point the integration test's bridge node at the shipped config/action_status_bridge.yaml (config first, inline rescan override second), so the existing assertExitCodes fails if an empty-untyped-list value ever regresses the startup crash this PR fixes.
|
Added the regression guard you suggested: the integration test now launches the bridge with parameters=[packaged config_file, {rescan_period_sec: 1.0}] (config first), so assertExitCodes turns into a guard - if an empty-untyped-list value ever comes back in the shipped action_status_bridge.yaml, the node aborts and the test fails. Verified the node starts clean with the config + override. |
bburda
left a comment
There was a problem hiding this comment.
LGTM. Matches the #444 fix pattern: commenting out the empty untyped lists lets the node's typed declare_parameter defaults apply, so the packaged config no longer aborts at startup.
The integration test now loads the packaged config first (parameters=[config_file, {rescan_period_sec: 1.0}]), turning the existing assertExitCodes into a real regression guard. Verified the config values mirror the node's declared defaults exactly (code_prefix=ACTION, aborted_severity=ERROR, heal_on_succeeded=true, etc.), so loading the file doesn't change the existing test assertions, and no other shipped config/*.yaml carries the same empty-untyped-list pattern.
Part 1 of #458. Same empty-untyped-list crash as #444 (log_bridge), in
action_status_bridge- the #444 fix did not cover this package.config/action_status_bridge.yamlshipsexclude_actions: []andinclude_only_actions: []. Empty YAML lists are untyped, so launching the node with this file aborts at startup:The node code is correct (
declare_parameter<std::vector<std::string>>(...)); only the shipped YAML breaks it. This comments out the two lines with non-empty examples so the typed declared defaults apply.Verified live: with the shipped config the node aborts (exit 250); with this fix it starts clean (
ActionStatusBridge started ... Watching action ...).Addresses #458 (part 1). The log_bridge self-noise item in #458 is left as a follow-up: its fix touches
log_bridge.yaml, which #449 already modifies, so it is better done after #449 lands to avoid a conflict.