[Discourse.ros.org] [ROS Projects] [Experimental] UDP Broadcast transport layer
I made a proof of concept, meaning still experimental, of the **UDP Broadcast transport layer** and how it could work.
The final aim is to make a multimaster implementation with UDP Broadcast to avoid WiFi struggle.
I would like some advice of what is wrong and how to improve.
1. Topic negotiation - Both the Subscriber/Publisher uses a TCP service to get the publishing port from the `organizer.py`
2. Publisher serialize the packets into a Msg message then broadcast the packets to the port given by the organizer.
3. The subscriber binds to the port, deserialize packets and either send it to the callback or publish it on the local master
* Not secure (publisher ip not checked, not crypted)
* 64k maximum packet size (from IP protocol), tested only for non fragmented packets of less than 1k
* ROS Indigo
* Python 2.7
from multimaster_udp.transport import UDPSubscriber
from std_msgs.msg import String
def callback(data, topic):
counter += 1
print data, "\n received",counter, "UDP messages from \n", topic
counter = 0
# if the callback is not defined (None), it will publish locally
# to the equivalent topic.
sub = UDPSubscriber("hello", String, callback=None)