What is a high-performance publisher-subcriber protocol to make devices in a robotic cell communicate?

Thanks to @casper

High-performance publisher-subcriber protocol to make devices in a robotic cell communicate:

Pub Sub:
ZeroMQ communicatie protocol: http://zeromq.org/

Object transfer:
Google protobuf serialisatie: Protocol Buffers Documentation

@Casper I’ve been reading a bit about ZeroMQ.

However, I now wonder what communication you used it for. There seem to be no protocol implementations for hardware like a Universal Robot and a Siemens PLC.

Would you be as kind as describing here what hardware interfaces you had, how they were connected to each other and what protocols you used over these connections in your project?

Thanks!

Well we have used ZeroMQ mainly as a way of communicating easily between different programs, it doesn’t directly communicate with any hardware. our robot arm was operated in a standalone program from the rest of the machine.

The benefit is that normally the robot move functions would block the entire program, however by keeping the robot control in a standalone program the rest of the machine keeps operational while the robot arm moves.

I have created a small example program in which a webcam stream is opened and the robot arm keeps moving. see: https://github.com/cas2406/ZeroMQ-Demo

If you would like i could write some more use cases for zeromq, for example situations where a lot of visual processing has to be done which may not slow down the program or incombination with protobuf for example to show the ability to send data transfer objects.

It is also possible to stream video using zeromq, see: https://www.pyimagesearch.com/2019/04/15/live-video-streaming-over-network-with-opencv-and-imagezmq/

@thijs I have updated the readme file in the github repository to explain better why i have used zeromq. It does go a bit deeper in to the inner workings of python.
Any feedback or improvements are welcome.

@casper This is really great, I love it!

ZeroMQ makes the implementation so simple, means they’ve really found the right abstractions :slight_smile:

@Mathijs check this topic and Casper’s repo

@thijs @Mathijs
I have updated the readme to correct some mistakes, and try to better explain how the GIL works and what the multiprocessing library does.

1 Like