# vjimenez2021/blogs-rs---2024-25 architecture

> Architecture diagram of the GitHub repository vjimenez2021/blogs-rs---2024-25, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vjimenez2021/blogs-rs---2024-25
- Repository: https://github.com/vjimenez2021/blogs-rs---2024-25

## Overview

##### Project Type and Purpose
- The repository is essentially a technical journal of robotics projects with a strong emphasis on practical robotics algorithms and sensor integration.
- It is not a full-stack web application or a single consolidated system; rather, it aggregates several robotics-system demonstrations.

##### Main Components
For each project (and also at an overall level), consider including:
- Input/Acquisition Elements: Sensors (camera feed, laser sensors, odometry data, hal interface) and map/image inputs (for processing maps, video streams, etc.).
- Processing & Perception Pipelines: Image processing modules (OpenCV routines for map transformation and obstacle dilation in P1 and P4; face detection in P2; AprilTag detection and transformation in P5), data conversion (world-to-pixel, 2D-to-3D transforms) and error-checking/debug functions.
- Algorithmic Logic: The decision structures such as cell classification routines, backtracking/BFS for path planning, motion planning algorithms (RRT, RRT*, etc. via OMPL for P4), and weighted averaging for multiple tag integration in P5.
- Actuation & Control Interfaces: The HAL (Hardware Abstraction Layer) interface that relays commands (position control, velocity control, mixed control) for both the drone (P2) and the robot (rest of projects) and simulation of movement (autonomous parking maneuvers in P3).
- Output/Visualization: GUI or video capture components that display results for debugging (example functions printing current cell status or visualizing detection results) as well as final demonstration videos.

##### Relationships and Interactions
- For each project, show data flow starting from sensor acquisition (camera images, sensor arrays) to processing modules (like converting maps or detecting features) and then to decision-making algorithms (path planning or movement alignment) that send commands to actuators.
- External integrations or libraries such as OpenCV, OMPL, and the HAL interface which act as bridges between software modules and hardware/simulation layers.

##### Architectural Patterns and Technologies
- Use of layered processing – sensor input, perception and mapping, planning/control, and output visualization form a natural multi-tier structure.
- That many of the modules rely on iterative algorithms (e.g., BFS for backtracking in P1, iterative adjustments in P3’s parking logic, dynamic map updates in P4) and robust error handling.
- Importance of coordinate transformations in both P1 (map conversion) and P5 (visual localization using camera calibration and AprilTag detection).

## Diagram (Mermaid)

```mermaid
flowchart TD
    repo["Overall Robotics Experiments Repository"]

    %% External Libraries
    opencv["OpenCV"]:::external
    ompl["OMPL"]:::external
    hal["HAL Interface"]:::external

    %% Project P1: Vacuum Cleaner
    subgraph "P1: Vacuum Cleaner"
        p1A["Sensors/Data Acquisition: Camera, Laser, Odometry"]:::sensor
        p1B["Processing: Map Transformation, Erosion/Dilation"]:::processing
        p1C["Algorithm: Cell Classification & Navigation Decision"]:::processing
        p1D["Actuation/Control: HAL Interface Invocation"]:::control
        p1E["Output: Debug Visualization & Demo Video"]:::visualization
        p1A -->|"feeds"| p1B
        p1B -->|"analyzes"| p1C
        p1C -->|"commands"| p1D
        p1D -->|"updates"| p1E
        p1B -->|"leverages"| opencv
        p1D -->|"uses"| hal
    end

    %% Project P2: Rescue Drone
    subgraph "P2: Rescue Drone"
        p2A["Sensors: Video Feed & Battery Monitor"]:::sensor
        p2B["Processing: Face Detection & Decision Logic"]:::processing
        p2C["Control Modes: Position/Velocity/Mixed"]:::control
        p2D["HAL Interface Command Relay"]:::control
        p2E["Output: Video Debug/Visualization"]:::visualization
        p2A -->|"sendsFeed"| p2B
        p2B -->|"triggers"| p2C
        p2C -->|"activates"| p2D
        p2D -->|"monitors"| p2E
        p2B -->|"leverages"| opencv
        p2D -->|"uses"| hal
    end

    %% Project P3: Autoparking
    subgraph "P3: Autoparking"
        p3A["Sensors: Laser & Orientation Data"]:::sensor
        p3B["Processing: Gap Detection & Slope Calculation"]:::processing
        p3C["Decision: Sequential Maneuver Planning"]:::processing
        p3D["Control: HAL Interface for Parking Execution"]:::control
        p3E["Output: Movement Simulation Visualization"]:::visualization
        p3A -->|"feeds"| p3B
        p3B -->|"calculates"| p3C
        p3C -->|"executes"| p3D
        p3D -->|"simulates"| p3E
        p3D -->|"uses"| hal
    end

    %% Project P4: Warehouse
    subgraph "P4: Warehouse"
        p4A["Sensors: Grayscale Map & Sensor Arrays"]:::sensor
        p4B["Pre-Processing: Map Conversion & Obstacle Dilation"]:::processing
        p4C["Path Planning: OMPL Algorithms (RRT, RRT*)"]:::processing
        p4D["Decision: Dynamic Map Adjustments"]:::processing
        p4E["Control: HAL Interface for Movement"]:::control
        p4A -->|"inputs"| p4B
        p4B -->|"feeds"| p4C
        p4C -->|"informs"| p4D
        p4D -->|"controls"| p4E
        p4C -->|"via"| ompl
        p4E -->|"uses"| hal
    end

    %% Project P5: Visual Localization
    subgraph "P5: Visual Localization"
        p5A["Sensors: Camera Feed & Odometry"]:::sensor
        p5B["Processing: Camera Calibration & AprilTag Detection"]:::processing
        p5C["Transformations: World-to-Tag, Camera-to-Robot"]:::processing
        p5D["Integration: Odometry-based Localization"]:::control
        p5E["Output: Localization Debug Display"]:::visualization
        p5A -->|"captures"| p5B
        p5B -->|"calculates"| p5C
        p5C -->|"integrates"| p5D
        p5D -->|"displays"| p5E
    end

    %% Connect overall repository to each project (using each project's sensor node as entry point)
    repo -->|"contains"| p1A
    repo -->|"contains"| p2A
    repo -->|"contains"| p3A
    repo -->|"contains"| p4A
    repo -->|"contains"| p5A

    %% Click event for documentation
    click repo "https://github.com/vjimenez2021/blogs-rs---2024-25/blob/main/README.md"

    %% Styles
    classDef sensor fill:#FFEECC,stroke:#D2691E,stroke-width:2px;
    classDef processing fill:#CCE5FF,stroke:#1E90FF,stroke-width:2px;
    classDef control fill:#CCFFCC,stroke:#228B22,stroke-width:2px;
    classDef visualization fill:#F9CCFF,stroke:#8A2BE2,stroke-width:2px;
    classDef external fill:#FFFACD,stroke:#B8860B,stroke-width:2px;
```
