Skip to content

Update type_support.py to use new message abstract base classes #1509

Merged
InvincibleRMC merged 40 commits intoros2:rollingfrom
InvincibleRMC:use-new-message-abcs
Jan 21, 2026
Merged

Update type_support.py to use new message abstract base classes #1509
InvincibleRMC merged 40 commits intoros2:rollingfrom
InvincibleRMC:use-new-message-abcs

Conversation

@InvincibleRMC
Copy link
Copy Markdown
Contributor

Description

Uses new abstract base classes to allow automatic type inference lowering burden to start using pub/sub/server/client/actionserver/actionclient. This can be seen in how the test cases do not require the manual specification of their generic types and that can now be inferred from the msg/srv/action type automatically.

Fixes one task from this main list
ros2/ros2#1735

Is this user-facing behavior change?

The classes inside type_support.py are no longer protocols but, actual generic classes. Users shouldn't need to change anything for this but, a user could in theory now decide to actual instantiate this class at runtime even if that doesn't really serve a point.

Did you use Generative AI?

Additional Information

@christophebedard christophebedard self-requested a review October 2, 2025 17:03
@christophebedard christophebedard self-assigned this Oct 2, 2025
@InvincibleRMC InvincibleRMC marked this pull request as draft October 7, 2025 04:55
@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Converted to draft for the moment since ros2/rosidl_python#241 should come first and might require some changes here.

@InvincibleRMC InvincibleRMC force-pushed the use-new-message-abcs branch 2 times, most recently from 068d8d5 to f418f07 Compare November 20, 2025 04:07
@InvincibleRMC InvincibleRMC marked this pull request as ready for review November 20, 2025 04:13
@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

@christophebedard Should be ready for review now. Tested it locally with the BaseImpl changes to in rosidl/rosidl_python.

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

@christophebedard just a reminder whenever you are free I would appreciate a review.

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

@christophebedard please let me know if you have any questions/comments on this pr.

Copy link
Copy Markdown
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

I have some questions

clalancette and others added 19 commits January 12, 2026 09:34
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Barry Xu <Barry.Xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: brennanmk <brennanmk2200@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
…ros2#1478)

Closes ros2#1473

Signed-off-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Per rclpy:1123 If two seperate client server actions are running in seperate executors the future given to the ActionClient will never complete due to a race condition
This fixes  the calls to rcl handles potentially leading to deadlock scenarios by adding locks to there references
Co-authored-by: Aditya Agarwal <aditya.kgp25@gmail.com>
Co-authored-by: Jonathan Blixt <jmblixt3@gmail.com>
Signed-off-by: Jonathan Blixt <jmblixt3@gmail.com>

Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
'param_type' is set but never used

Signed-off-by: Christian Rauch <Christian.Rauch@unileoben.ac.at>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
A recent change intended to move this logic into a lock context, but
actually ended up duplicating it instead. This fixes that by removing
the duplicated logic outside of the lock. It also preserves the explicit
typing annotation on the future.

Signed-off-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: yuanyuyuan <az6980522@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Signed-off-by: Minju, Lee <dlalswn531@naver.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Barry-Xu-2018 and others added 17 commits January 12, 2026 09:35
* ParameterEventHandler support ContentFiltering

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Address review comments

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Błażej Sowa <bsowa123@gmail.com>
Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Co-authored-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Florian Vahl <git@flova.de>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Previously the max() value of the steady time was used as the default deadline. In some environments this results in overflows in the underlying pthread_cond_timedwait call, which waits for the conditional variable in the events queue implementation. Consequently, this lead to freezes in the executor. Reducing the deadline significantly helped, but using `cv.wait` instead of `cv_.wait_until` seems to be the cleaner solution.

Signed-off-by: Florian Vahl <florian.vahl@dlr.de>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
ros2#1571)

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
* Expose action graph functions as Node class methods.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* address review comments to keep the warning consistent.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Michael Tandy <git@mjt.me.uk>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Copy link
Copy Markdown
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

LGTM with green CI!

Are you able to run CI now?

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Are you able to run CI now?

Yep! I can run it when I get home from work.

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Pulls: #1509
Gist: https://gist.githubusercontent.com/InvincibleRMC/eeb597d0a11b24eb3c96c84a87365890/raw/fbf3c3949e80a0e70e2f976ee0f15089bbefb44b/ros2.repos
BUILD args: --continue-on-error --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17940

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

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Pulls: #1509
Gist: https://gist.githubusercontent.com/InvincibleRMC/c68e67579af57c6f4bb8e03fa2346d75/raw/fbf3c3949e80a0e70e2f976ee0f15089bbefb44b/ros2.repos
BUILD args: --continue-on-error --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17979

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

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Pulls: #1509
Gist: https://gist.githubusercontent.com/InvincibleRMC/4db11e63e8fa3ba902477afdc21c576c/raw/fbf3c3949e80a0e70e2f976ee0f15089bbefb44b/ros2.repos
BUILD args: --continue-on-error --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17988

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

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

@fujitatomoya would you mind doing a second and final review? If I am remembering correctly each PR needs 2 approvals.

@christophebedard
Copy link
Copy Markdown
Member

Someone can correct if I'm wrong, but I think it's just "a minimum of 1 approval from a fellow developer who did not author the pull request:" https://docs.ros.org/en/rolling/The-ROS2-Project/Contributing/Developer-Guide.html#change-control-process

@InvincibleRMC
Copy link
Copy Markdown
Contributor Author

Ah that seems correct. Feel free to still review if you want @fujitatomoya but, if not will merge.

@InvincibleRMC InvincibleRMC merged commit 70ddf4b into ros2:rolling Jan 21, 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.