Handling large number of ROS2 publisher and subscribers

asked 2020-02-20 07:27:33 -0500

Hey all, I am trying to write a ROS2 bridge/interface for a simulator that speaks gRPC. This bridge consists of publishers that converts gRPC messages and publishes ROS2 messages, and subscribers that reads in ROS2 messages and converts to gRPC messages.

  1. Since the simulator might not know beforehand which topics that are being published are subscribed, I would like to publish all all the available topics from the simulator. If that is the case then there would messages being published with no subscribers. Where will these lonely published messages go, and is this a costly method, when larger sized messages like (HD camera images) are being published?
  2. How should the large number of publishers and subscribers be distributed among the nodes? One solution I have in mind is to assign all the publishers to one node and the subscribers to another node. Is there a limit to the number of subscriber and publishers I can assign to a node? Will this be a good idea and what would the potential issues I will be running into? If not how would you suggest organizing these subscribers and publishers?

Thank you all in advance!

edit retag flag offensive close merge delete