Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XML files to describe built-in QoS configuration #42

Open
wants to merge 15 commits into
base: rolling
Choose a base branch
from

Conversation

asorbini
Copy link
Collaborator

@asorbini asorbini commented Apr 23, 2021

This PR introduces some example XML QoS profiles that users can derive from in their own configuration files to replicate the settings applied by default by rmw_connextdds.

These profiles will help applications to remain compatible with other applications when ENDPOINT_QOS_OVERRIDE_POLICY is set to never (or PARTICIPANT_QOS_OVERRIDE_POLICY, when/if #41 is merged).

The profiles are all stored in file rmw_connextdds/resource/xml/ros2_qos_profiles.xml, which contains the following profiles:

  • ros2::rmw.ros_discovery_info
  • ros2::rcl.node_parameters
  • ros2::rcl.log
  • ros2::rcl.builtin_endpoints
  • ros2::rmw_connextdds.base_participant
  • ros2::rmw_connextdds.base_application
  • ros2::rmw_connextdds.opt.large_data
  • ros2::rmw_connextdds.opt.unbounded_data
  • ros2::rmw_connextdds.opt.content_filtered_topic_property
  • ros2::rmw_connextdds.opt.localhost_only
  • ros2::rmw_connextdds.opt.fast_endpoint_discovery

Refer to the comments in the file for details about each profile.

Users should have their profiles include ros2::rmw_connextdds.base_application in their parent hierarchy to replicate the configuration used by rmw_connextdds out of the box, and use profiles ros2::rmw_connextdds.opt.* to introduce additional configurations that the RMW only applies optionally.

An example file (USER_QOS_PROFILES.example.xml) provides a template for what users should place in an application's runtime directory. The file contains a single profile which inherits from ros2::rmw_connextdds.base_application and adds rules to configure the QoS of topic "rt/chatter".

File ros2_qos_profiles.xml is now exported by rmw_connextdds and a new environment hook (only for non-Windows users at the moment) will automatically append it to NDDS_QOS_PROFILES, so that the profiles will be available to users without any further configuration.

For example, to use the profiles with the hello world examples and verify that they are compatible with the default settings, after building rmw_connextdds:

# In a terminal, run a talker with default settings
RMW_IMPLEMENTATION=rmw_connextdds \
ros2 run demo_nodes_cpp talker

# In another terminal (and directory, to make sure the talker doesn't pick up the configuration),
# run a listener with "never" policy and the custom XML configuration.
# Load profiles using variable NDDS_QOS_PROFILES.
RMW_IMPLEMENTATION=rmw_connextdds \
RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY=never \
RMW_CONNEXT_ENDPOINT_QOS_OVERRIDE_POLICY=never \
NDDS_QOS_PROFILES="file://install/rmw_connextdds/share/rmw_connextdds/xml/USER_QOS_PROFILES.example.xml" \
ros2 run demo_nodes_cpp talker

@asorbini asorbini force-pushed the asorbini/xml-qos-profiles branch 3 times, most recently from 7830c78 to e3c787f Compare April 28, 2021 04:09
@asorbini asorbini marked this pull request as ready for review April 28, 2021 04:10
@asorbini asorbini added humble PR scheduled for the H-turtle foxy-backports PR should be backported to Foxy galactic-backports PR should be backported to Galactic. labels Apr 28, 2021
@asorbini asorbini force-pushed the asorbini/xml-qos-profiles branch 3 times, most recently from 1dea8e7 to 08eddf3 Compare April 29, 2021 07:37
@asorbini
Copy link
Collaborator Author

I have updated and extended the README quite a bit:

  • Revised the descriptions of various environment variable to make them more consistent with each other. All variables now have a brief explanations of their purposes, followed by a few usage examples, and then a more detailed description of their purpose.
  • Added a section about QoS configuration via XML, which includes a brief introduction to Connext's XML QoS configuration, and an overview of how users may customize the default QoS used by DomainParticipants and various endpoints. The section also includes a brief description of the "built-in" QoS profiles contained in file ros2_qos_profiles.xml.
  • Added a section about the DDS entities created by the RMW layer. This section goes into quite some detail to describe when the RMW implementation will create DDS entities, when they will delete these entities, and how the QoS configuration used by these entities is ultimately computed.

@asorbini asorbini force-pushed the asorbini/xml-qos-profiles branch 7 times, most recently from 62a3d16 to fda315a Compare April 29, 2021 11:17
@asorbini asorbini self-assigned this May 7, 2021
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
…_QOS_PROFILES

Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
…he RMW

Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
Signed-off-by: Andrea Sorbini <asorbini@rti.com>
@audrow audrow changed the base branch from master to rolling June 28, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
foxy-backports PR should be backported to Foxy galactic-backports PR should be backported to Galactic. humble PR scheduled for the H-turtle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant