-
Notifications
You must be signed in to change notification settings - Fork 255
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
Document the offered_qos_profiles
argument of TopicMetadata
#1420
Comments
I was able to work out the serialization scheme by poking around an existing working bag, and I found this:
Looking deeper, it seems like something of this form should work: qos_profile = QoSProfile(depth=10,
reliability=QoSReliabilityPolicy.RELIABLE,
durability=QoSDurabilityPolicy.TRANSIENT_LOCAL)
qos_profile_dict = yaml.dump([qos_profile.get_c_qos_profile().to_dict()]) ... but it doesn't quite handle the
|
Offered QoS profiles is, agreed, a pretty awkward part of this data structure. It was implemented that way as a workaround for some circular dependencies, long ago. It could use some rework - I even opened #1197 but there just hasn't been time to finish it. The source for how the YAML is serialized/deserialized is in https://github.com/ros2/rosbag2/blob/rolling/rosbag2_transport/src/rosbag2_transport/qos.cpp - hopefully that can give some more insight into the structure. Any PR to the README would be welcome for review. |
@asymingt We recently made structural changes and cleanup in the scope of the #1476 and now we are using
Feel free to reopen if you think more changes are needed. |
Description
Right now it's not clear how to use the
offered_qos_profiles
argument ofTopicMetadata
in therosbag2_py
API. By looking at the source code I have worked out that it's stringified YAML but I can't work out the exact syntax. Looking at the QoS overrides syntax, I would assume that it's something like this:Or possibly something like this:
In both cases there is no runtime error and the bag superficially looks good:
The trouble is when you try and play it, then you get this error:
I have confirmed that removing
offered_qos_profiles=offered_qos_profiles
from theTopicMetadata
constructor removed warning at the cost of losing QoS information.Related Issues
None
Completion Criteria
Need to have: A section in the root README that provides a short guide on how to get the QoS syntax correct to ensure that the offered profiles are parseable at runtime.
Nice to have: at bag generation time, issue a warning or error if the profiles are not readable when you call
writer.create_topic(topic_metadata)
.Implementation Notes / Suggestions
I'd be happy to implement this feature if you show me one example of how to get this working. I still am unable to the the offered QoS profiles stringified YAML syntax correct.
Testing Notes / Suggestions
A test showing that an unparseable
offered_qos_profiles
value results in a warning or error being thrown whenwriter.create_topic(topic_metadata)
is called.The text was updated successfully, but these errors were encountered: