Skip to content

Refactor: move Node initialization to BaseNode#1645

Merged
mjcarroll merged 1 commit into
ros2:rollingfrom
nadavelkabets:refactor/base-node-init
Apr 19, 2026
Merged

Refactor: move Node initialization to BaseNode#1645
mjcarroll merged 1 commit into
ros2:rollingfrom
nadavelkabets:refactor/base-node-init

Conversation

@nadavelkabets
Copy link
Copy Markdown
Contributor

Part of #1620, follows up to #1637

Changes

  • Moved BaseNode initialization logic from Node.__init__ into BaseNode.__init__
  • Added abstract methods on BaseNode (create_publisher, create_subscription, create_service, _create_service) so BaseNode can construct the parameter event publisher, parameter services and type description service
  • Extracted handle creation methods into BaseNode (_create_publisher_handle, _create_subscription_handle, _create_service_handle, _create_client_handle)
  • TimeSource, ParameterService, LoggingService, TypeDescriptionService retyped to accept BaseNode instead of Node
  • TimeSource._clock_sub cleans itself up via self._clock_sub.destroy() instead of node.destroy_subscription(...) to decouple from Node's entity lists
  • TypeDescriptionService._start_service now calls node._create_service(...) instead of directly constructing a Service
  • TimeSource.attach_clock is called with self.get_clock() in BaseNode.__init__ instead of self._clock
  • Node.destroy_node() no longer calls self._type_description_service.destroy() explicitly and is destroyed by the entity teardown loop in Node.destroy_node() instead

@nadavelkabets nadavelkabets force-pushed the refactor/base-node-init branch from 93198c3 to 84be7f4 Compare April 12, 2026 18:29
…ice to BaseNode

Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
@nadavelkabets nadavelkabets force-pushed the refactor/base-node-init branch from d2728d7 to 98d1e5b Compare April 19, 2026 11:41
@mjcarroll
Copy link
Copy Markdown
Member

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@mjcarroll mjcarroll merged commit 6586641 into ros2:rolling Apr 19, 2026
3 of 4 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