Skip to content

fix(gateway): run the gateway's ROS paths on its own context - #725

Merged
bburda merged 1 commit into
docs/gateway-in-containerfrom
fix/gateway-private-context
Oct 21, 2026
Merged

bburda merged 1 commit into
docs/gateway-in-containerfrom
fix/gateway-private-context

Conversation

@bburda

@bburda bburda commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

A gateway built on a private rclcpp::Context works. Construction threw when the default context was never initialised.

  • The parameter client node takes the gateway's context.
  • The executors of the subscription executor, the fault-service transport and the lifecycle state reader take their helper node's context.
  • The in-tree plugins take the gateway's context too: graph_watchdog's fault executor and lifecycle watcher, the OPC-UA plugin's fault executor and param_beacon's _param_beacon_node. Before, their set_context() threw on such a gateway and the plugin was disabled.

Issue


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

  • ./scripts/test.sh test_gateway_private_context: it initialises only a private context and checks construction, a fault-manager call, a parameter read, a lifecycle state read and a subscription. On main construction throws.
  • ./scripts/test.sh private_context also runs test_graph_watchdog_private_context, test_opcua_private_context and test_param_beacon_private_context. Each plugin's set_context() threw on a private context before.
  • ./scripts/test.sh unit --packages-select ros2_medkit_gateway

Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

@bburda bburda self-assigned this Oct 18, 2026
@bburda
bburda added this pull request to stack #728 October 18, 2026 17:38
@bburda
bburda force-pushed the fix/gateway-private-context branch from 040a3cc to 368ccb3 Compare October 19, 2026 07:00
@bburda
bburda force-pushed the fix/gateway-private-context branch 2 times, most recently from 1861f17 to d373f35 Compare October 20, 2026 12:47
A host can build a GatewayNode on a private rclcpp::Context and never
initialise the default one. Construction then threw: the parameter
transport's _param_client_node took the default context, and the
subscription executor, the fault-service transport and the lifecycle state
reader each built their SingleThreadedExecutor on it.

_param_client_node now takes the gateway's context, and the three helper
executors take their helper node's context (executor_options_for). The
parameter transport's free spin_until_future_complete already builds its
executor on the node's context.

The in-tree plugins did the same. graph_watchdog's fault executor and
lifecycle watcher, the OPC-UA plugin's fault executor and param_beacon's
_param_beacon_node used the default context, so on such a gateway
set_context() threw and PluginManager disabled the plugin. They take the
gateway's context now.

test_gateway_private_context initialises only a private context and checks
construction, a fault-manager call, a parameter read through the parameter
transport, a lifecycle state read and a subscription through the
subscription executor. test_graph_watchdog_private_context,
test_opcua_private_context and test_param_beacon_private_context run each
plugin on a private context.
@bburda
bburda force-pushed the fix/gateway-private-context branch from d373f35 to ff3d688 Compare October 20, 2026 12:55
@bburda
bburda merged commit 1e128f5 into main Oct 21, 2026
56 of 58 checks passed
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.

2 participants