# unitreerobotics/qmini architecture

> Architecture diagram of the GitHub repository unitreerobotics/qmini, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/unitreerobotics/qmini
- Repository: https://github.com/unitreerobotics/qmini

## Overview

##### Project type and purpose
- Project Type: Open-source bipedal robotics platform
- Purpose: Provide a fully 3D-printable, modular biped robot (Qmini) with supporting hardware files (STEP, STL), URDF model, and a reference control software stack (RoboTamer4Qmini).

##### High-level architecture overview
- Hardware Layer
- Mechanical structure: 3D-printed links (hip, knee, ankle, base) from STEP and STL files
- Actuation: 11 Unitree 8010 brushless motors (10 for legs, 1 for neck/expansion)
- Electronics: Motor driver boards, sensors (IMU, encoders), battery pack, Raspberry Pi 4 (or alternative controller)
- Software Layer
- Robot description: URDF/XML file + meshes for simulation & collision models
- Control stack: RoboTamer4Qmini (ROS-based controllers, motion planners, gait generators)
- Simulation: Gazebo or other physics engine (leverages URDF and plugins)
- External Interfaces
- User interface / CLI on Raspberry Pi or remote workstation
- Optional networked telemetry or ROS topics for monitoring, logging, GUI

- 3D-printed chassis & joints
- Motor drivers & wiring harness
- Raspberry Pi 4 (or equivalent SBC)
- Battery / power distribution
- Sensors (IMU, encoders)
- URDF parser & robot_state_publisher
- Motion control nodes (gait generation, PID controller)
- Communication middleware (ROS topics/services over TCP/UDP)
- Simulation interface (Gazebo plugin)
- User tools (CLI scripts, ROS launch files)
c. Data flows and interactions
- Commands from user interface → motion control nodes
- Control nodes → motor driver over serial/SPI/I2C
- Sensors → feedback to control nodes
- URDF & meshes → simulation engine
- Simulation → virtual sensor feedback → control nodes
d. Architectural patterns / principles
- Layered separation: Hardware Abstraction → Control → Application
- Modular design: each joint’s motor, driver, and control node treated as a unit
- Standard ROS pub/sub for decoupling components
- Reuse of URDF across real hardware and simulation

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Hardware Layer
    subgraph "Hardware Layer"
        direction TB
        HW1["3D-Printed Links"]:::hardware
        HW2["Motor Drivers & Wiring"]:::hardware
        HW3["Electronics Enclosure"]:::hardware
        subgraph "Electronics Enclosure"
            direction TB
            PI["Raspberry Pi 4 (SBC)"]:::hardware
            BAT["Battery & Power Distribution"]:::hardware
            SENS["Sensors (IMU, Encoders)"]:::hardware
        end
    end

    %% Software Layer
    subgraph "Software Layer"
        direction TB
        SW1["URDF Parser & robot_state_publisher"]:::software
        SW2["Motion Control Nodes\n(Gait Generator, PID)"]:::software
        SW3["Communication Middleware\n(ROS Topics/Services)"]:::software
        SW4["Simulation Interface\n(Gazebo Plugin)"]:::software
        SW5["User Tools\n(CLI Scripts, Launch Files)"]:::software
    end

    %% External Interfaces
    subgraph "External"
        direction TB
        EXT1("User CLI / GUI"):::external
        EXT2("ROS Master"):::external
        DOCS["Project Documentation"]:::external
    end

    %% Connections: Real Robot
    EXT1 -->|"user commands"| SW2
    SW2 -->|"serial/CAN bus"| HW2
    SENS -->|"feedback"| SW2
    SW1 -->|"state publishing"| SW3
    SW3 -->|"control topics"| SW2

    %% URDF & Simulation
    SW1 -->|"parses URDF"| SW4
    SW4 -.->|"virtual sensors"| SW2

    %% URDF Single Source
    SW1 ---|"URDF model links CAD & Sim"| HW1

    %% Documentation Link
    EXT1 -->|"consult docs"| DOCS

    %% Click Events
    click HW1 "https://github.com/unitreerobotics/qmini/blob/main/STEP_file/Qmini_v1_0.STEP.zip"
    click SW1 "https://github.com/unitreerobotics/qmini/blob/main/urdf/Qmini.urdf"
    click SW4 "https://github.com/unitreerobotics/qmini/blob/main/images/Qmini_simulation.mp4"
    click EXT1 "https://github.com/unitreerobotics/qmini/blob/main/README.md"
    click DOCS "https://github.com/unitreerobotics/qmini/blob/main/doc/Qmini_DIY.pdf"

    %% Styles
    classDef hardware fill:#cfe2f3,stroke:#2f6f9f,color:#0b2340;
    classDef software fill:#d9ead3,stroke:#38761d,color:#274e13;
    classDef external fill:#f9cb9c,stroke:#a65f00,color:#582900;
```
