-
Notifications
You must be signed in to change notification settings - Fork 69
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
Introduce RMW_DURATION_INFINITE constant and API return value promise #301
Introduce RMW_DURATION_INFINITE constant and API return value promise #301
Conversation
@jacobperron @clalancette @mm318 @hidmic @fujitatomoya @Barry-Xu-2018 Hey all, as participants in the #210 discussion, I would like your feedback on this. See discussion on #298 for why I'm not addressing #215 here. I've only performed one RMW implementation update, to show the pattern, without doing too much extra work. After going too far on other iterations of this feature, I wanted to wait until we have some consensus on the API before opening more update PRs. |
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.
If a user inputs RMW_DURATION_INFINITE for Deadline, Lifespan, or Liveliness Lease Duration QoS policy values, this should be interpreted in the same way that {0, 0} (RMW_QOS_DURATION_UNSPECIFIED) has historically been interpreted.
I think we can improve the documentation around this point. The current documentation implies that a zero value means the policies are ignored (ie. not enforced), but digging through the various implementations it looks like a zero value causes the RMW's default value to be used instead, which happens to be "infinity" in most cases. The current documentation seems misleading, since really the policies are being enforced (albeit with very large values). Also, it isn't clear to me if the RMW default value might be changed via a vendor-specific configuration (then I think all bets are off).
Having an explicit INFINITE value in rmw makes sense to me. But I'm not sure if the behavior should be the same as a "default" value, considering the "default" value might be configured with a vendor config.
This discussion relates to another one we're having about QoS compatibility, see ros2/rmw_dds_common#45 (comment)
Signed-off-by: Emerson Knapp <[email protected]>
5e06b81
to
42f1784
Compare
@jacobperron @hidmic @fujitatomoya Thanks for the feedback - I've pushed a new version that I hope addresses all concerns:
|
d71e386
to
ab0950d
Compare
* Add new time.h/c * Update documentation to distinguish between unspecified/infinite * Add overflow/bounds checking for time utils Signed-off-by: Emerson Knapp <[email protected]>
ab0950d
to
403e385
Compare
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
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 pending green CI
Signed-off-by: Emerson Knapp <[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.
LGTM
Signed-off-by: Emerson Knapp <[email protected]>
@jacobperron looks all good except the |
@emersonknapp Looks like this is the related issue: ros2/rmw_connext#472 I think it's okay to not block on the |
Sounds good to me! Note: I don't have merge access here so a maintainer will need to merge |
@jacobperron @hidmic friendly ping: can you merge this or direct it to the person who can? |
Thanks for the bump @emersonknapp. Merging. |
Resolves #210
Alternative to #255
Introduce a new constant,
RMW_DURATION_INFINITE
. Specify inget_topic_endpoint_info
that it is expected to be returned to represent infinite durations. Add some helper functions that enable better usage of this new value.This change is non-breaking, all RMW implementations will continue to work correctly as-is. However, there are two expectations that they must eventually implement:
get_topic_endpoint_info
, RMW impementations must intercept their own internall-defined "infinity" definitions and replace those values with RMW_DURATION_INFINITE, so that they can be understood correctly.Today, I will not be changing the default qos_profile values to RMW_DURATION_INFINITY, as this would break existing implementations that do not know how to handle this value correctly. I would like to create a "value deprecation" so that this default value could be switched over in time for H-Turtle, but I'm not sure how this should be done.
Dependent (but not linked, can be merged after) PRs: