ROS2 Force a single publisher for a topic (observer/publisher?) [closed]

asked 2022-01-05 16:43:49 -0500

variable gravatar image

updated 2022-01-06 10:25:33 -0500

I am looking to start implementing a ROS2 project but have concerns about the general topology of publish/subscribe for topics. With the PX4 autopilot stack I ran into similar issues where multiple modules could be changing a single topic at different times which made tracing a bug very difficult.

Is there any mechanism in ROS2 where I can limit a topic to only having a single publisher node?

Edit: Found this: https://answers.ros.org/question/3715...

Has anyone come up with good ways to prevent multiple publishers of a topic?

Edit2: It seems I may be wanting to use an publisher-observer model as described in this article: https://hackernoon.com/observer-vs-pu.... I want to be able to publish some topics using the DDS broker, but some critical data I want to only use the observer/publisher method and directly notify the observer node.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Geoff
close date 2022-01-05 17:35:03.301449