Skip to content

Add rosidl_buffer_backend_registry#944

Merged
ahcorde merged 9 commits into
rollingfrom
native_buffer/10-rosidl_buffer_backend_registry
Apr 1, 2026
Merged

Add rosidl_buffer_backend_registry#944
ahcorde merged 9 commits into
rollingfrom
native_buffer/10-rosidl_buffer_backend_registry

Conversation

@nvcyc
Copy link
Copy Markdown
Contributor

@nvcyc nvcyc commented Mar 16, 2026

Description

This pull request adds the rosidl_buffer_backend_registry package — a singleton registry using pluginlib to discover and load BufferBackend plugins at runtime. This package consolidates buffer backend initialization logic that RMW implementations need during rmw_init/rmw_shutdown, eliminating the need for each RMW to implement its own backend loading.

This pull request consists of the following key changes:

  • Buffer backend registry (buffer_backend_registry.hpp/cpp): Singleton that uses pluginlib to discover all installed BufferBackend plugin classes and manage their lifecycle.
  • Buffer backend loader (buffer_backend_loader.hpp/cpp): Provides initialize_buffer_backends() and shutdown_buffer_backends() — consolidated entry points that load backend plugins, populate the global BufferDescriptorOps and DescriptorSerializers maps in rosidl_typesupport_fastrtps_cpp, and clean up on shutdown. RMW implementations call these during rmw_init/rmw_shutdown instead of maintaining their own copies.

Is this user-facing behavior change?

This pull request does not change existing behavior. It provides infrastructure for loading buffer backend plugins, which has no effect until an RMW implementation calls the initialization functions and a backend plugin is installed.

Did you use Generative AI?

Yes. Claude (claude-4.6-opus) via Cursor was used to assist with creating an initial prototype version of the changes contained in this PR.

Additional Information

This PR is part of the broader ROS 2 native buffer feature introduced in this post.

Copy link
Copy Markdown
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

First pass.

Comment thread rosidl_buffer_backend_registry/src/buffer_backend_loader.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_loader.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
Comment thread rosidl_buffer_backend_registry/src/buffer_backend_registry.cpp Outdated
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 17c8cc5 to aedd7d8 Compare March 19, 2026 04:13
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 3164108 to e0d2f52 Compare March 19, 2026 08:53
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from ba833f7 to 82cfc48 Compare March 19, 2026 09:04
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from e0d2f52 to 9d7675f Compare March 20, 2026 05:21
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 82cfc48 to 417347c Compare March 20, 2026 05:22
Copy link
Copy Markdown
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

Barring aux info naming, this seems correct.

@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from ead744d to 0e2cad0 Compare March 21, 2026 23:07
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from fce6039 to 6375777 Compare March 21, 2026 23:44
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 0e2cad0 to 53d40ac Compare March 22, 2026 05:29
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from b4e6596 to 4dcb08e Compare March 22, 2026 08:41
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 53d40ac to 5ed9b0b Compare March 22, 2026 08:43
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 4dcb08e to 897f0bc Compare March 22, 2026 17:56
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch 2 times, most recently from 96c30a6 to 34f0a81 Compare March 23, 2026 08:43
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 0a33311 to 9f1a637 Compare March 29, 2026 04:29
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 34f0a81 to 72d868e Compare March 29, 2026 04:31
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 9f1a637 to 4a1fce2 Compare March 29, 2026 18:57
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 72d868e to abad556 Compare March 29, 2026 18:58
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 4a1fce2 to 3a47ecd Compare March 29, 2026 19:28
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from abad556 to 05275b6 Compare March 29, 2026 19:29
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 3a47ecd to 2ac2f2a Compare March 29, 2026 20:23
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 05275b6 to 80bc56b Compare March 29, 2026 20:24
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from 2ac2f2a to a47b7a6 Compare March 29, 2026 23:40
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 80bc56b to 446c257 Compare March 29, 2026 23:40
@nvcyc nvcyc force-pushed the native_buffer/4-rosidl_c_py branch from a47b7a6 to dbc5b74 Compare March 31, 2026 08:50
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from 446c257 to 191d7e5 Compare March 31, 2026 08:51
nvcyc added 8 commits April 1, 2026 06:40
Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
…ique pointer

Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
@nvcyc nvcyc force-pushed the native_buffer/10-rosidl_buffer_backend_registry branch from cecf61b to b13d76f Compare April 1, 2026 06:41
@nvcyc nvcyc changed the base branch from native_buffer/4-rosidl_c_py to rolling April 1, 2026 06:43
@nvcyc
Copy link
Copy Markdown
Contributor Author

nvcyc commented Apr 1, 2026

Pulls: #944
Gist: https://gist.githubusercontent.com/nvcyc/b5146169437bac2f8205e8d36149b312/raw/16d2d0c4118905ab27327d1e68c6c6baa825d220/ros2.repos
BUILD args: --continue-on-error --packages-above-and-dependencies rosidl_buffer_backend_registry
TEST args: --packages-above rosidl_buffer_backend_registry
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18774

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

@nvcyc
Copy link
Copy Markdown
Contributor Author

nvcyc commented Apr 1, 2026

Pulls: #944
Gist: https://gist.githubusercontent.com/nvcyc/97b010866c790660160b6b3315ff4f10/raw/16d2d0c4118905ab27327d1e68c6c6baa825d220/ros2.repos
BUILD args: --continue-on-error --packages-above-and-dependencies rosidl_buffer_backend_registry
TEST args: --packages-above rosidl_buffer_backend_registry
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18791

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

@ahcorde ahcorde merged commit 5f4ace0 into rolling Apr 1, 2026
3 of 4 checks passed
@ahcorde ahcorde deleted the native_buffer/10-rosidl_buffer_backend_registry branch April 1, 2026 21:17
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.

4 participants