ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I don't think you should bother about the ROS communication speed (ROS will not definitely not die for 20 or even 100 topic). I think you should go more into your system design and look what you need and then implement what you need. E. g. if you have 20 different msgs/ topics you will end up with 20 callback functions on your subscriber side. If you will need to aggregate all the information again of the 20 msgs on your subscriber side before you can start doing some real processing of the information then having 20 topic is probably a bad solution and leaving the information together and publishing one aggregated message would definitelzy be better.
On the other hand if you have on the subscriber side 20 different nodes of which all only need a small part of the information you publish and not your big aggregated information container, then yes well, in this case having 20 different msgs / topic could be a smart approach.