Conversation
6a16d7f to
ff8c8f9
Compare
|
I took advantage of modifying this to homogenize the cmake to match our other interface packages. |
|
Hmm, so looking at this. I think the ParameterEventDescriptor is now deprecated since we implemented the Parameter which includes "type" and has "PARAMETER_NOT_SET" support for the events they just use the Parameter in the deletion too. And the descriptors are not published in an event stream I think it might make sense to clear out that message. The other places that it might make sense to include this header is the ListParameterResult.msg Though that may be considered redundant as that's usually just inside the srv response. |
oh good point, I didnt have all the context here. My understanding based on the description from the readme:
was that we'd like to keep this around to allow users to publish only descriptors event rather than the full parameter event when they happen to use very long parameters (e.g. a robot description or a massive binary blob)
I'm not sure what the last part of this sentence means. Do you mean we could add a header in the service Response message rather than the message itself? or that this information is already provided with the current service definition? |
I'd forgotten about that design use case. It looks like that never got implemented. This could be quite valuable for light weight introspection too where a GUI could subscribe to the stream of event descriptors and then only query for a filtered set. Then we should leave this as is and probably ticket or TODO adding that topic publishing
The only place that this is used is in the service. https://github.com/ros2/rcl_interfaces/blob/master/rcl_interfaces/srv/ListParameters.srv#L11 which is already inherently one to one and known. However if that return value is ever stored, having the node name and timestamp would be valuable to be included in the content. Although it's only expected to be used in the service, we shouldn't cut corners assuming it will never be reused elsewhere. |
I was considering adding this publication to the prototype c implementation. If I dont get around doing it this cycle I'll ticket it for later.
Yeah I see your point. I think I'll add it only to these 2 for now as we have a concrete need for them. I'll open an issue to consider providing more information in more messages (ListParameters message included) as it could be handy to also add it to the requests messages to provide a "sender name" that could be then used to populate the Event messages with information about which node triggered the parameter change |
|
issue created. I believe this is ready for review. |
For inspiration: |
| # It was an atomic update. | ||
| # A specific parameter name can only be in one of the three sets. | ||
|
|
||
| RclHeader header |
There was a problem hiding this comment.
I would suggest using rcl_header here so as not to be confused with Header header.
rcl_interfaces/msg/RclHeader.msg
Outdated
| @@ -0,0 +1,5 @@ | |||
| builtin_interfaces/Time stamp | |||
| # A fully qualified ROS node name | |||
| string sender_node_name | |||
There was a problem hiding this comment.
I think you could just simplify it to node_name or juse node.
you're going to be addressing it as
msg.(rcl_)header.stamp and msg.(rcl_)header.node
Other suggestions are source or authority but I think this is just saying what node at what time so node and stamp seem best. The name is implicit.
rcl_interfaces/msg/RclHeader.msg
Outdated
| # A fully qualified ROS node name | ||
| string sender_node_name | ||
|
|
||
| # TODO(mikaelarguedas) consider a receiver node name as well |
There was a problem hiding this comment.
The reciever/requester does not change the interpretation of the data thus I would advocate not to include that.
There was a problem hiding this comment.
Yeah, The use case I was trying to cover here (but am focused on parameter events right now so there may be others) is that it would be pretty convenient to know what node triggered a parameter change. But that seems to be very parameter event specific and may not belong in a more generic rcl header used by other messages.
Though it could be added in the ParameterEvent and ParameterEventDescriptor messages.
There was a problem hiding this comment.
Yeah, I think that sort of information would make sense to embed in those two messages directly not in the generic header.
|
thanks @dhood and @tfoote for the feedback on the field name. |
aa8f7b4 to
c5bad79
Compare
|
|
||
| RclHeader header | ||
| # Name of the node that requested the parameter change | ||
| string node_req |
There was a problem hiding this comment.
We shouldn't use an abbreviation here for clarity. I'd suggest request_origin. At some level I want to use 'authority' but I think that starts to conflict with security terminology.
|
I am not sure that embedding the node name into these messages is a good path forward. Arguable this information could be useful for any kind of message when an introspection tool want't to know e.g. where it comes from. I would prefer if this kind of information is passed "out-of-band". E.g. a subscriber callback could have a |
|
The node name is an integral part of the Parameter Event information. If I give you a parameter event it cannot be interpreted without knowing the originating node. And although we have mechanisms to to capture the origin of a message out of band, that is not robust to aggregation, forwarding, throttling, muxing or any other storage/playback mechanism where the event is no longer directly published by the node. |
I could be convinced to explicitly embed the node name which stores the parameter in the event message (though it doesn't address the case where the node name isn't unique). But how about the |
|
The time stamp seems to be valuable information for monitoring, aggregation and replay as well as debugging. There is no guarantee that the messages are arriving in order and code processing these events should have a way to know what the "last parameter change" was rather than assuming the last received is the latest one. |
|
I simply don't believe that embedding those information into every message like this is the right way to support these debugging cases. Arguably the same argument applies to each an every ROS message being exchanged and I doubt that we want to add this to every message definition. |
I disagree, in the current ROS 2 design and demos there is no "topic on which every node should publish updates" except this one. That makes it in my opinion the only topic that needs to provide this kind of "request_origin" information. |
|
Sorry, I'm a little late to the party, but I have some comments. Re: the new message I'm not a huge fan of the name I'm also not convinced we need a new message for this. We could just put a field for the stamp and the origin node in each of those two messages. I don't completely follow @tfoote's logic about adding this information to the other services, perhaps it would be useful, but it's not clear to me that it is. So combining these two fields into a separate message right now seems like we're getting ahead of ourselves. But I could be wrong about that. Re: originating node name in the event messages For messages (sent over topics), I think the "out of band" communication of the sending node's name is useful (mentioned by @dirk-thomas ), but can be lost in relaying and during playback from a bag file, unless we find a way to make a rosbag playback look like the original node is sending it, but I'm not convinced that's a good thing to do. It might be useful to know that the message is coming from rosbag and not something else or that the source of data is from two places and not one (in the case rosbag recorded from two publishers but only uses one on playback). Imagine the practical case that you've recorded the Anyways, there's enough questions around that for me to believe that putting the source node's name in the event message makes sense. Also as @mikaelarguedas mentioned, it's possible but more inconvenient in this case since everyone is publishing to the same topic. Add to that, it is not currently possible to know which node sent a message (you can know which publisher by guid, but not which node), and it's clear to me (at least for the near term) that adding the node name to the message is a decent idea. Re: timestamp for event in messages It should be possible to get the "sent time" as well as the "received time" from the middleware for any given message instance (at least DDS already tracks that information in the sample info I think), but we don't have that in our API right now. Also, it has the same issues with relayed topics and rosbag playback. So if we need the time stamp, it would mean we need to communicate it in the message. So then, do we need the time stamp? I think we do, for the reason that @mikaelarguedas suggested (event messages come out of order and we could use the timestamp to detect that in a tool). Now, we could also detect that with a sequence id, which we removed from the For both this and the originating node name fields, I think it makes since for this particular message, but does not automatically extend to being equally needed/useful for all messages as @dirk-thomas suggested in #27 (comment) Re: request_origin Unlike the other two fields in question, this one cannot be provided by the middleware. So if we need it, then we have to include it in the message. However, for this one I'm not 100% convinced it is required. It might be just a good to put this information in the console logs, given that I don't think it will be used that often. |
|
I've been working with the navigation2 stack, particularly with dynamic changes to parameters in the past few weeks. In the nav2_dynamic_params package, I've created a class to handle dynamic parameter updates, in a fashion suitable to replace previous calls to DynamicReconfigure. One of the main concerns recently has been resolving the source node of the parameter event. I've highlighted some of these concerns in an issue on our repo #286 and with limited fixes in PR #298. It seems to me that this PR, adding a header with node source name, would resolve many of the issues, even duplicate parameter names under different nodes, enabling more robust handling of parameters in our dynamic parameter client model. What is the current status of this PR and discussion? It seems to address some of the refactor notes in #27. Our team would like to help this issue move forward soon and be merged, if possible. |
|
I think everything I said in my last comment still applies: #27 (comment)
So my proposal (based on my opinion) is that we should decline this pr and add the "origin node name" and "event timestamp" to the parameter event message directly. My secondary proposal would be to select a different name for the message, updating this pr, and then use that in the parameter event message. But this is again, just my opinion. This is not a dictatorship, but unfortunately it's also not a voting system, so we just have to seek consensus. So maybe the first step is to poke people to keep the discussion going until a proposal is accepted. |
|
Feel free to do so as a way to motivate participation in the conversation (or to have a patch testers can try locally), but personally I'd like to get some feedback from others on this thread before committing too much effort. Specifically it would be good to hear from @tfoote and @dirk-thomas. |
This sounds like a good approach. The parameter events are node specific so embedding that is required to fully describe the event. (If there are two laser nodes it's important to know upon which one the parameters were changed. This is different than who is telling you the parameter changed.). And I don't think that this header has more general use cases as generally with the anonymous publish/subscribe data centric model the publisher is not considered part of the model. Trying for that level of generalization I think is adding complexity without a benefit of a simpler system. I'd also suggest leaving out the request_origin since that's also breaking the abstraction. |
|
Should this be closed with #51? |
|
Given the age of this PR and the fact that we got at least part of it in in #51, I'm going to go ahead and close it. Feel free to reopen if you are going to pursue it further in the future. |
Defines a new rcl message including a string for a node fully qualified name and a timestamp: e57980f
And use this new massage as a header for ParameterEvent and ParameterEventDescriptor messages: 6a16d7f
I'm open to feedback regarding the content of the message (fields, field names or message name).
This includes the commits of #26 but they should be merged soon