Skip to content

Commit 234c89d

Browse files
committed
Automatically load ros2_qos_profiles.xml via DomainParticipantFactoryQoS
1 parent 336921f commit 234c89d

File tree

9 files changed

+498
-244
lines changed

9 files changed

+498
-244
lines changed

README.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ the internal ones that are automatically created for RMW management (`ros_discov
349349
and those created by `rcl` for each Node (e.g. `rt/rosout`, `rt/parameter_events`,
350350
and other topics used to manage node parameters). In order to make sure that these
351351
endpoints will continue to communicate with applications using the default QoS, you
352-
may use QoS profile `ros2::rcl.builtin_endpoints` from [ros2_qos_profiles.xml](rmw_connextdds/resource/xml/ros2_qos_profiles.xml)
352+
may use QoS profile `ROS2QoS::rcl.builtin_endpoints` from [ros2_qos_profiles.xml](rmw_connextdds/resource/xml/ros2_qos_profiles.xml)
353353
to configure all of these "built-in endpoints" with the correct QoS settings.
354354

355355
`RMW_CONNEXT_ENDPOINT_QOS_OVERRIDE_POLICY` may also be set to `dds_topics: <regex>`, e.g.:
@@ -519,7 +519,7 @@ optimizations controlled by [RMW_CONNEXT_DISABLE_FAST_ENDPOINT_DISCOVERY](#RMW_C
519519
520520
When using these values, you may replicate the default QoS configuration using
521521
the profiles defined by XML file [ros2_qos_profiles.xml](rmw_connextdds/resource/xml/ros2_qos_profiles.xml)
522-
(e.g. `ros2::rmw_connextdds.base_application`). See [DDS Quality of Service Configuration](#dds-quality-of-service-configuration)
522+
(e.g. `ROS2QoS::rmw_connextdds.base_application`). See [DDS Quality of Service Configuration](#dds-quality-of-service-configuration)
523523
for more information on these built-in profiles.
524524
525525
### RMW_CONNEXT_REQUEST_REPLY_MAPPING
@@ -906,7 +906,7 @@ selected with variable [`RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY`](#rmw_conn
906906
907907
The customization may also be replicated in XML by using the QoS profiles contained
908908
in [ros2_qos_profiles.xml](rmw_connextdds/resource/xml/ros2_qos_profiles.xml),
909-
for example, `ros2::rmw_connextdds.base_participant`. See [Built-in ROS 2 QoS Profiles](#built-in-ros-2-qos-profiles) for more information about these QoS profiles
909+
for example, `ROS2QoS::rmw_connextdds.base_participant`. See [Built-in ROS 2 QoS Profiles](#built-in-ros-2-qos-profiles) for more information about these QoS profiles
910910
and how to use them.
911911
912912
### DataWriter and DataReader QoS
@@ -977,7 +977,7 @@ ros2 run demo_nodes_cpp talker
977977
978978
A similar result can also be achieved using the `never` "QoS override" policy,
979979
but the XML QoS profile would require some modifications, for example by making it
980-
extend profile `ros2::rmw_connextdds.base_application`. Otherwise, the application
980+
extend profile `ROS2QoS::rmw_connextdds.base_application`. Otherwise, the application
981981
would not be able to communicatedd with other applications using the default
982982
ROS 2 QoS profiles over the "built-in" endpoints created by the RMW and `rcl`
983983
layers.
@@ -1039,32 +1039,32 @@ Connext installation by copying the file (or its contents) to
10391039
`ros2_qos_profiles.xml` contains a single QoS library named `ros2`, and containing
10401040
the following QoS profiles:
10411041
1042-
- [`ros2::rmw.ros_discovery_info`](#ros2rmwros_discovery_info)
1043-
- [`ros2::rcl.node_parameters`](#ros2rclnode_parameters)
1044-
- [`ros2::rcl.log`](#ros2rcllog)
1045-
- [`ros2::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints)
1046-
- [`ros2::rmw_connextdds.base_participant`](#ros2rmw_connextddsbase_participant)
1047-
- [`ros2::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application)
1048-
- [`ros2::rmw_connextdds.opt.large_data`](#ros2rmw_connextddsoptlarge_data)
1049-
- [`ros2::rmw_connextdds.opt.unbounded_data`](#ros2rmw_connextddsoptunbounded_data)
1050-
- [`ros2::rmw_connextdds.opt.content_filtered_topic_property`](#ros2rmw_connextddsoptcontent_filtered_topic_property)
1051-
- [`ros2::rmw_connextdds.opt.localhost_only`](#ros2rmw_connextddsoptlocalhost_only)
1052-
- [`ros2::rmw_connextdds.opt.fast_endpoint_discovery`](#ros2rmw_connextddsoptfast_endpoint_discovery)
1053-
1054-
Most users should consider using profile [`ros2::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application) as the base profile to begin
1042+
- [`ROS2QoS::rmw.ros_discovery_info`](#ros2rmwros_discovery_info)
1043+
- [`ROS2QoS::rcl.node_parameters`](#ros2rclnode_parameters)
1044+
- [`ROS2QoS::rcl.log`](#ros2rcllog)
1045+
- [`ROS2QoS::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints)
1046+
- [`ROS2QoS::rmw_connextdds.base_participant`](#ros2rmw_connextddsbase_participant)
1047+
- [`ROS2QoS::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application)
1048+
- [`ROS2QoS::rmw_connextdds.large_data`](#ros2rmw_connextddsoptlarge_data)
1049+
- [`ROS2QoS::rmw_connextdds.unbounded_data`](#ros2rmw_connextddsoptunbounded_data)
1050+
- [`ROS2QoS::rmw_connextdds.content_filtered_topic_property`](#ros2rmw_connextddsoptcontent_filtered_topic_property)
1051+
- [`ROS2QoS::rmw_connextdds.localhost_only`](#ros2rmw_connextddsoptlocalhost_only)
1052+
- [`ROS2QoS::rmw_connextdds.fast_endpoint_discovery`](#ros2rmw_connextddsoptfast_endpoint_discovery)
1053+
1054+
Most users should consider using profile [`ROS2QoS::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application) as the base profile to begin
10551055
customization of the DDS QoS used by their applications.
10561056
10571057
This profile will provide the same QoS settings used by default by `rmw_connextdds`
10581058
(i.e. when no custom [runtime configuration](#rmw-runtime-configuration) is specified).
10591059
1060-
Alternatively, profiles [`ros2::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints)
1061-
and [`ros2::rmw_connextdds.base_participant`](#ros2rmw_connextddsbase_participant),
1062-
which are both already included in the inheritance chain of [`ros2::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application), may be used directly
1060+
Alternatively, profiles [`ROS2QoS::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints)
1061+
and [`ROS2QoS::rmw_connextdds.base_participant`](#ros2rmw_connextddsbase_participant),
1062+
which are both already included in the inheritance chain of [`ROS2QoS::rmw_connextdds.base_application`](#ros2rmw_connextddsbase_application), may be used directly
10631063
to, respectively, configure the QoS of all "built-in" endpoints created by the
10641064
RMW and `rcl` layers, and to configure the QoS of the DomainParticipant created
10651065
by `rmw_connextdds`.
10661066
1067-
QoS profiles in the `ros2::rmw_connextdds.opt.*` namespace describe various
1067+
QoS profiles in the `ROS2QoS::rmw_connextdds.*` namespace describe various
10681068
configurations that are applied optionally by `rmw_connextdds`.
10691069
10701070
These profiles include:
@@ -1077,58 +1077,58 @@ These profiles include:
10771077
- configurations that can be disabled via environment variables (e.g.
10781078
"fast endpoints discovery").
10791079
1080-
Other QoS profiles, like the ones in the `ros2::rmw.*` `ros2::rmw.*` namespaces,
1080+
Other QoS profiles, like the ones in the `ROS2QoS::rmw.*` `ROS2QoS::rmw.*` namespaces,
10811081
should only be used as reference.
10821082
1083-
#### ros2::rmw.ros_discovery_info
1083+
#### ROS2QoS::rmw.ros_discovery_info
10841084
1085-
Profile `ros2::rmw.ros_discovery_info` can be used to customize the QoS for
1085+
Profile `ROS2QoS::rmw.ros_discovery_info` can be used to customize the QoS for
10861086
endpoints on the internal RMW topic `"ros_discovery_info"`.
10871087
10881088
For the equivalent RMW code, see `rmw_connextdds_graph_initialize()`
10891089
in [rmw_graph.cpp](rmw_connextdds_common/src/common/rmw_graph.cpp).
10901090
1091-
#### ros2::rcl.node_parameters
1091+
#### ROS2QoS::rcl.node_parameters
10921092
1093-
Profile `ros2::rcl.node_parameters` defines the QoS used by endpoints on
1093+
Profile `ROS2QoS::rcl.node_parameters` defines the QoS used by endpoints on
10941094
various topics used for management of node parameters.
10951095
10961096
See `rmw_qos_profile_parameters` from [rmw/include/rmw/qos_profiles.h](https://github.com/ros2/rmw/blob/master/rmw/include/rmw/qos_profiles.h)
10971097
for the equivalent code implementation.
10981098
1099-
#### ros2::rcl.log
1099+
#### ROS2QoS::rcl.log
11001100
1101-
Profile `ros2::rcl.log` defines the QoS used by endpoints on the ROS logging topic
1101+
Profile `ROS2QoS::rcl.log` defines the QoS used by endpoints on the ROS logging topic
11021102
`"rosout"`.
11031103
11041104
See `rcl_qos_profile_rosout_default` from [rcl/include/rcl/logging_rosout.h](https://github.com/ros2/rcl/blob/master/rcl/include/rcl/logging_rosout.h)
11051105
for the equivalent code implementation.
11061106
1107-
#### ros2::rcl.builtin_endpoints
1107+
#### ROS2QoS::rcl.builtin_endpoints
11081108
11091109
Profile `rcl.builtin_endpoints` provides QoS settings for all "built-in"
11101110
endpoints created by the RMW and `rcl` layers for every ROS 2 Node.
11111111
11121112
These "built-in" endpoints include:
11131113
1114-
- Endpoints on topic `"ros_discovery_info"` (configured using profile [`ros2::rmw.ros_discovery_info`](#ros2rmwros_discovery_info)).
1115-
- Endpoints on topics used for node parameters (configured using profile [`ros2::rcl.node_parameters`](#ros2rclnode_parameters)).
1116-
- Endpoints on the ROS logging topic `"rosout"` (configured using profile [`ros2::rcl.log`](#ros2rcllog)).
1114+
- Endpoints on topic `"ros_discovery_info"` (configured using profile [`ROS2QoS::rmw.ros_discovery_info`](#ros2rmwros_discovery_info)).
1115+
- Endpoints on topics used for node parameters (configured using profile [`ROS2QoS::rcl.node_parameters`](#ros2rclnode_parameters)).
1116+
- Endpoints on the ROS logging topic `"rosout"` (configured using profile [`ROS2QoS::rcl.log`](#ros2rcllog)).
11171117
11181118
The parent profiles are applied using "topic filters" that select all required topics.
11191119
1120-
#### ros2::rmw_connextdds.base_participant
1120+
#### ROS2QoS::rmw_connextdds.base_participant
11211121
1122-
Profile `ros2::rmw_connextdds.base_participant` models the DomainParticipan QoS
1122+
Profile `ROS2QoS::rmw_connextdds.base_participant` models the DomainParticipan QoS
11231123
settings used by `rmw_connextdds` to change some of Connext's "out of the box"
11241124
QoS, and make it more amenable to use with ROS 2 applications.
11251125
11261126
These settings are only applied by `rmw_connextdds` when [`RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY`](#rmw_connext_participant_qos_override_policy)
11271127
is either not set, or set to `all`.
11281128
1129-
#### ros2::rmw_connextdds.base_application
1129+
#### ROS2QoS::rmw_connextdds.base_application
11301130
1131-
Use profile `ros2::rmw_connextdds.base_application` as the base profile when
1131+
Use profile `ROS2QoS::rmw_connextdds.base_application` as the base profile when
11321132
[`RMW_CONNEXT_ENDPOINT_QOS_OVERRIDE_POLICY`](#rmw_connext_endpoint_qos_override_policy)
11331133
is set to `never` and/or [`RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY`](#rmw_connext_participant_qos_override_policy) is set to a value other than `all`.
11341134
@@ -1142,12 +1142,12 @@ to the user to configure this policy as needed in their own profiles.
11421142
The asynchronous publish mode is still used for all "built-in" writers to allow them
11431143
to continue to operate like "out of the box", even when writing large messages.
11441144
1145-
You might also consider inheriting directly from profile [`ros2::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints),
1145+
You might also consider inheriting directly from profile [`ROS2QoS::rcl.builtin_endpoints`](#ros2rclbuiltin_endpoints),
11461146
if you only want to configure the built-in endpoints but not the DomainParticipant QoS.
11471147
1148-
#### ros2::rmw_connextdds.opt.large_data
1148+
#### ROS2QoS::rmw_connextdds.large_data
11491149
1150-
Profile `ros2::rmw_connextdds.opt.large_data` describes the "large data" optimizations
1150+
Profile `ROS2QoS::rmw_connextdds.large_data` describes the "large data" optimizations
11511151
that `rmw_connextdds` applies to endpoints whose type is detected to have a static
11521152
maximum serialized size of at least 1MB.
11531153
@@ -1156,9 +1156,9 @@ The configuration is derived from Connext's built-in profile `Generic.KeepLastRe
11561156
These optimizations are always applied by `rmw_connextdds` to all "qualified" endpoints,
11571157
unless variable [`RMW_CONNEXT_DISABLE_LARGE_DATA_OPTIMIZATIONS`](#rmw_connext_disable_large_data_optimizations) is used to disabled them.
11581158
1159-
#### ros2::rmw_connextdds.opt.unbounded_data
1159+
#### ROS2QoS::rmw_connextdds.unbounded_data
11601160
1161-
The settings from profile `ros2::rmw_connextdds.opt.unbounded_data` are used by
1161+
The settings from profile `ROS2QoS::rmw_connextdds.unbounded_data` are used by
11621162
`rmw_connextdds` to disable preallocation of samples for endpoints whose
11631163
data type is "unbounded". This includes any data type containing a string or a
11641164
sequence with an unlimited maximum length.
@@ -1170,21 +1170,21 @@ automatically assert them upon endpoint creation.
11701170
The profile is provide only documentation purposes, since there is no way to
11711171
disable this behavior in `rmw_connextdds`.
11721172
1173-
#### ros2::rmw_connextdds.opt.content_filtered_topic_property
1173+
#### ROS2QoS::rmw_connextdds.content_filtered_topic_property
11741174
1175-
Profile `ros2::rmw_connextdds.opt.content_filtered_topic_property` is applied by
1175+
Profile `ROS2QoS::rmw_connextdds.content_filtered_topic_property` is applied by
11761176
`rmw_connextdds` when policy [`DomainParticipantQos::resource_limits::contentfilter_property_max_length`](https://community.rti.com/static/documentation/connext-dds/6.0.1/doc/api/connext_dds/api_c/structDDS__DomainParticipantResourceLimitsQosPolicy.html#aef1ff851202f5777d31528a52d528e4f)
11771177
is detected to be less than `1024`.
11781178
1179-
#### ros2::rmw_connextdds.opt.localhost_only
1179+
#### ROS2QoS::rmw_connextdds.localhost_only
11801180
1181-
Profile `ros2::rmw_connextdds.opt.localhost_only` describes the configuration
1181+
Profile `ROS2QoS::rmw_connextdds.localhost_only` describes the configuration
11821182
applied by `rmw_connextdds` to the DomainParticipant QoS when "localhost only"
11831183
communication is requested by the user.
11841184
1185-
#### ros2::rmw_connextdds.opt.fast_endpoint_discovery
1185+
#### ROS2QoS::rmw_connextdds.fast_endpoint_discovery
11861186
1187-
Profile `ros2::rmw_connextdds.opt.fast_endpoint_discovery` models the QoS
1187+
Profile `ROS2QoS::rmw_connextdds.fast_endpoint_discovery` models the QoS
11881188
configuration applied by `rmw_connextdds` to speed up the process of endpoint
11891189
discovery.
11901190

rmw_connextdds/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ install(
6565
RUNTIME DESTINATION bin
6666
)
6767

68-
if(NOT WIN32)
69-
ament_environment_hooks(env_hook/rmw_connextdds_resources.sh.in)
70-
endif()
71-
7268
install(
7369
FILES
7470
resource/xml/ros2_qos_profiles.xml

rmw_connextdds/env_hook/rmw_connextdds_resources.sh.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ _rmw_connextdds_append_profile()
7070
elif [ -z "${already_added}" ]; then
7171
export NDDS_QOS_PROFILES="${NDDS_QOS_PROFILES};file://${_ros2_qos_profiles}"
7272
fi
73+
74+
export RMW_CONNEXT_QOS_PROFILES="${_ros2_qos_profiles}"
7375
}
7476

7577
if [ ! -f "${_ros2_qos_profiles}" ]; then

rmw_connextdds/resource/xml/USER_QOS_PROFILES.example.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/5.3.1/rti_dds_qos_profiles.xsd" version="5.3.1">
33
<qos_library name="my_application">
4-
<qos_profile name="my_process" is_default_qos="true" base_name="ros2::rmw_connextdds.base_application">
4+
<qos_profile name="my_process" is_default_qos="true" base_name="ROS2QoS::rmw_connextdds.base_application">
55
<datareader_qos topic_filter="rt/chatter">
66
<reliability>
77
<kind>RELIABLE_RELIABILITY_QOS</kind>

0 commit comments

Comments
 (0)