-
Notifications
You must be signed in to change notification settings - Fork 227
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
image_transport publisher nodes should support subscriber specific compression config #273
Comments
This is a pretty large and complicated issue. First, I'll mention that this is very similar to (though perhaps not exactly the same as) the work I did back in 2021 on negotiated topics/REP-2009. The idea there was that we wanted to have the publishers and subscribers "negotiate" to find the subset of topics that would satisfy all of the subscribers, while creating the least number of publishers. You want to create the least number of publishers because that means you end up redoing the compression (or whatever) the fewer number of times. The problem with negotiation, however, is that it ends up being very complex, and thus probably is only useful in certain situations. Still, I encourage you to read the work there as it informs my thinking here. One other preamble thing I'll mention here is that you have to think about the combination of Coming back to the original question, in my mind, the "workarounds" section you have above isn't actually a workaround; that is probably the most ROS-like way to do it. That is, you end up having a network that looks like:
The downside to this setup, of course, is performance. In particular, the This is my initial thought of the best way to do this. The whole concept of creating and destroying publishers on the fly in reaction to what subscribers want is possible, but is complicated and tricky to get right. And it makes the graph difficult to debug. So I'd avoid it unless we really find we can't do it another way. |
Linked PR : #275 |
Overview
Suppose there is a setup with one image transport publisher node, and one subscriber node, which uses the theora std to compress images. If we add a second subscriber using the theora std, it has to use the same config (bitrate, quality, etc) as the subscriber 1.
Workarounds for now
Right now, this can be implemented using republish nodes. We could the actual publisher node, then several republish nodes that publish the compressed topics with the required configs.
Implementation suggestions
The subscriber can make a service call to the publisher, requesting the config it needs. The publisher should spin up the required topic with the config, and reply with a boolean status. If the response is positive, the subscriber should start listening in on the new topic and the required config.
The publisher can then stop the new encoding if no subscriber is listening in on it.
Open to design suggestions @ahcorde @clalancette @mjcarroll
The text was updated successfully, but these errors were encountered: