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

Add functions to get a compatible QoS profiles #976

Closed
wants to merge 2 commits into from

Conversation

jacobperron
Copy link
Member

Connects to ros2/rmw#304

Given a node and a topic name, query QoS profiles of publishers on the topic and
provide a QoS profile that is compatible with the majority of publishers.
All while keeping the highest level of service possible.


In draft, since I still need to add the equivalent function for publishers. Waiting to get some feedback on the API first though.

Given a node and a topic name, query QoS profiles of publishers on the topic and
provide a QoS profile that is compatible with the majority of publishers.
All while keeping the highest level of service possible.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
rcl/include/rcl/qos_compatibility.h Show resolved Hide resolved
rcl/src/rcl/qos_compatibility.c Show resolved Hide resolved
}

rmw_ret_t rmw_ret = rmw_qos_profile_get_most_compatible_for_subscription(
publisher_qos_profiles,
Copy link
Member

Choose a reason for hiding this comment

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

This is just an idea, but what if instead this first parameter was of type rcl_topic_endpoint_info_array_t (same as rmw_topic_endpoint_info_array_t)? I guess if you're not using rcl_get_publishers_info_by_topic() (e.g. during testing), it's slightly harder to use, but it would simplify this function considerably.

Do you think this rmw_qos_profile_get_most_compatible_for_subscription() will often be used outside of this situation where the qos profiles you're matching would be coming from another source?

I'm not totally convinced myself, just wanted to bring it up.

Copy link
Member Author

@jacobperron jacobperron Apr 14, 2022

Choose a reason for hiding this comment

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

I don't have any situations in mind where rmw_qos_profile_get_most_compatible_for_subscription would be used other than like this, so your point it valid. It might actually be nicer, since we could return an array of endpoint GIDs for any that are incompatible instead of an array of bool.

@jacobperron
Copy link
Member Author

Closing in favor of ros2/rmw#320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants