# zemorobotics/zemo_ros architecture

> Architecture diagram of the GitHub repository zemorobotics/zemo_ros, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zemorobotics/zemo_ros
- Repository: https://github.com/zemorobotics/zemo_ros

## Overview

Zemo is a ROS 2 robot platform for Eurobot. Its user-facing workflow is to launch the robot, expose its model and hardware through ROS 2, then accept navigation or servo commands and drive the robot. The repository also contains hardware communication, custom Nav2 controllers and costmap support, and collision detection. The README documents these capabilities; source excerpts are partial, so several subsystem relationships are shown only where documented, and unverified wiring is omitted.

Main entry points: [`zemo_hardware/src/can_system/can_interface.cpp`](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/can_interface.cpp) (CAN interface), [`zemo_bringup/launch/robot_launch.py`](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_bringup/launch/robot_launch.py) (Robot launch), [`zemo_description/launch/robot_state_publisher_launch.py`](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_description/launch/robot_state_publisher_launch.py) (Robot description), [`zemo_navigation/src/collision_detector/collision_detector.cpp`](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/collision_detector/collision_detector.cpp) (Collision detector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Robot startup"]
  node_bringup["Robot launch<br/>[robot_launch.py]"]
  node_description["Robot description"]
end

subgraph group_hardware["Robot hardware"]
  node_can["CAN interface<br/>[can_interface.cpp]"]
  node_drive["Differential drive<br/>[diff_drive.cpp]"]
  node_actuator["Actuator board<br/>[actuator_board.cpp]"]
  node_ir["IR sensors<br/>[ir_sensor.cpp]"]
  node_cinch["CINCH<br/>[cinch.cpp]"]
  node_servo_interface["Servo hardware interface"]
  node_servo_protocols["Servo protocols"]
  node_waveshare["Waveshare drivers"]
end

subgraph group_navigation["Navigation"]
  node_nav_launch["Navigation launch"]
  node_move["Move action server<br/>[move.cpp]"]
  node_straight["Straight-line controller"]
  node_rotation["Rotation controller<br/>[rotation.cpp]"]
  node_arc["Circular-arc controller<br/>[circular_arc.cpp]"]
  node_obstacles["Obstacle costmap layer"]
  node_collision["Collision detector"]
  node_polygon["Dynamic polygons"]
end

subgraph group_control["Robot control"]
  node_ros2_control["ROS 2 control"]
  node_servo_controller["Servo controller"]
end

node_operator(("Robot operator"))
node_nav2["Nav2"]
node_lidar["Lidar"]
node_motion_board["Motion board"]

node_operator -->|"launches"| node_bringup
node_bringup -.->|"starts"| node_description
node_bringup -.->|"starts"| node_nav_launch
node_bringup -.->|"starts"| node_ros2_control
node_description -->|"defines connections"| node_ros2_control
node_description -->|"provides transforms"| node_nav2
node_description -->|"provides transforms"| node_ros2_control
node_ros2_control -.->|"uses hardware"| node_can
node_ros2_control -.->|"uses hardware"| node_servo_interface
node_can -->|"communicates"| node_drive
node_drive -->|"sends wheel speeds"| node_motion_board
node_can -.->|"communicates"| node_actuator
node_can -.->|"communicates"| node_ir
node_can -.->|"communicates"| node_cinch
node_servo_interface -->|"dispatches protocols"| node_servo_protocols
node_servo_protocols -->|"selects drivers"| node_waveshare
node_servo_controller -.->|"writes commands"| node_ros2_control
node_nav_launch -->|"configures"| node_nav2
node_nav2 -->|"uses controller"| node_straight
node_nav2 -->|"uses controller"| node_rotation
node_nav2 -->|"uses controller"| node_arc
node_nav2 -->|"loads costmap layer"| node_obstacles
node_operator -.->|"requests movement"| node_move
node_move -.->|"checks collisions"| node_collision
node_collision -->|"uses polygons"| node_polygon
node_collision -->|"checks sensor data"| node_lidar
node_collision -->|"checks sensor data"| node_ir

click node_bringup "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_bringup/launch/robot_launch.py"
click node_description "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_description/launch/robot_state_publisher_launch.py"
click node_can "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/can_interface.cpp"
click node_drive "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/diff_drive.cpp"
click node_actuator "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/actuator_board.cpp"
click node_ir "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/ir_sensor.cpp"
click node_cinch "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/cinch.cpp"
click node_servo_interface "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/servo_system/servo_interface.cpp"
click node_servo_protocols "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/include/zemo_hardware/servo_system/servo_protocols.hpp"
click node_waveshare "https://github.com/zemorobotics/zemo_ros/tree/main/zemo_hardware/include/zemo_hardware/servo_system/waveshare_driver"
click node_servo_controller "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_controllers/src/servo_controller.cpp"
click node_nav_launch "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/launch/zemo_navigation_launch.py"
click node_move "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/move.cpp"
click node_straight "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/straight_line_move.cpp"
click node_rotation "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/rotation.cpp"
click node_arc "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/circular_arc.cpp"
click node_obstacles "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/AdditionalObstacleLayer.cpp"
click node_collision "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/collision_detector/collision_detector.cpp"
click node_polygon "https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/collision_detector/dynamic_polygon.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bringup,node_description toneBlue
class node_can,node_drive,node_actuator,node_ir,node_cinch,node_servo_interface,node_servo_protocols,node_waveshare toneAmber
class node_nav_launch,node_move,node_straight,node_rotation,node_arc,node_obstacles,node_collision,node_polygon toneMint
class node_ros2_control,node_servo_controller toneRose
class node_operator,node_nav2,node_lidar,node_motion_board toneIndigo
```

## Components

### Robot startup

- [Robot launch](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_bringup/launch/robot_launch.py): `zemo_bringup/launch/robot_launch.py`
- [Robot description](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_description/launch/robot_state_publisher_launch.py): `zemo_description/launch/robot_state_publisher_launch.py`

### Robot hardware

- [CAN interface](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/can_interface.cpp): `zemo_hardware/src/can_system/can_interface.cpp`
- [Differential drive](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/diff_drive.cpp): `zemo_hardware/src/can_system/diff_drive.cpp`
- [Actuator board](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/actuator_board.cpp): `zemo_hardware/src/can_system/actuator_board.cpp`
- [IR sensors](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/ir_sensor.cpp): `zemo_hardware/src/can_system/ir_sensor.cpp`
- [CINCH](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/can_system/cinch.cpp): `zemo_hardware/src/can_system/cinch.cpp`
- [Servo hardware interface](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/src/servo_system/servo_interface.cpp): `zemo_hardware/src/servo_system/servo_interface.cpp`
- [Servo protocols](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_hardware/include/zemo_hardware/servo_system/servo_protocols.hpp): `zemo_hardware/include/zemo_hardware/servo_system/servo_protocols.hpp`
- [Waveshare drivers](https://github.com/zemorobotics/zemo_ros/tree/main/zemo_hardware/include/zemo_hardware/servo_system/waveshare_driver): `zemo_hardware/include/zemo_hardware/servo_system/waveshare_driver`

### Navigation

- [Navigation launch](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/launch/zemo_navigation_launch.py): `zemo_navigation/launch/zemo_navigation_launch.py`
- [Move action server](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/move.cpp): `zemo_navigation/src/move.cpp`
- [Straight-line controller](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/straight_line_move.cpp): `zemo_navigation/src/controller_plugins/straight_line_move.cpp`
- [Rotation controller](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/rotation.cpp): `zemo_navigation/src/controller_plugins/rotation.cpp`
- [Circular-arc controller](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/controller_plugins/circular_arc.cpp): `zemo_navigation/src/controller_plugins/circular_arc.cpp`
- [Obstacle costmap layer](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/AdditionalObstacleLayer.cpp): `zemo_navigation/src/AdditionalObstacleLayer.cpp`
- [Collision detector](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/collision_detector/collision_detector.cpp): `zemo_navigation/src/collision_detector/collision_detector.cpp`
- [Dynamic polygons](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_navigation/src/collision_detector/dynamic_polygon.cpp): `zemo_navigation/src/collision_detector/dynamic_polygon.cpp`

### Robot control

- **ROS 2 control**
- [Servo controller](https://github.com/zemorobotics/zemo_ros/blob/main/zemo_controllers/src/servo_controller.cpp): `zemo_controllers/src/servo_controller.cpp`

### Other components

- **Robot operator**
- **Nav2**
- **Lidar**
- **Motion board**

## Connections

- Robot operator → Robot launch: launches
- Robot launch → Robot description: starts
- Robot launch → Navigation launch: starts
- Robot launch → ROS 2 control: starts
- Robot description → ROS 2 control: defines connections
- Robot description → Nav2: provides transforms
- Robot description → ROS 2 control: provides transforms
- ROS 2 control → CAN interface: uses hardware
- ROS 2 control → Servo hardware interface: uses hardware
- CAN interface → Differential drive: communicates
- Differential drive → Motion board: sends wheel speeds
- CAN interface → Actuator board: communicates
- CAN interface → IR sensors: communicates
- CAN interface → CINCH: communicates
- Servo hardware interface → Servo protocols: dispatches protocols
- Servo protocols → Waveshare drivers: selects drivers (evidence: `zemo_hardware/include/zemo_hardware/servo_system/servo_protocols.hpp`)
- Servo controller → ROS 2 control: writes commands
- Navigation launch → Nav2: configures
- Nav2 → Straight-line controller: uses controller
- Nav2 → Rotation controller: uses controller
- Nav2 → Circular-arc controller: uses controller
- Nav2 → Obstacle costmap layer: loads costmap layer
- Robot operator → Move action server: requests movement
- Move action server → Collision detector: checks collisions
- Collision detector → Dynamic polygons: uses polygons
- Collision detector → Lidar: checks sensor data
- Collision detector → IR sensors: checks sensor data
