
Why
?
Are there alternatives to MADS?
Sure there are! ROS2 is a very popular framework for robotics, and it has a lot of features that MADS does not have. However, ROS2 is not as lightweight as MADS. If you need a full-fledged robotics framework, ROS2 is a great choice. If you need a lightweight framework, MADS has some advantages over ROS2. Of course, advantages come to a cost, and MADS is not as feature-rich (nor it is as mature) as ROS2.
We’ll see here the main differences between MADS and ROS2.
Advantages over ROS2
MADS is lightweight and easier
MADS installers weight about 8 Mb (twice as much for MacOS dual architecture installer), and they have minimal dependencies on most platforms. By comparison, ROS2 installers are about 750 Mb. Installing and configuring a ROS2 workspace is a complex task, while MADS can be installed in a few seconds and it is ready to use.
If you know what you are doing, you can be up and running in a simple data collection MADS network in about one hour.
What really makes the difference, though, is the learning curve:
While ROS/ROS2 is a complex framework that requires a lot of time to grasp and master, MADS is a simple framework that can be learned in a few hours. The learning curve is much more gentle, and you can start using MADS for your projects in a very short time.
At the same time, ROS2 is much more mature and feature rich: there is a lot of pre-existing code, libraries, and tools that you can use to build your robotics applications. MADS is not as mature, and it does not have as many features, but it is lightweight and easy to use.
The plugin architecture of MADS allow to extend the framework with minimum knowledge and an API that virtually consists in no more than 5 methods. If performance is not critical, MADS agents can be written in Python.
MADS is less platform-sensitive than ROS/ROS2
ROS and ROS2 are typically not as easy to install and configure, and their reference platform is Ubuntu Linux. It is much more difficult to run ROS2 on Windows (without virtualization), almost impossible on MacOS, and it’s difficult on small systems as Raspberry Pi. MADS, on the other hand, is designed to be lightweight and easy to install on any platform, including Windows, MacOS, Linux, and small systems like Raspberry Pi.
On any system that is not supported by official installer, and that has a C++17 compiler (preferably clang), CMake, and git, MADS can be compiled in minutes / tens of minutes from source.
MADS is more adaptable
Being the MADS codebase smaller and simpler, it is also easier to adapt it and extend it to your needs. If you need a specific feature that is not available in MADS, you can easily implement it by yourself. The MADS community is small but growing, and we are always happy to help.
MADS relies on ZeroMQ
MADS uses ZeroMQ as its communication layer, which is a lightweight and efficient messaging library. ZeroMQ is designed to be fast and scalable, and it is used by many other projects.
With respect to networking middleware used by ROS2 (DDS), ZeroMQ id much more flexible and can be adapted to different use cases and network topologies.
Disadvantages over ROS2
Real-time
If you need hard real-time, MADS is probably not yet ready and will suffer of the lack of determinism of a TCP-based communication layer. But if a jitter in the range of milliseconds is acceptable, MADS can be used in real-time applications, preferably using PREEMPT-RT Linux kernels.
Data serialization
MADS uses compressed JSON for data serialization. This choice has the advantage of being human-readable, easy to debug, and really flexible when it comes to adapting the data scheme to different choices taken during the development. On the other hand, serialization/deserialization is not extremely efficient and the used bandwidth is sub-optimal.
On the other hand, MADS supports binary attachments to any message: so if JSON-based communication performance is not enough, you can use a minimum JSON data packet with a binary attachment that encodes data in a more efficient way (e.g. by using protobufs or Cap’n’Proto).