Skip to content

fix(action_status_bridge): start with the default config#459

Merged
mfaferek93 merged 2 commits into
mainfrom
fix/458-action-status-bridge-default-config
Jun 22, 2026
Merged

fix(action_status_bridge): start with the default config#459
mfaferek93 merged 2 commits into
mainfrom
fix/458-action-status-bridge-default-config

Conversation

@mfaferek93

Copy link
Copy Markdown
Collaborator

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.yaml ships exclude_actions: [] and include_only_actions: []. Empty YAML lists are untyped, so launching the node with this file aborts at startup:

terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException'
  what():  parameter_value_from failed for parameter 'exclude_actions': No parameter value set
[ros2run]: Aborted

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.

exclude_actions/include_only_actions: [] in the shipped YAML are untyped
empty lists and abort the node at startup (InvalidParameterValueException:
No parameter value set) - the same bug fixed for log_bridge in #444.
Comment them out with examples so the node's typed defaults apply.

Addresses #458
Copilot AI review requested due to automatic review settings June 21, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml and replace them with commented, non-empty examples so ROS 2 uses the node’s typed defaults.

@bburda bburda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py launches the bridge with inline params (parameters=[{'rescan_period_sec': 1.0}]), and the launch file that loads config/action_status_bridge.yaml is 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 existing assertExitCodes into 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.
@mfaferek93

Copy link
Copy Markdown
Collaborator Author

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 bburda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mfaferek93 mfaferek93 merged commit 4239c34 into main Jun 22, 2026
14 checks passed
@bburda bburda mentioned this pull request Jun 22, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants