# ssk450/hector_slam architecture

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

- Interactive diagram: https://gitdiagram.com/ssk450/hector_slam
- Repository: https://github.com/ssk450/hector_slam

## Overview

This repository is a ROS SLAM and mapping package collection. Its principal workflow accepts laser scans in the mapping ROS node, estimates pose and updates occupancy maps through Hector SLAM’s scan-matching and map-representation layers, then publishes mapping results. The tree also shows map serving, compressed-map image transport, GeoTIFF export and trajectory overlays, IMU conversions, and trajectory publishing. Edges are limited to relationships visible in excerpts or SOURCE INDEX references; where runtime wiring is not shown, links are omitted rather than inferred.

Main entry points: [`hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h) (Multi-map representation), [`hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h`](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h) (SLAM processor), [`hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h`](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h) (Map processing), [`hector_geotiff/src/geotiff_node.cpp`](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/src/geotiff_node.cpp) (GeoTIFF node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_slam["SLAM Mapping"]
  node_mapping_ros["Mapping ROS"]
  node_slam_processor["SLAM processor"]
  node_map_rep["Multi-map representation<br/>[MapRepMultiMap.h]"]
  node_map_proc["Map processing<br/>[MapProcContainer.h]"]
  node_scan_matcher["Scan matcher<br/>[ScanMatcher.h]"]
  node_occupancy[("Occupancy grid<br/>[OccGridMapBase.h]")]
  node_scan_points["Scan points"]
end

subgraph group_maps["Map I/O"]
  node_map_server["Map server"]
  node_map_tools["Map tools<br/>[HectorMapTools.h]"]
  node_compressed_image["Map image transport"]
  node_geotiff_node["GeoTIFF node<br/>[geotiff_node.cpp]"]
  node_geotiff_writer["GeoTIFF writer<br/>[geotiff_writer.cpp]"]
  node_map_writer_plugin["Writer plugin interface"]
  node_geotiff_plugin["Trajectory GeoTIFF plugin"]
end

subgraph group_sensors["Sensor and Trajectory Tools"]
  node_imu_pose["Pose to IMU"]
  node_imu_tf["IMU to TF"]
  node_trajectory_server["Trajectory server"]
end

subgraph group_viz["Visualization"]
  node_drawings["Marker drawings<br/>[HectorDrawings.h]"]
  node_draw_interface["Drawing interface<br/>[DrawInterface.h]"]
  node_debug_provider["Debug provider"]
end

node_laser(("Laser scans"))

node_laser -.->|"supplies scans"| node_mapping_ros
node_mapping_ros -->|"uses processor"| node_slam_processor
node_slam_processor -->|"delegates mapping"| node_map_rep
node_map_rep -->|"constructs and matches"| node_map_proc
node_map_rep -->|"uses matcher"| node_scan_matcher
node_map_rep -->|"creates grids"| node_occupancy
node_map_proc -->|"uses matcher"| node_scan_matcher
node_map_proc -->|"uses grid"| node_occupancy
node_map_rep -->|"matches scan data"| node_scan_points
node_map_server -->|"uses map utilities"| node_map_tools
node_geotiff_node -->|"uses writer"| node_geotiff_writer
node_geotiff_node -->|"loads plugin interface"| node_map_writer_plugin
node_geotiff_writer -->|"uses coordinate tools"| node_map_tools
node_slam_processor -->|"uses drawing interface"| node_draw_interface
node_slam_processor -->|"uses debug interface"| node_debug_provider
node_drawings -->|"implements"| node_draw_interface
node_compressed_image -.->|"consumes map"| node_map_server
node_geotiff_plugin -.->|"plugin implementation"| node_map_writer_plugin

click node_mapping_ros "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/src/HectorMappingRos.cpp"
click node_slam_processor "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h"
click node_map_rep "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h"
click node_map_proc "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h"
click node_scan_matcher "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/matcher/ScanMatcher.h"
click node_occupancy "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/map/OccGridMapBase.h"
click node_scan_points "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/scan/DataPointContainer.h"
click node_map_server "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_map_server/src/hector_map_server.cpp"
click node_map_tools "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_map_tools/include/hector_map_tools/HectorMapTools.h"
click node_compressed_image "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_compressed_map_transport/src/map_to_image_node.cpp"
click node_geotiff_node "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/src/geotiff_node.cpp"
click node_geotiff_writer "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/src/geotiff_writer/geotiff_writer.cpp"
click node_map_writer_plugin "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/include/hector_geotiff/map_writer_plugin_interface.h"
click node_geotiff_plugin "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff_plugins/src/trajectory_geotiff_plugin.cpp"
click node_imu_pose "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_imu_tools/src/pose_and_orientation_to_imu_node.cpp"
click node_imu_tf "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp"
click node_trajectory_server "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_trajectory_server/src/hector_trajectory_server.cpp"
click node_drawings "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_marker_drawing/include/hector_marker_drawing/HectorDrawings.h"
click node_draw_interface "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/util/DrawInterface.h"
click node_debug_provider "https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/src/HectorDebugInfoProvider.h"

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_mapping_ros,node_slam_processor,node_map_rep,node_map_proc,node_scan_matcher,node_occupancy,node_scan_points toneBlue
class node_map_server,node_map_tools,node_compressed_image,node_geotiff_node,node_geotiff_writer,node_map_writer_plugin,node_geotiff_plugin toneAmber
class node_imu_pose,node_imu_tf,node_trajectory_server toneMint
class node_drawings,node_draw_interface,node_debug_provider toneRose
class node_laser toneIndigo
```

## Components

### SLAM Mapping

- [Mapping ROS](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/src/HectorMappingRos.cpp): `hector_mapping/src/HectorMappingRos.cpp`
- [SLAM processor](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h): `hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h`
- [Multi-map representation](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h): `hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`
- [Map processing](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h): `hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h`
- [Scan matcher](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/matcher/ScanMatcher.h): `hector_mapping/include/hector_slam_lib/matcher/ScanMatcher.h`
- [Occupancy grid](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/map/OccGridMapBase.h): `hector_mapping/include/hector_slam_lib/map/OccGridMapBase.h`
- [Scan points](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/scan/DataPointContainer.h): `hector_mapping/include/hector_slam_lib/scan/DataPointContainer.h`

### Map I/O

- [Map server](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_map_server/src/hector_map_server.cpp): `hector_map_server/src/hector_map_server.cpp`
- [Map tools](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_map_tools/include/hector_map_tools/HectorMapTools.h): `hector_map_tools/include/hector_map_tools/HectorMapTools.h`
- [Map image transport](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_compressed_map_transport/src/map_to_image_node.cpp): `hector_compressed_map_transport/src/map_to_image_node.cpp`
- [GeoTIFF node](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/src/geotiff_node.cpp): `hector_geotiff/src/geotiff_node.cpp`
- [GeoTIFF writer](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/src/geotiff_writer/geotiff_writer.cpp): `hector_geotiff/src/geotiff_writer/geotiff_writer.cpp`
- [Writer plugin interface](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff/include/hector_geotiff/map_writer_plugin_interface.h): `hector_geotiff/include/hector_geotiff/map_writer_plugin_interface.h`
- [Trajectory GeoTIFF plugin](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_geotiff_plugins/src/trajectory_geotiff_plugin.cpp): `hector_geotiff_plugins/src/trajectory_geotiff_plugin.cpp`

### Sensor and Trajectory Tools

- [Pose to IMU](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_imu_tools/src/pose_and_orientation_to_imu_node.cpp): `hector_imu_tools/src/pose_and_orientation_to_imu_node.cpp`
- [IMU to TF](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp): `hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp`
- [Trajectory server](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_trajectory_server/src/hector_trajectory_server.cpp): `hector_trajectory_server/src/hector_trajectory_server.cpp`

### Visualization

- [Marker drawings](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_marker_drawing/include/hector_marker_drawing/HectorDrawings.h): `hector_marker_drawing/include/hector_marker_drawing/HectorDrawings.h`
- [Drawing interface](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/include/hector_slam_lib/util/DrawInterface.h): `hector_mapping/include/hector_slam_lib/util/DrawInterface.h`
- [Debug provider](https://github.com/ssk450/hector_slam/blob/noetic-devel/hector_mapping/src/HectorDebugInfoProvider.h): `hector_mapping/src/HectorDebugInfoProvider.h`

### Other components

- **Laser scans**

## Connections

- Laser scans → Mapping ROS: supplies scans
- Mapping ROS → SLAM processor: uses processor
- SLAM processor → Multi-map representation: delegates mapping (evidence: `hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h`)
- Multi-map representation → Map processing: constructs and matches (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`)
- Multi-map representation → Scan matcher: uses matcher (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`)
- Multi-map representation → Occupancy grid: creates grids (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`)
- Map processing → Scan matcher: uses matcher (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h`)
- Map processing → Occupancy grid: uses grid (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapProcContainer.h`)
- Multi-map representation → Scan points: matches scan data (evidence: `hector_mapping/include/hector_slam_lib/slam_main/MapRepMultiMap.h`)
- Map server → Map tools: uses map utilities (evidence: `hector_map_server/src/hector_map_server.cpp`)
- GeoTIFF node → GeoTIFF writer: uses writer (evidence: `hector_geotiff/src/geotiff_node.cpp`)
- GeoTIFF node → Writer plugin interface: loads plugin interface (evidence: `hector_geotiff/src/geotiff_node.cpp`)
- GeoTIFF writer → Map tools: uses coordinate tools
- SLAM processor → Drawing interface: uses drawing interface (evidence: `hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h`)
- SLAM processor → Debug provider: uses debug interface (evidence: `hector_mapping/include/hector_slam_lib/slam_main/HectorSlamProcessor.h`)
- Marker drawings → Drawing interface: implements (evidence: `hector_marker_drawing/include/hector_marker_drawing/HectorDrawings.h`)
- Map image transport → Map server: consumes map
- Trajectory GeoTIFF plugin → Writer plugin interface: plugin implementation
