# ltu-rai/frame architecture

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

- Interactive diagram: https://gitdiagram.com/ltu-rai/frame
- Repository: https://github.com/ltu-rai/frame

## Overview

FRAME is a ROS-based multi-robot point-cloud map-merging framework. Its main workflow subscribes to two robots’ map topics, samples local regions, estimates alignment with GICP/VGICP, transforms and combines the maps, then publishes the merged cloud. The repository also provides point-cloud projection, visualization, and file-based map publishing utilities. The sampled sources show the online merge and ROS data handling; README descriptions of broader framework capabilities are sparse, and no further algorithmic subsystems are inferred.

Main entry points: [`scripts/merge_online.py`](https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py) (Merge node), [`src/utils_frame/pcd_publisher.py`](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/pcd_publisher.py) (Cloud publisher), [`src/utils_frame/robotFeatures.py`](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/robotFeatures.py) (Robot map intake), [`src/utils_frame/load_map.py`](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/load_map.py) (File map loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_merge["Online merging"]
  node_features["Robot map intake<br/>[robotFeatures.py]"]
  node_runner["Merge node<br/>[merge_online.py]"]
  node_sampling["Region sampling<br/>[merge_online.py]"]
  node_registration["GICP alignment<br/>[merge_online.py]"]
  node_composition["Map transform and merge<br/>[merge_online.py]"]
  node_params["Merge parameters<br/>[params.yaml]"]
end

subgraph group_cloud["Point-cloud utilities"]
  node_projection["Depth projection<br/>[pcd_projection.py]"]
  node_visualization["Cloud visualization<br/>[visualize.py]"]
end

subgraph group_ros["ROS map I/O"]
  node_file_loader["File map loader<br/>[load_map.py]"]
  node_publisher["Cloud publisher<br/>[pcd_publisher.py]"]
end

node_robots(("Robot map topics"))
node_merged_topic(("Merged map topic"))

node_runner -->|"creates subscribers"| node_features
node_robots -->|"sends clouds"| node_features
node_runner -->|"loads settings"| node_params
node_runner -->|"samples regions"| node_sampling
node_runner -->|"aligns regions"| node_registration
node_runner -->|"transforms and combines"| node_composition
node_runner -->|"publishes merged cloud"| node_publisher
node_publisher -->|"publishes cloud"| node_merged_topic
node_file_loader -.->|"publishes map"| node_merged_topic

click node_features "https://github.com/ltu-rai/frame/blob/main/src/utils_frame/robotFeatures.py"
click node_runner "https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py"
click node_sampling "https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py"
click node_registration "https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py"
click node_composition "https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py"
click node_params "https://github.com/ltu-rai/frame/blob/main/config/params.yaml"
click node_projection "https://github.com/ltu-rai/frame/blob/main/src/utils_frame/pcd_projection.py"
click node_visualization "https://github.com/ltu-rai/frame/blob/main/src/utils_frame/visualize.py"
click node_file_loader "https://github.com/ltu-rai/frame/blob/main/src/utils_frame/load_map.py"
click node_publisher "https://github.com/ltu-rai/frame/blob/main/src/utils_frame/pcd_publisher.py"

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_features,node_runner,node_sampling,node_registration,node_composition,node_params toneBlue
class node_projection,node_visualization toneAmber
class node_file_loader,node_publisher toneMint
class node_robots,node_merged_topic toneIndigo
```

## Components

### Online merging

- [Robot map intake](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/robotFeatures.py): `src/utils_frame/robotFeatures.py`
- [Merge node](https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py): `scripts/merge_online.py`
- [Region sampling](https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py): `scripts/merge_online.py`
- [GICP alignment](https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py): `scripts/merge_online.py`
- [Map transform and merge](https://github.com/ltu-rai/frame/blob/main/scripts/merge_online.py): `scripts/merge_online.py`
- [Merge parameters](https://github.com/ltu-rai/frame/blob/main/config/params.yaml): `config/params.yaml`

### Point-cloud utilities

- [Depth projection](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/pcd_projection.py): `src/utils_frame/pcd_projection.py`
- [Cloud visualization](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/visualize.py): `src/utils_frame/visualize.py`

### ROS map I/O

- [File map loader](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/load_map.py): `src/utils_frame/load_map.py`
- [Cloud publisher](https://github.com/ltu-rai/frame/blob/main/src/utils_frame/pcd_publisher.py): `src/utils_frame/pcd_publisher.py`

### Other components

- **Robot map topics**
- **Merged map topic**

## Connections

- Merge node → Robot map intake: creates subscribers (evidence: `scripts/merge_online.py`)
- Robot map topics → Robot map intake: sends clouds (evidence: `src/utils_frame/robotFeatures.py`)
- Merge node → Merge parameters: loads settings (evidence: `scripts/merge_online.py`)
- Merge node → Region sampling: samples regions (evidence: `scripts/merge_online.py`)
- Merge node → GICP alignment: aligns regions (evidence: `scripts/merge_online.py`)
- Merge node → Map transform and merge: transforms and combines (evidence: `scripts/merge_online.py`)
- Merge node → Cloud publisher: publishes merged cloud (evidence: `scripts/merge_online.py`)
- Cloud publisher → Merged map topic: publishes cloud
- File map loader → Merged map topic: publishes map (evidence: `src/utils_frame/load_map.py`)
