-
Notifications
You must be signed in to change notification settings - Fork 117
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
[rmw_fastrtps] Improve handling of dynamic discovery #653
Conversation
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2023-02-16/29927/1 |
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
3f2b322
to
24bdb5a
Compare
This commit adds support for using IP addresses to specify peers. It also refactors out some networking function so that they can be used by other files. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Two more to go. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
See: * ros2/rmw#349 * ros2/rcl#1038 Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
@EduPonz Any ETA on when the changes from this branch eProsima/Fast-DDS@master...poc/ros2-iron-discovery-options will get merged into Fast-DDS? They're required for these discovery changes to work with Fast-DDS. I'm hoping we can get this in before the upcoming ROS Iron RMW freeze deadline. |
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
if (RMW_AUTOMATIC_DISCOVERY_RANGE_LOCALHOST == discovery_options->automatic_discovery_range) { | ||
// Add localhost as a static peer | ||
eprosima::fastrtps::rtps::Locator_t peer; | ||
eprosima::fastrtps::rtps::IPLocator::setIPv4(peer, "127.0.0.1"); | ||
domainParticipantQos.wire_protocol().builtin.initialPeersList.push_back(peer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the case of RMW_AUTOMATIC_DISCOVERY_RANGE_SUBNET
, if initialPeersList
is not empty, we should add the default multicast address to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the initial peer list, or as a multicast locator? I assumed the latter in cf9bf83
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
…ticast locator Signed-off-by: Shane Loretz <[email protected]>
eprosima::fastrtps::rtps::Locator_t locator; | ||
eprosima::fastrtps::rtps::IPLocator::setIPv4(locator, 239, 255, 0, 1); | ||
domainParticipantQos.wire_protocol() | ||
.builtin.metatrafficMulticastLocatorList.push_back(locator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the initialPeersList
. Announcements are always sent to the initial peer list. When it is empty, the middleware sets its value to the metatrafficMulticastLocatorList
.
So if we want to publish announcements to 192.168.1.10 and the multicast address, both should be in the initial peer list.
.builtin.metatrafficMulticastLocatorList.push_back(locator); | |
.builtin.initialPeersList.push_back(locator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to Initial peers list instead in 9cec2d6
rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp
Show resolved
Hide resolved
…c peers and SUBNET range Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
Need one small fix/enhancement to Fast-DDS eProsima/Fast-DDS#3437 |
This PR adds to
rmw_fastrtps
functionality necessary to support the improved handling of dynamic discovery.It adds handling of the new discovery parameters passed down from
rcl
.This implementation allows a host specified in static peers to be a host name or an IPv4 or an IPv6 addresses. It will automatically manage translating between these to ensure that the static peer is correctly identified, no matter what it reports itself as.
Current status: The desired functionality is mostly complete. Most of the entries in the goal matrix are working correctly. There is currently a bug where specifying a static peer appears to disable dynamic discovery. This needs to be resolved.