Atlas Robotics
AMR / AGV OverviewIntermediate

AMR architecture: 5 layers from hardware to applications

Atlasbot · 22/8/2026 · 11 min read

AMR architecture: 5 layers from hardware to applications
Layered architecture of a complete AMR

Looking at the code of a real AMR for the first time, it's easy to be overwhelmed by the number of packages, nodes, and abstraction layers overlapping each other. But overall, AMR software architecture almost always follows exactly a layered model — understanding this model before reading the specific code helps a lot with orientation.

Key concepts

Five levels from low to high, each level has clear responsibilities:

  • Hardware Layer — physical hardware: motor, encoder, LiDAR, camera, IMU, MCU/MPU boards
  • Driver Layer — hardware direct read/write code, converts raw data (encoder signal, UART bytes) into ROS2 standard message
  • ROS2 Layer — communication infrastructure (node, topic, service) that connects all software components together
  • Navigation + Localization — Nav2, AMCL/SLAM — "brain" decides where the robot goes, where it is
  • Application Layer — top-level business logic: task coordination, user interface, fleet management

In short: Each layer should only communicate with the adjacent layer — Application should not "leap" to direct control of Hardware, but must go through the correct chain of Navigation → ROS2 → Driver → Hardware. Violation of this principle makes the system difficult to maintain and difficult to replace individual parts.

How it works

Data flows in two opposite directions through 5 layers:

Sensor data dimension (bottom-up):
Hardware (LiDAR scanning) → Driver (parse to LaserScan) → ROS2 (/scan topic)
    → Navigation (AMCL used for localization) → Application (displays robot status)

Direction of control command (top-down):
Application ("go to point B") → Navigation (Nav2 calculates path + velocity)
    → ROS2 (/cmd_vel topic) → Driver (converted to PWM) → Hardware (rotating motor)

The boundaries between layers often coincide with the actual hardware boundaries — Hardware/Driver Layer runs on MCU (needs real time), ROS2/Navigation/Application Layer runs on MPU (needs computing power).

Technical details

Formulas

The total delay of a command going from Application down to when the motor actually reacts is total delay of each stage combined:

Total_delay = Δt_Application + Δt_Navigation + Δt_ROS2 + Δt_Driver + Δt_Hardware

For example: Application ~10ms, Nav2 calculates path ~50ms, ROS2 transmits message ~5ms,
    Driver processing ~2ms, physical motor response ~20ms
Total_delay ≈ 10+50+5+2+20 = 87ms

Which layer is the slowest determines the overall response frequency limit of the system — this is why Navigation (the most computationally intensive layer) is often the main "bottleneck" when it comes to improving robot responsiveness.

Parameters

FloorRun onReal-time requests
Hardware + DriverMCU (STM32/Arduino/ESP32)Mandatory, low/deterministic latency
ROS2 + Navigation + ApplicationMPU (Jetson/Raspberry Pi)More flexible, prioritizing computing power

Practical applications

In the actual architecture of the Atlas A2 project, Hardware and Driver Layer run on ESP32/STM32 (read encoder, control motor, process real-time emergency stop signals), while ROS2, Navigation, and Application Layer run on Jetson Orin Nano (enough power for Nav2, AMCL, and vision AI processing). This clean separation isn't just a nice design choice in theory — it's a true reflection of real physical limitations: the MCU isn't powerful enough to run ROS2/Nav2, and the MPU running full Ubuntu doesn't guarantee the deterministic latency needed by the safety loop/motor.

Practical example

Trace a command "go to point (5, 3)" through all 5 floors:

1. Application: user presses the button on the app, sends goal (5,3) to the system
2. Navigation: Nav2 receives goal, AMCL confirms current position, planner calculates path
3. ROS2: controller_server publishes velocity (v, ω) to /cmd_vel every cycle
4. Driver: motor driver node subscribes to /cmd_vel, calculates PWM for each wheel
5. Hardware: the motor receives PWM, actually rotates, the robot starts moving

At the same time, encoder data flows REVERSE from Hardware to Application
to update the location displayed on the user interface in real time

All five of these steps happen continuously, repeating many times per second — not "one-and-done" but a system-wide Sense-Think-Act loop.

Common mistakes

  • The high-level layer "leapfrogs" down to direct control of the hardware — For example, the Application code directly calls the motor driver, bypassing Navigation/ROS2 — breaking modularity, making replacing/upgrading each independent layer much more difficult.
  • Putting real-time logic at the wrong layer — running the high-frequency control loop motor on the MPU (via ROS2, with unknown network/schedule latency) instead of on the MCU — violates the "fast loop located close to the hardware" principle learned in Sense-Think-Act.
  • Driver Layer contains complex business logic — Driver Layer should only "translate" raw data into standard messages, should not contain complex logic decisions (eg path planning) - mistaking the roles of each layer makes the code difficult to maintain and test independently.
  • Do not consider the cumulative delay across multiple layers when designing a safety ring — as calculated in the Formula section, the total cumulative delay across 5 layers can be much larger than the delay of 1 layer alone — the emergency stop should always bypass all 5 software layers, processing directly at the lowest hardware/MCU layer.

Conclusion

The 5-layer architecture (Hardware → Driver → ROS2 → Navigation → Application) is the common model of most practical AMRs, with the MCU/MPU boundary often coinciding with the Driver/ROS2 Layer boundary. Correctly understanding the responsibilities of each layer helps to quickly localize the problem when debugging, and avoid violating the layering principle when expanding the system. The AMR Software Architecture section will delve into each specific layer. The next article in the AMR/AGV Overview category talks about AMR types — classified by wheel configuration and purpose of use.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

AMR architecture: 5 layers from hardware to applications — Atlas Robotics