Skip to content

Refactor: base entity classes#1624

Merged
mjcarroll merged 9 commits into
ros2:rollingfrom
nadavelkabets:feature/base-entities
Mar 17, 2026
Merged

Refactor: base entity classes#1624
mjcarroll merged 9 commits into
ros2:rollingfrom
nadavelkabets:feature/base-entities

Conversation

@nadavelkabets
Copy link
Copy Markdown
Contributor

@nadavelkabets nadavelkabets commented Mar 14, 2026

Part of #1620

Changes

  • New BasePublisher, BaseService, BaseSubscription, BaseClient and BaseTimer classes
  • __init__ parameter changes
    • Subscription, Publisher: callback_group and event_callbacks are now keyword only
    • Service, Client, Timer: callback_group is now keyword only
    • Timer: callback_group defaults to None

Notes

  • Callback groups and event handlers were not moved to base classes
    • Callback groups are exclusive to executors and would not be supported in AsyncNode. More detailed discussion is in Feature: new asyncio executor #1399.
    • We have no callback mechanism for waitables yet, so AsyncNode won't support event handlers for now.
  • Service's send_response() is used publicly only in executor, so it was made protected in the BaseService

Comment thread rclpy/rclpy/subscription.py
Comment thread rclpy/rclpy/timer.py
Comment thread rclpy/rclpy/publisher.py
@mjcarroll
Copy link
Copy Markdown
Member

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

@mjcarroll mjcarroll merged commit bbf36f5 into ros2:rolling Mar 17, 2026
3 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