ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are right that all topic listeners will receive all images. You will probably need to coordinate the consumers in a centralized way. So you'll need a centralized instance which makes sure each consumer knows which images he has to ignore. There are several ways in which such a centralized coordination can be achieved, depending on your exact setup and needs. E.g. is the number of consumers known beforehand and fixed, or does it change? Do you assume all consumers have the same processing time per image, or is that variable as well? Do you need the consumers to produce an ordered output of produced images, or are their work producets independent of each other?
Depending on such factors, your scheduling strategy needs to be adapted.
Note that you are free to create new topics for that purpose, and you can republish images if that's useful for you. So a central node could listen to the main topic and distribute images over individual topics. Or consumer nodes could be chained with topics, where each consumer either consumes the image, or publishes it to the next. Not saying either is a good solution for you, just making sure you see these possibilities as well.