Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | humble |
Last Updated | 2025-05-20 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 6.2.7 |
rmw_fastrtps_dynamic_cpp | 6.2.7 |
rmw_fastrtps_shared_cpp | 6.2.7 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
is a ROS 2 middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You can specify Fast DDS as your ROS 2 middleware layer in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware features.
For example, see ROS 2 QoS policies.
In addition to ROS 2 QoS policies, rmw_fastrtps
sets the following Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
SYNCHRONOUS_PUBLISH_MODE
- Data Sharing:
OFF
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
Change publication mode
Fast DDS features two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to SYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
. -
datasharing :
AUTO
.
There are two ways of telling a ROS 2 application which XML to use:
- Placing your XML file in the running directory under the name
DEFAULT_FASTRTPS_PROFILES.xml
. - Setting environment variable
FASTRTPS_DEFAULT_PROFILES_FILE
to contain the path to your XML file (relative to the working directory).
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | jazzy |
Last Updated | 2025-05-20 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 8.4.2 |
rmw_fastrtps_dynamic_cpp | 8.4.2 |
rmw_fastrtps_shared_cpp | 8.4.2 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
is a ROS 2 middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You can specify Fast DDS as your ROS 2 middleware layer in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware features.
For example, see ROS 2 QoS policies.
In addition to ROS 2 QoS policies, rmw_fastrtps
sets the following Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
SYNCHRONOUS_PUBLISH_MODE
- Data Sharing:
OFF
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
- Change publication mode
- Full QoS configuration
- Change participant discovery options
- Enable Zero Copy Data Sharing
- Large data transfer over lossy network
Change publication mode
Fast DDS features two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to SYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
. -
datasharing :
AUTO
.
There are two ways of telling a ROS 2 application which XML to use:
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | kilted |
Last Updated | 2025-06-16 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 9.3.2 |
rmw_fastrtps_dynamic_cpp | 9.3.2 |
rmw_fastrtps_shared_cpp | 9.3.2 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
is a ROS 2 middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You can specify Fast DDS as your ROS 2 middleware layer in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware features.
For example, see ROS 2 QoS policies.
In addition to ROS 2 QoS policies, rmw_fastrtps
sets the following Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
SYNCHRONOUS_PUBLISH_MODE
- Data Sharing:
OFF
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
- Change publication mode
- Full QoS configuration
- Change participant discovery options
- Enable Zero Copy Data Sharing
- Large data transfer over lossy network
Change publication mode
Fast DDS features two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to SYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
. -
datasharing :
AUTO
.
There are two ways of telling a ROS 2 application which XML to use:
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | rolling |
Last Updated | 2025-06-13 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 9.4.0 |
rmw_fastrtps_dynamic_cpp | 9.4.0 |
rmw_fastrtps_shared_cpp | 9.4.0 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
is a ROS 2 middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You can specify Fast DDS as your ROS 2 middleware layer in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware features.
For example, see ROS 2 QoS policies.
In addition to ROS 2 QoS policies, rmw_fastrtps
sets the following Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
SYNCHRONOUS_PUBLISH_MODE
- Data Sharing:
OFF
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
- Change publication mode
- Full QoS configuration
- Change participant discovery options
- Enable Zero Copy Data Sharing
- Large data transfer over lossy network
Change publication mode
Fast DDS features two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to SYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
. -
datasharing :
AUTO
.
There are two ways of telling a ROS 2 application which XML to use:
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | ardent |
Last Updated | 2017-12-09 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
fastrtps_cmake_module | 0.4.0 |
rmw_fastrtps_cpp | 0.4.0 |
README
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | bouncy |
Last Updated | 2018-06-28 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
fastrtps_cmake_module | 0.5.1 |
rmw_fastrtps_cpp | 0.5.1 |
README
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | crystal |
Last Updated | 2019-03-27 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 0.6.2 |
rmw_fastrtps_dynamic_cpp | 0.6.2 |
rmw_fastrtps_shared_cpp | 0.6.2 |
README
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | eloquent |
Last Updated | 2020-12-04 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 0.8.2 |
rmw_fastrtps_dynamic_cpp | 0.8.2 |
rmw_fastrtps_shared_cpp | 0.8.2 |
README
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | dashing |
Last Updated | 2020-11-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 0.7.8 |
rmw_fastrtps_dynamic_cpp | 0.7.8 |
rmw_fastrtps_shared_cpp | 0.7.8 |
README
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | galactic |
Last Updated | 2022-04-28 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 5.0.2 |
rmw_fastrtps_dynamic_cpp | 5.0.2 |
rmw_fastrtps_shared_cpp | 5.0.2 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
constitutes ROS 2 default middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You do not need to do anything in order to use Fast DDS as your ROS 2 middleware layer (since it is the default implementation). However, you can still specify it in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware QoS (see ROS 2 QoS policies).
In addition to ROS 2 QoS policies, rmw_fastrtps
sets two more Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
ASYNCHRONOUS_PUBLISH_MODE
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
Change publication mode
Fast DDS feats two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to ASYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
.
There are two ways of telling a ROS 2 application which XML to use:
- Placing your XML file in the running directory under the name
DEFAULT_FASTRTPS_PROFILES.xml
. - Setting environment variable
FASTRTPS_DEFAULT_PROFILES_FILE
to contain the path to your XML file (relative to the working directory).
To verify the actual QoS settings using rmw:
```cpp // Create a publisher within a node with specific topic, type support, options, and QoS
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | foxy |
Last Updated | 2023-05-27 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 1.3.2 |
rmw_fastrtps_dynamic_cpp | 1.3.2 |
rmw_fastrtps_shared_cpp | 1.3.2 |
README
ROS 2 Middleware Implementation for eProsima’s Fast-RTPS
rmw_fastrtps
constitutes ROS 2 default middleware implementation, providing an interface between ROS 2 and eProsima’s Fast-RTPS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You do not need to do anything in order to use Fast-RTPS as your ROS 2 middleware layer (since it is the default implementation). However, you can still specify it in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast-RTPS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
rmw_fastrtps
sets some of the Fast-RTPS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
ASYNCHRONOUS_PUBLISH_MODE
However, it is possible to fully configure Fast-RTPS (including the history memory policy and the publication mode) using an XML file as described in Fast-RTPS documentation.
Then, you just need to set environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 (it is set to 0 by default).
This tells rmw_fastrtps
that it should not override neither the history memory policy nor the publication mode.
You have two ways of telling you ROS 2 application which XML to use:
- Placing your XML file in the running directory under the name
DEFAULT_FASTRTPS_PROFILES.xml
. - Setting environment variable
FASTRTPS_DEFAULT_PROFILES_FILE
to your XML file.
Example
The following example configures Fast-RTPS to publish synchronously, and to have a pre-allocated history that can be expanded whenever it gets filled.
- Create a Fast-RTPS XML file with:
<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<profiles>
<publisher profile_name="publisher profile" is_default_profile="true">
<qos>
<publishMode>
<kind>SYNCHRONOUS</kind>
</publishMode>
</qos>
<historyMemoryPolicy>PREALLOCATED_WITH_REALLOC</historyMemoryPolicy>
</publisher>
<subscriber profile_name="subscriber profile" is_default_profile="true">
<historyMemoryPolicy>PREALLOCATED_WITH_REALLOC</historyMemoryPolicy>
</subscriber>
</profiles>
</dds>
- Run the talker/listener ROS 2 demo:
- In one terminal
FASTRTPS_DEFAULT_PROFILES_FILE=<path_to_xml_file> RMW_FASTRTPS_USE_QOS_FROM_XML=1 RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run demo_nodes_cpp talker
1. In another terminal
FASTRTPS_DEFAULT_PROFILES_FILE=<path_to_xml_file> RMW_FASTRTPS_USE_QOS_FROM_XML=1 RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run demo_nodes_cpp listener
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).
Repository Summary
Checkout URI | https://github.com/ros2/rmw_fastrtps.git |
VCS Type | git |
VCS Version | iron |
Last Updated | 2024-07-11 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
rmw_fastrtps_cpp | 7.1.4 |
rmw_fastrtps_dynamic_cpp | 7.1.4 |
rmw_fastrtps_shared_cpp | 7.1.4 |
README
ROS 2 Middleware Implementation for eProsima’s Fast DDS
rmw_fastrtps
is a ROS 2 middleware implementation, providing an interface between ROS 2 and eProsima’s Fast DDS middleware.
Getting started
This implementation is available in all ROS 2 distributions, both from binaries and from sources. You can specify Fast DDS as your ROS 2 middleware layer in two different ways:
- Exporting
RMW_IMPLEMENTATION
environment variable:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- When launching your ROS 2 application:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run <your_package> <your application>
Two different RMW implementations
rmw_fastrtps
actually provides not one but two different ROS 2 middleware implementations, both of them using Fast DDS as middleware layer: rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
(note that directory rmw_fastrtps_shared_cpp
just contains the code that the two implementations share, and does not constitute a layer on its own).
The main difference between the two is that rmw_fastrtps_dynamic_cpp
uses introspection typesupport at run time to decide on the serialization/deserialization mechanism.
On the other hand, rmw_fastrtps_cpp
uses its own typesupport, which generates the mapping for each message type at build time.
Mind that the default ROS 2 RMW implementation is rmw_fastrtps_cpp
.
You can however set it to rmw_fastrtps_dynamic_cpp
using the environment variable RMW_IMPLEMENTATION
as described above.
Advance usage
ROS 2 only allows for the configuration of certain middleware features.
For example, see ROS 2 QoS policies.
In addition to ROS 2 QoS policies, rmw_fastrtps
sets the following Fast DDS configurable parameters:
- History memory policy:
PREALLOCATED_WITH_REALLOC_MEMORY_MODE
- Publication mode:
SYNCHRONOUS_PUBLISH_MODE
- Data Sharing:
OFF
However, rmw_fastrtps
offers the possibility to further configure Fast DDS:
- Change publication mode
- Full QoS configuration
- Change participant discovery options
- Enable Zero Copy Data Sharing
Change publication mode
Fast DDS features two different publication modes: synchronous and asynchronous. To learn more about the implications of choosing one mode over the other, please refer to DDS: Asynchronous vs Synchronous Publishing:
rmw_fastrtps
offers an easy way to change Fast DDS’ publication mode without the need of defining a XML file. That is environment variable RMW_FASTRTPS_PUBLICATION_MODE
.
The admissible values are:
-
ASYNCHRONOUS
: asynchronous publication mode. Setting this mode implies that when the publisher invokes the write operation, the data is copied into a queue, a notification about the addition to the queue is performed, and control of the thread is returned to the user before the data is actually sent. A background thread (asynchronous thread) is in turn in charge of consuming the queue and sending the data to every matched reader. -
SYNCHRONOUS
: synchronous publication mode. Setting this mode implies that the data is sent directly within the context of the user thread. This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application with continuing its operation. It is important to note that this mode typically yields higher throughput rates at lower latencies, since the notification and context switching between threads is not present. -
AUTO
: let Fast DDS select the publication mode. This implies using the publication mode set in the XML file or, failing that, the default value set in Fast DDS (which currently is set toSYNCHRONOUS
).
If RMW_FASTRTPS_PUBLICATION_MODE
is not set, then both rmw_fastrtps_cpp
and rmw_fastrtps_dynamic_cpp
behave as if it were set to SYNCHRONOUS
.
Full QoS configuration
Fast DDS QoS policies can be fully configured through a combination of the rmw QoS profile API, and the Fast DDS XML file’s QoS elements. Configuration depends on the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML
.
- ROS 2 QoS contained in
rmw_qos_profile_t
are always honored, unless set to*_SYSTEM_DEFAULT
. In that case, XML values, or Fast DDS default values in the absence of XML ones, are applied. Setting any QoS inrmw_qos_profile_t
to something other than*_SYSTEM_DEFAULT
entails that specifying it via XML files has no effect, since they do not override what was used to create the publisher, subscription, service, or client. - In order to modify the history memory policy or publication mode using XML files, environment variable
RMW_FASTRTPS_USE_QOS_FROM_XML
must be set to 1 (it is set to 0 by default). This tellsrmw_fastrtps
that it should override both the history memory policy and the publication mode using the XML. Bear in mind that setting this environment variable but not setting either of these policies in the XML results in Fast DDS’ defaults configurations being used.
RMW_FASTRTPS_USE_QOS_FROM_XML | rmw QoS profile | Fast DDS XML QoS | Fast DDS XML and publication mode |
---|---|---|---|
0 (default) | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Ignored - overrided by rmw_fastrtps
|
0 (default) | Set to system default | Used | Ignored - overrided by rmw_fastrtps
|
1 | Use default values | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to non system default | Ignored - overridden by rmw_qos_profile_t
|
Used |
1 | Set to system default | Used | Used |
Note: Setting RMW_FASTRTPS_USE_QOS_FROM_XML
to 1 effectively overrides whatever configuration was set with RMW_FASTRTPS_PUBLICATION_MODE
.
Furthermore, If RMW_FASTRTPS_USE_QOS_FROM_XML
is set to 1, and history memory policy or publication mode are not specified in the XML, then the Fast DDS’ default configurations will be used:
-
history memory policy :
PREALLOCATED_MEMORY_MODE
. -
publication mode :
SYNCHRONOUS_PUBLISH_MODE
. -
datasharing :
AUTO
.
There are two ways of telling a ROS 2 application which XML to use:
- Placing your XML file in the running directory under the name
DEFAULT_FASTRTPS_PROFILES.xml
.
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
Contributors must sign-off each commit by adding a Signed-off-by: ...
line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
Developer Certificate of Origin (DCO).