Skip to content

Conversation

@christophebedard
Copy link
Member

@christophebedard christophebedard commented Oct 20, 2025

Description

Follow-up to #5927.

The general statement here about the interface not supporting passing arbitrary configurations wasn't entirely correct. See ros2/rclcpp#882.

This still doesn't mean that you can arbitrarily configure anything, since this is only for publishers/subscriptions, though.

Did you use Generative AI?

Additional Information

@christophebedard christophebedard self-assigned this Oct 20, 2025
@christophebedard christophebedard added the backport-all backport at reviewers discretion; from rolling to all versions label Oct 20, 2025
@christophebedard
Copy link
Member Author

@wjwwood Kyle pointed out that rmw_specific_{publisher,subscription}_payload exists 😁 could you give this a quick review?

@github-actions
Copy link

HTML artifacts: https://github.com/ros2/ros2_documentation/actions/runs/18665157929/artifacts/4321635935.

To view the resulting site:

  1. Click on the above link to download the artifacts archive
  2. Extract it
  3. Open html-artifacts-5967/index.html in your favorite browser

To get around that and introduce some flexibility, some implementations use environment variables: ``RMW_FASTRTPS_*``, ``RMW_CONNEXT_*``, etc.
The ``rmw`` interface allows providing arbitrary implementation-specific configuration payloads for publishers and subscriptions through the type-erased ``rmw_specific_publisher_payload`` / ``rmw_specific_subscription_payload`` fields in ``rmw_publisher_options_t`` / ``rmw_subscription_options_t``.
This is set by users through ``RMWImplementationSpecificPublisherPayload`` / ``RMWImplementationSpecificSubscriptionPayload`` in ``rclcpp``, for example.
This is an advanced, non-portable feature that is not currently used by any (tier 1) implementations.
Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was interesting to point out that this is currently not used by any common/tier 1 implementation, just to discourage people from using it, but I'm open to removing that part of the sentence.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO this can stay here as it is implemented. to be honest, i did not even know this interface to pass any payload to the rmw... thanks for pointing that out 👍

To get around that and introduce some flexibility, some implementations use environment variables: ``RMW_FASTRTPS_*``, ``RMW_CONNEXT_*``, etc.
The ``rmw`` interface allows providing arbitrary implementation-specific configuration payloads for publishers and subscriptions through the type-erased ``rmw_specific_publisher_payload`` / ``rmw_specific_subscription_payload`` fields in ``rmw_publisher_options_t`` / ``rmw_subscription_options_t``.
This is set by users through ``RMWImplementationSpecificPublisherPayload`` / ``RMWImplementationSpecificSubscriptionPayload`` in ``rclcpp``, for example.
This is an advanced, non-portable feature that is not currently used by any (tier 1) implementations.
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO this can stay here as it is implemented. to be honest, i did not even know this interface to pass any payload to the rmw... thanks for pointing that out 👍

@fujitatomoya fujitatomoya merged commit 06de4e8 into rolling Oct 20, 2025
5 checks passed
@fujitatomoya fujitatomoya deleted the christophebedard/rmw-tutorial-rmw-specific-pub-sub-payload branch October 20, 2025 23:37
mergify bot pushed a commit that referenced this pull request Oct 20, 2025
Signed-off-by: Christophe Bedard <[email protected]>
(cherry picked from commit 06de4e8)
mergify bot pushed a commit that referenced this pull request Oct 20, 2025
Signed-off-by: Christophe Bedard <[email protected]>
(cherry picked from commit 06de4e8)
mergify bot pushed a commit that referenced this pull request Oct 20, 2025
Signed-off-by: Christophe Bedard <[email protected]>
(cherry picked from commit 06de4e8)
fujitatomoya pushed a commit that referenced this pull request Oct 20, 2025
…5968)

(cherry picked from commit 06de4e8)

Signed-off-by: Christophe Bedard <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]>
fujitatomoya pushed a commit that referenced this pull request Oct 20, 2025
…5969)

(cherry picked from commit 06de4e8)

Signed-off-by: Christophe Bedard <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]>
fujitatomoya pushed a commit that referenced this pull request Oct 20, 2025
…5970)

(cherry picked from commit 06de4e8)

Signed-off-by: Christophe Bedard <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-all backport at reviewers discretion; from rolling to all versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants