Unique network flows optional checks#872
Unique network flows optional checks#872thomasmoore-torc wants to merge 3 commits intoros2:rollingfrom
Conversation
Signed-off-by: Thomas Moore <thomas.moore@torc.ai>
Signed-off-by: Thomas Moore <thomas.moore@torc.ai>
|
It appears that the build is failing because e5c8a84 requires ros2/rmw@403ee71, but the build is utilizing I don't currently have permissions to the |
fujitatomoya
left a comment
There was a problem hiding this comment.
test would be ideal to add.
| { | ||
|
|
||
| /// Check if unique network flows should be used for ROS discovery info. | ||
| RMW_FASTRTPS_SHARED_CPP_LOCAL |
There was a problem hiding this comment.
the function is declared in the header with RMW_FASTRTPS_SHARED_CPP_LOCAL, meaning it has hidden visibility and isn't exported from the shared library. however, it's called from rmw_fastrtps_cpp and rmw_fastrtps_dynamic_cpp, which are separate libraries???
| RMW_FASTRTPS_SHARED_CPP_LOCAL | |
| RMW_FASTRTPS_SHARED_CPP_PUBLIC |
There was a problem hiding this comment.
That's a good point. We build statically, so it's not an issue in our build environment. I was attempting to try and avoid an ABI break so that this can be back-ported to Jazzy. I think the only way to allow for back porting to Jazzy and allowing for ABI compatibility would be to duplicate the function in both rmw_fastrtps_cpp and rmw_fastrtps_dynamic_cpp. Are there any other options we can consider?
| #include "rmw_fastrtps_shared_cpp/listener_thread.hpp" | ||
|
|
||
| bool | ||
| rmw_fastrtps_shared_cpp::use_unique_network_flows_for_ros_discovery_info() |
There was a problem hiding this comment.
does this evaluate every context init? a static cached value with std::call_once would be more robust if multiple contexts are initialized concurrently with assumption that env variable does not change in the process space?
There was a problem hiding this comment.
I can make that change. However, no such mechanism is currently used for the other environment variables that are read during participant creation, such as FASTRTPS_DEFAULT_PROFILES_FILE, RMW_FASTRTPS_USE_QOS_FROM_XML, and RMW_FASTRTPS_PUBLICATION_MODE.
Signed-off-by: Thomas Moore <thomas.moore@torc.ai>
MiguelCompany
left a comment
There was a problem hiding this comment.
Apart from my comment below, this needs a rebase
| bool | ||
| use_unique_network_flows_for_ros_discovery_info(); |
There was a problem hiding this comment.
I would make this directly return rmw_unique_network_flow_endpoints_requirement_t.
We can then discuss whether we want the new env var to be ON/OFF, or if we want it to set a specific value (i.e.
DISABLED / OPTIONAL / STRICT / DEFAULT)
| bool | |
| use_unique_network_flows_for_ros_discovery_info(); | |
| rmw_unique_network_flow_endpoints_requirement_t | |
| get_unique_network_flows_for_ros_discovery_info(); |
Description
As part of #711, the
ros_discovery_infosubscription was configured withRMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED. However, there are no criteria under which an optional unique network flow is actually optional and it ultimately behaves exactly the same as settingRMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_STRICTLY_REQUIRED. There are several conditions under which unique network flows are not supported:The intent of this PR is to incorporate checks for these conditions such that a unique network flow will not be requested under these conditions when a subscription is created with
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED. It also adds theRMW_FASTRTPS_USE_UNIQUE_NETWORK_FLOWS_FOR_ROS_DISCOVERY_INFOenvironment variable to enable the ability to disable requesting uinique network flows for theros_discovery_infotopic.Is this user-facing behavior change?
This will enable the user to utilize features such as explicit locator specification or static EDP via the Fast DDS XML configuration files. It will also give the user the option to disable unique network flows for the
ros_discovery_infotopic.Did you use Generative AI?
Claude Opus 4.6 was used via GitHub Copilot to assist with the analysis of the issue and to provide an initial implementation. The implementation was then manually refined.
Additional Information
We would like to backport this to Jazzy.