Research Robots Applications Industries Technology Contact
← Back to Technology
Robotics Core

MQTT Protocol

The lightweight messaging standard powering modern autonomous fleets. MQTT enables reliable, real-time communication between AGVs and fleet management systems, ensuring seamless operations even in low-bandwidth industrial environments.

MQTT Protocol AGV

Core Concepts

Publish/Subscribe

Unlike REST API, robots don't talk directly to each other. They publish data to a broker and subscribe to topics they need, decoupling the fleet architecture.

The Broker

The central traffic controller. It receives all messages from AGVs (publishers) and filters/distributes them to the correct systems (subscribers) efficiently.

Topics

Data is organized in a hierarchy (e.g., `factory/robot-1/battery`). This structure allows granular control over which robot listens to which command.

Quality of Service (QoS)

Defines message reliability. From "fire and forget" (QoS 0) to "exactly once" delivery (QoS 2), ensuring critical safety commands are never lost.

Retained Messages

The broker stores the last "good" value. When an AGV wakes up or reconnects, it immediately receives the current state of the fleet.

Last Will & Testament

A safety feature. If a robot disconnects unexpectedly (e.g., battery failure), the broker publishes a pre-set "offline" message to alert the fleet manager.

How It Works

In a typical mobile robotics implementation, the AGV acts as an MQTT Client. It continuously streams telemetry data—such as coordinates, battery voltage, and sensor status—by publishing to specific topics on the MQTT Broker.

The Fleet Management System (FMS) is also a client subscribed to these topics. It processes the incoming data to visualize the fleet's position. When the FMS needs to send a mission, it publishes a JSON payload to a command topic (e.g., `robot-1/cmd/move`) which the specific robot is subscribed to.

This bi-directional flow is incredibly efficient. The protocol header is only 2 bytes, meaning network overhead is minimal, preserving Wi-Fi bandwidth for other critical systems and reducing battery drain on the mobile robots.

Technical Diagram

Real-World Applications

Traffic Management

In high-density warehouses, VDA 5050 standards use MQTT to coordinate intersections. Robots report positions, and the central controller grants permission to enter zones, preventing collisions.

Remote Diagnostics

Engineers can subscribe to error topics (`robot/+/error`) to instantly receive logs when a motor overheats or LiDAR is obstructed, allowing for predictive maintenance without stopping the line.

Battery & Charging Optimization

AMRs publish State of Charge (SoC) every few seconds. The fleet manager monitors this via MQTT and automatically dispatches robots to charging stations when levels drop below a threshold.

Task Allocation

ERP systems integrate with the MQTT broker. When an order comes in, a task is published. Idle robots subscribed to the `tasks/pending` topic can bid on or accept the job instantly.

Frequently Asked Questions

Why should I use MQTT instead of HTTP for robots?

MQTT is designed for unstable networks and low bandwidth, maintaining a persistent connection that is much faster than opening a new HTTP request for every sensor update. It also has a much smaller code footprint and reduced header size, making it ideal for battery-powered AGVs.

What is VDA 5050 and how does it relate to MQTT?

VDA 5050 is a standard interface for communication between AGVs and master controls. It specifically mandates the use of MQTT as the transport protocol, defining a standardized JSON structure for topics like "order," "state," and "visualization" so robots from different vendors can work together.

How does MQTT handle network disconnects in warehouses?

MQTT uses a "Persistent Session" feature. If a robot drives into a WiFi dead zone, the Broker queues messages sent to it. When the robot reconnects, it automatically receives all missed commands, ensuring no instructions are lost during temporary outages.

What QoS level should I use for robotic navigation commands?

For critical commands like "Stop" or specific mission coordinates, QoS 1 (At least once) or QoS 2 (Exactly once) is recommended to ensure delivery. For high-frequency telemetry like battery voltage or generic position updates, QoS 0 (At most once) is usually sufficient and reduces network load.

Is MQTT secure for industrial environments?

Yes, MQTT supports TLS/SSL encryption for data in transit, ensuring that commands cannot be intercepted or spoofed. Additionally, brokers support username/password authentication and Access Control Lists (ACLs) to restrict which robots can publish or subscribe to specific topics.

How many robots can a single MQTT broker handle?

Enterprise-grade brokers (like HiveMQ or Mosquitto Pro) can handle millions of concurrent connections. For a typical warehouse with hundreds or even thousands of AGVs, a single well-configured broker is more than capable of handling the traffic load with low latency.

What is the "Keep Alive" interval?

The Keep Alive is a time interval (in seconds) that the client communicates to the broker. If the broker doesn't receive a message or a PINGREQ within 1.5 times this interval, it assumes the robot has disconnected and may trigger the Last Will and Testament message.

How do I organize Topic Hierarchies for a fleet?

A best practice is `location/device_type/device_id/function`. For example: `warehouse_1/forklifts/agv_55/battery`. This allows you to subscribe to `warehouse_1/+/+/battery` to monitor energy levels across the entire facility easily.

Can I send images or video over MQTT?

Technically yes, but it is not recommended. MQTT is optimized for small control packets (under 256MB limit, but usually KB). For video streams or large LIDAR maps, it is better to use MQTT to send a URL/link, and handle the heavy data transfer via HTTP or RTSP.

What happens if the Broker crashes?

If the broker fails, communication stops. This is why production environments use Clustered Brokers for high availability. If one node fails, the robots automatically connect to another node in the cluster without losing state or data.

Is ROS (Robot Operating System) compatible with MQTT?

Yes, widely used bridges like `mqtt_bridge` allow ROS topics to be published to an MQTT broker and vice versa. This effectively connects the internal ROS network of the robot to the external IT infrastructure of the factory.

Ready to implement MQTT Protocol in your fleet?

Explore Our Robots