Do unsubscribed topics cause network traffic?
Hello, I'm trying to restrict some nodes to only publish their topics on localhost to minimize network traffic. Is this maybe possible using https://github.com/ros2/launch ? Thank you.
Just to clarify: as in ROS 1, if there are no subscribers, no data is sent across the network.
Are you worried about unsubscribed topics using bandwidth?
I do have multiple vehicles in one network. But to minimize network traffic I want to publish topics which are only relevant for the inner-vehicle communcation on localhost.
I'm not sure I've made myself clear: if there are no subscribers off-vehicle, no traffic will be generated.
ROS 2 / DDS publishing is not broadcast, pub-sub connections must be explicitly created (unless otherwise configured).
Or are you actually asking how to prevent off-vehicle subscribers from subscribing to certain topics?
Okay, that sounds good I wasn't aware of that. My approach to prevent off-vehicle subscribers consists of adding a uniqe namespace to the inner-vehicle topics. Is there another way?
so was "do unsubscribed topics cause network traffic?" your actual question?
If so: please update the title of your post here so we avoid the xy-problem.