pedro/projects/futebol-de-robos
Robot soccer over MQTT
Student research at CEFET-MG: communication between ESP8266 modules comparing MQTT and CoAP, with robot soccer and robot swarms in mind.
Context
During the Computer Networks technical program at CEFET-MG, I joined a research project under the school's scientific initiation program with Bárbara and João Lucas, advised by Prof. Sandro Renato Dias. The official title was a long one: "Projeto de implementação de protocolo de comunicação entre módulos NodeMCU ESP8266 visando o futebol de robôs" ("Implementation of a communication protocol between NodeMCU ESP8266 modules for robot soccer").
The work was presented at the "19º Encontro de Avaliação do Programa Institucional de Iniciação Científica" ("19th Evaluation Meeting of the Institutional Scientific Initiation Program"), during the 13th CEFET-MG Science & Technology Week, in the Exact and Earth Sciences area.
Problem
With the Internet of Things, getting small devices to talk to each other is no longer a minor detail. On a robot team, each player needs to exchange information with the others. The research question was a practical one: which protocol works best for that conversation?
Approach
We used NodeMCU modules, an open platform built around the ESP8266 microcontroller with built-in Wi-Fi, programmable in C and Lua. On them, we studied two communication models:
- MQTT, using the publish/subscribe model: an intermediary (the broker) receives the messages and distributes them to whoever subscribes to each topic;
- CoAP, using the request/response model, directly between the applications' endpoints.
The idea was to identify which of the two fits each practical application better, with robot soccer and robot swarms as the target, and to use what we learned to encourage robotics competitions.
Outcome and lessons learned
The work was published in the book of abstracts of the 13th S&T Week (ISSN 2178-4566) and received a presentation certificate at the Scientific Initiation Meeting.
It was also my first experience with MQTT. The same broker-and-topics model reappeared in Horta Inteligente and now runs in my homelab on Mosquitto.