-
Notifications
You must be signed in to change notification settings - Fork 68
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 sequence numbers to message info structure #318
Add sequence numbers to message info structure #318
Conversation
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
What's the intended use-case? I've used Could we have collisions with (publication) sequence numbers? How are they generated, and what are the guarantees? Since it's not a standard DDS feature, and since rmw is not DDS-only(:tm:), |
Yes, each publisher will use unique sequence numbers, but sample of different publishes may use the same.
I think that's already part of the message info struct, though IIRC it's not being filled by all the DDS vendors.
I think they don't provide much extra info, but I'm not sure.
IIUC, the idea is to use this to collect statistics (which messages were lost, etc). There's also the sample lost status and sample rejected status in DDS, that can be used for this. We already have bindings for the first one (this).
This is a good question, because I actually don't know if the "publication_sequence_number" provided by FastDDS has the same guarantees that the one provided by Connext. |
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.
lgtm in general.
Do we need a method to check if this feature is supported separate from the max value? I'm just thinking that it might be useful for a tool to know if this is supported before receiving a message (or even creating a publisher/subscription).
Oh right, that's a great point.
Unless I'm mistaken, I don't think the source timestamp is made available to ROS 2 (
This makes sense! It's similar to what I'm doing.
I'm wondering what downstream users of |
Ah yes, it's only available in the subscription side at the moment (and supported only by some rmw implementations). |
IMO, the requisites should be:
I think it's reasonable to always expect that from any rmw implementation that support sequence numbers, so we can maybe add that to the docs. Similarly for the reception sequence number, it should be a monotonically increasing number, contiguous take() operations differ always by 1. |
That sounds okay to me. bool rmw_message_info_publication_sequence_number_supported(void);
bool rmw_message_info_subscription_sequence_number_supported(void); can easily become too verbose if we start adding similar functions for other features (e.g. is Maybe: bool rmw_feature_supported(rmw_feature_t feature_v);
typedef enum rmw_feature_e {
RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER,
...
} rmw_feature_t; is a better idea. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: William Woodall <[email protected]>
…mpilation issue Signed-off-by: Ivan Santiago Paunovic <[email protected]>
…quence number Signed-off-by: Ivan Santiago Paunovic <[email protected]>
I have listed some requirements of what clients can expect in 7810f90. Please feel free to suggest improvements to my wording as well! |
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.
The requirements make sense to me.
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]> Signed-off-by: Ivan Santiago Paunovic <[email protected]>
c766c00
to
595bc6b
Compare
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
The |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
This PR and ros2/rmw_fastrtps#587 are ready, I still need to update ros2/rmw_connextdds#74 and create a PR in rmw_cyclonedds. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[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.
Other than that one open discussion, it lgtm.
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[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.
Other than a doc update, lgtm with CI.
I offered a revision of the docs again, and it brings to my attention that we need to nail down what we mean by gid
and "global(ly)", but that shouldn't block this I think.
We could use:
- GID (Global Identifier): what we use now, where global means per process, but could mean in the ROS graph
- GUID (Globally Unique Identifier): means the same as GID except each is unique and should never be reused withing the scope of "global"
- UUID (universally unique identifier): unique in the literal universe, within statistical bounds, which is what the general purpose uuid's are used for CS and usually require as "good" as is possible random numbers
Anyway, we need to figure out what we need/want and be clearer about it, again not blocking this pr.
@ivanpauno you might want to update the content of the issue description (now that we've iterated a bit) and link to all the related prs, rather than relying on cross-references from github. |
I think that the idea of the gid was always for it to be global and unique. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Done |
All PRs were approved and CI is passing, going in! |
rmw_message_info_t
.rmw_feature_supported()
function, to query if the rmw implementation being used supports a feature.Related PRs:
This information is not provided by all DDS vendors.
Both sequence numbers are an extension, and not specified by the DDS standard AFAIU.
Connext provides both numbers, see
publication_sequence_number
andreception_sequence_number
here.FastDDS provides the
publication_sequence_number
, but not thereception_sequence_number
.See here and here (docs aren't super clear, but based on some testing that's the publication sequence number).
CycloneDDS doesn't seem to provide any of both (see here).