-
Notifications
You must be signed in to change notification settings - Fork 91
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
Lifespan not working with transiet_local subscriber #473
Comments
https://github.com/ros2/rclpy/issues/1163 Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
That is supposed to mean you use i think, some rmw impelementation cannot show the actual QoS setting via there's been discussion on this, see more details for ros2/rclpy#849 (comment) this is the conversion function RTPS QoS to RMW QoS, describes above. besides, here is what i see. root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run prover_rclpy rclpy_1163_pub
...
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run prover_rclpy rclpy_1163_sub
...
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 topic info -v /some_topic
Type: std_msgs/msg/Bool
Publisher count: 1
Node name: pub_node
Node namespace: /
Topic type: std_msgs/msg/Bool
Topic type hash: RIHS01_feb91e995ff9ebd09c0cb3d2aed18b11077585839fb5db80193b62d74528f6c9
Endpoint type: PUBLISHER
GID: 01.0f.60.db.44.f7.83.bd.00.00.00.00.00.00.13.03
QoS profile:
Reliability: RELIABLE
History (Depth): UNKNOWN
Durability: TRANSIENT_LOCAL
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 1
Node name: sub_node
Node namespace: /
Topic type: std_msgs/msg/Bool
Topic type hash: RIHS01_feb91e995ff9ebd09c0cb3d2aed18b11077585839fb5db80193b62d74528f6c9
Endpoint type: SUBSCRIPTION
GID: 01.0f.60.db.18.f8.bd.4f.00.00.00.00.00.00.13.04
QoS profile:
Reliability: RELIABLE
History (Depth): UNKNOWN
Durability: TRANSIENT_LOCAL
Lifespan: 2000000000 nanoseconds
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
thanks, |
@fujitatomoya my bad, actually, I was using Cyclone DDS |
I'm going to move this over to the |
This is very closely related to eclipse-cyclonedds/cyclonedds#1835 This issue has an interesting difference with that one, though: the lifespan in DDS is spec'd to use the time of publication of the data (the "source timestamp") and so is probably never going to work in a useful way with transient-local data because the historical data would probably have expired long before it reached the reader. Therefore, simply adding a notion of lifespan to reader (as I noted as a possible way of addressing eclipse-cyclonedds/cyclonedds#1835) is not going to improve things here ... So how badly needed is it? If it is not really important, then a documentation update is a reasonable approach, else we need to figure out how to deal with it without breaking the spec entirely. |
IMO this should be fixed since the behavior should be the same independently of the DDS implementation. |
Are you sure that's what you mean? Because that's equivalent to saying the combination is not supported because it is impossible without using vendor-specific extensions to the DDS specification. |
I mean that it is very confusing that it behaves differently without any warning because the user would expect the same behavior. I think the feature is also a reasonable one since lifespan is an important part of the QoS specs |
Bug report
When subscribing to a
transient_local
published topic and using the Lifespan parameter, it seems that it doesn't have any effect on the subscriber's side. That means the callback of the subscriber is always called with the message ignoring the Lifespan parameter you use.Required Info:
Steps to reproduce issue
To reproduce the issue we have 2 nodes: one that publishes to
/some_topic
withtransient_local
and infinite lifespan QoS and the other node that subscribes to that topic also withtransient_local
QoS but with a lifespan of 2 seconds.Run this publisher node in one Terminal
Then run the subscriber node in another terminal
Expected behavior
Because of the lifespan of 2 seconds, the callback shouldn't be triggered if the node is launched after 2 seconds of the publisher node
Actual behavior
The callback is always triggered
Additional information
In the subscriber node, I printed the QoS object to check the properties. I got this:
But when checking the info with
ros2 topic info /some_topic --verbose
I got:which says the Lifespan is Infinite. Somehow the QoS is not being set correctly (?)
The text was updated successfully, but these errors were encountered: