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

Update README to clarify the use of environment variable RMW_FASTRTPS_USE_QOS_FROM_XML #466

Merged
merged 4 commits into from
Oct 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ You can however set it to `rmw_fastrtps_dynamic_cpp` using the environment varia
* Publication mode: `ASYNCHRONOUS_PUBLISH_MODE`

However, it is possible to fully configure Fast DDS (including the history memory policy and the publication mode) using an XML file as described in [Fast DDS documentation](https://fast-dds.docs.eprosima.com/en/latest/fastdds/xml_configuration/xml_configuration.html).
Copy link

Choose a reason for hiding this comment

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

Hi, thanks for the PR, but the README still looks misleading to me. Line 35 reads like "it is possible to fully configure Fast DDS using the XML file", which is not the case.

If only History memory policy and Publication mode can be configured with the XML, then I would expect a big warning right here, otherwise issues like #465 will keep piling up.

Copy link

Choose a reason for hiding this comment

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

Hi @jcaraban,

I thinks there's been a misuderstanding. It is indeed possible to fully configure Fast DDS using the XML, not just the History memory policy and Publication mode. What the README intends to convey is that to modify those 2 particular QoS, you will need both have a DEFAULT_FASTRTPS_PROFILES.xml file and to set RMW_FASTRTPS_USE_QOS_FROM_XML=1. Else, History memory policy and Publication mode will be set by RMW regardless of what your XML states

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.
If you want to modify the history memory policy or the publication mode you must 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 override both the history memory policy and the publication mode using the XML.
Bear in mind that if you set this environment variable but do not give a value to either of these policies, defaults will be used.
Current Fast-DDS defaults are:
* [History memory policy](https://fast-dds.docs.eprosima.com/en/latest/fastdds/dds_layer/core/policy/eprosimaExtensions.html#rtpsendpointqos): `PREALLOCATED_MEMORY_MODE`.
* [Publication mode](https://fast-dds.docs.eprosima.com/en/latest/fastdds/dds_layer/core/policy/eprosimaExtensions.html#publishmodeqospolicy): `SYNCHRONOUS_PUBLISH_MODE`.

You have two ways of telling you ROS 2 application which XML to use:
1. Placing your XML file in the running directory under the name `DEFAULT_FASTRTPS_PROFILES.xml`.
Expand Down Expand Up @@ -91,4 +95,4 @@ Quality Declarations for the external dependencies of these packages can be foun

* [Fast DDS Quality Declaration](https://github.com/eProsima/Fast-DDS/blob/master/QUALITY.md)
* [Fast CDR Quality Declaration](https://github.com/eProsima/Fast-CDR/blob/master/QUALITY.md)
* [`foonathan_memory` Quality Declaration](https://github.com/eProsima/Fast-DDS/blob/master/Quality_Declaration_foonathan_memory.md)
* [`foonathan_memory` Quality Declaration](https://github.com/eProsima/Fast-DDS/blob/master/Quality_Declaration_foonathan_memory.md)