Add functions to get compatible QoS profiles#59
Closed
jacobperron wants to merge 7 commits intomasterfrom
Closed
Conversation
Given one or more publisher QoS profiles, modify the given subscription QoS profile to be compatible with most of them. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
wjwwood
reviewed
Apr 13, 2022
rmw_dds_common/src/qos.cpp
Outdated
| // QoS profile is compatible with all publishers QoS profiles in the input | ||
| if (compatible_publisher_profiles) { | ||
| for (size_t i = 0u; i < publisher_profiles_length; ++i) { | ||
| compatible_publisher_profiles[i] = true; |
Member
There was a problem hiding this comment.
While this seems silly for DDS rmw implementations, I think it's a potentially useful feature for future non-DDS implementations, and keeps users of the interface aware of the possibility that the QoS matching rules are not fixed at this time.
ivanpauno
reviewed
Apr 13, 2022
| } | ||
|
|
||
| rmw_ret_t | ||
| qos_profile_get_most_compatible_for_subscription( |
Member
There was a problem hiding this comment.
should this function also take in accound deadline?
You need deadline_publisher < deadline_subscription for them to match
Pass in endpoint info array directly and output an endpoint info array for reporting incompatibilities. Update implementation and tests accordingly. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Given one or more publisher endpoints, modify the given subscription QoS profile to be compatible with most of them. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Collaborator
fujitatomoya
left a comment
There was a problem hiding this comment.
a few minor nitpicks, it looks good to me.
Comment on lines
+103
to
+104
| * This implements the rmw API \ref rmw_qos_profile_get_most_compatible_for_subscription(). | ||
| * See \ref rmw_qos_profile_get_most_compatible_for_subscription() for more information. |
Collaborator
There was a problem hiding this comment.
Suggested change
| * This implements the rmw API \ref rmw_qos_profile_get_most_compatible_for_subscription(). | |
| * See \ref rmw_qos_profile_get_most_compatible_for_subscription() for more information. | |
| * This implements the rmw API \ref rmw_qos_profile_get_most_compatible_for_publisher(). | |
| * See \ref rmw_qos_profile_get_most_compatible_for_publisher() for more information. |
| publisher_profile->reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE; | ||
| publisher_profile->durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL; | ||
|
|
||
| // Only use "manual by topic" liveliness if at least one subscription is using manual by topic |
Collaborator
There was a problem hiding this comment.
Suggested change
| // Only use "manual by topic" liveliness if at least one subscription is using manual by topic | |
| // Only use "manual by topic" liveliness if at least one subscription is using manual by topic |
Member
Author
|
Closing in favor of ros2/rmw#320 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connects to ros2/rmw#304
Currently, just contains an implementation for the subscription. I'll wait for feedback before adding the equivalent function for publishers.