# thyaen/xtrack architecture

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

- Interactive diagram: https://gitdiagram.com/thyaen/xtrack
- Repository: https://github.com/thyaen/xtrack

## Overview

XTRACK-A combines a host-side sensor stack, client-side LiDAR odometry/SLAM and ROS navigation, a browser interface, and manual track control. The documented operator workflow is to start the host sensors and client mapping/navigation, inspect the map in RViz2, then set a goal; joystick input can interrupt autonomous driving. The README documents these system-level relationships, while sampled KISS-ICP sources show the odometry-to-estimator boundary and estimator internals. Unsampled launch and navigation wiring is represented only where documented, not inferred from filenames.

Main entry points: [`app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp) (KISS-ICP estimator), [`app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp`](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp) (ROS odometry server), [`app/client/ros2_ws/src/pcps_ros/launch/pcps_navigation.launch.py`](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/pcps_ros/launch/pcps_navigation.launch.py) (ROS navigation), [`motor_control/ros2_ws/src/xtrack_control/xtrack_control/motor_control_node.py`](https://github.com/thyaen/xtrack/blob/main/motor_control/ros2_ws/src/xtrack_control/xtrack_control/motor_control_node.py) (Motor control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Host Sensing"]
  node_host_lidar["LiDAR service<br/>[server_scan.py]"]
  node_host_imu["IMU service<br/>[server_imu.py]"]
  node_vn100["VN100 processing"]
end

subgraph group_slam["Odometry and SLAM"]
  node_odom_server["ROS odometry server<br/>[OdometryServer.cpp]"]
  node_kiss_core["KISS-ICP estimator<br/>[KissICP.hpp]"]
  node_preprocess["Scan preprocessing<br/>[Preprocessing.cpp]"]
  node_registration["Point registration<br/>[Registration.cpp]"]
  node_threshold["Adaptive threshold<br/>[Threshold.cpp]"]
  node_voxel_map[("Voxel map<br/>[VoxelHashMap.cpp]")]
end

subgraph group_navigation["Navigation and Interface"]
  node_nav_stack["ROS navigation"]
  node_slam_launch["SLAM launch"]
  node_web["Web interface<br/>[app.py]"]
end

subgraph group_control["Vehicle Control"]
  node_gamepad_bridge["Gamepad bridge<br/>[gamepad_bridge.py]"]
  node_motor_node["Motor control"]
end

node_operator(("Operator"))
node_lidar(("LiDAR sensor"))
node_imu(("IMU sensor"))
node_browser(("Browser"))
node_rviz(("RViz2 operator"))
node_gamepad(("Joystick"))
node_tracks(("Tracked vehicle"))

node_lidar -->|"supplies scans"| node_host_lidar
node_imu -->|"supplies measurements"| node_host_imu
node_imu -->|"feeds processing"| node_vn100
node_host_lidar -.->|"provides LiDAR data"| node_odom_server
node_host_imu -.->|"provides IMU data"| node_odom_server
node_odom_server -->|"constructs estimator"| node_kiss_core
node_kiss_core -->|"configures preprocessing"| node_preprocess
node_kiss_core -->|"configures registration"| node_registration
node_kiss_core -->|"configures threshold"| node_threshold
node_kiss_core -->|"configures map"| node_voxel_map
node_odom_server -.->|"provides odometry"| node_nav_stack
node_operator -->|"opens interface"| node_web
node_web -.->|"supports navigation"| node_nav_stack
node_operator -->|"sets goal pose"| node_rviz
node_rviz -->|"dispatches goal"| node_nav_stack
node_operator -->|"steers manually"| node_gamepad
node_gamepad -.->|"provides input"| node_gamepad_bridge
node_gamepad_bridge -.->|"forwards controls"| node_motor_node
node_motor_node -.->|"drives tracks"| node_tracks
node_nav_stack -.->|"commands vehicle"| node_motor_node

click node_host_lidar "https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/pcps_ros/scripts/server_scan.py"
click node_host_imu "https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/pcps_ros/scripts/server_imu.py"
click node_vn100 "https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/aspn_vn100/src/vn100_processing.cpp"
click node_odom_server "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp"
click node_kiss_core "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp"
click node_preprocess "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Preprocessing.cpp"
click node_registration "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Registration.cpp"
click node_threshold "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Threshold.cpp"
click node_voxel_map "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/VoxelHashMap.cpp"
click node_nav_stack "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/pcps_ros/launch/pcps_navigation.launch.py"
click node_slam_launch "https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/pcps_ros/launch/pcps_slam.launch.py"
click node_web "https://github.com/thyaen/xtrack/blob/main/app/client/app.py"
click node_gamepad_bridge "https://github.com/thyaen/xtrack/blob/main/motor_control/gamepad_bridge.py"
click node_motor_node "https://github.com/thyaen/xtrack/blob/main/motor_control/ros2_ws/src/xtrack_control/xtrack_control/motor_control_node.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_host_lidar,node_host_imu,node_vn100,node_browser toneBlue
class node_odom_server,node_kiss_core,node_preprocess,node_registration,node_threshold,node_voxel_map toneAmber
class node_nav_stack,node_slam_launch,node_web toneMint
class node_gamepad_bridge,node_motor_node toneRose
class node_operator,node_lidar,node_imu,node_rviz,node_gamepad,node_tracks toneIndigo
```

## Components

### Host Sensing

- [LiDAR service](https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/pcps_ros/scripts/server_scan.py): `app/host/ros2_ws/src/pcps_ros/scripts/server_scan.py`
- [IMU service](https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/pcps_ros/scripts/server_imu.py): `app/host/ros2_ws/src/pcps_ros/scripts/server_imu.py`
- [VN100 processing](https://github.com/thyaen/xtrack/blob/main/app/host/ros2_ws/src/aspn_vn100/src/vn100_processing.cpp): `app/host/ros2_ws/src/aspn_vn100/src/vn100_processing.cpp`

### Odometry and SLAM

- [ROS odometry server](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp): `app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp`
- [KISS-ICP estimator](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp): `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`
- [Scan preprocessing](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Preprocessing.cpp): `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Preprocessing.cpp`
- [Point registration](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Registration.cpp): `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Registration.cpp`
- [Adaptive threshold](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Threshold.cpp): `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/Threshold.cpp`
- [Voxel map](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/VoxelHashMap.cpp): `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/core/VoxelHashMap.cpp`

### Navigation and Interface

- [ROS navigation](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/pcps_ros/launch/pcps_navigation.launch.py): `app/client/ros2_ws/src/pcps_ros/launch/pcps_navigation.launch.py`
- [SLAM launch](https://github.com/thyaen/xtrack/blob/main/app/client/ros2_ws/src/pcps_ros/launch/pcps_slam.launch.py): `app/client/ros2_ws/src/pcps_ros/launch/pcps_slam.launch.py`
- [Web interface](https://github.com/thyaen/xtrack/blob/main/app/client/app.py): `app/client/app.py`

### Vehicle Control

- [Gamepad bridge](https://github.com/thyaen/xtrack/blob/main/motor_control/gamepad_bridge.py): `motor_control/gamepad_bridge.py`
- [Motor control](https://github.com/thyaen/xtrack/blob/main/motor_control/ros2_ws/src/xtrack_control/xtrack_control/motor_control_node.py): `motor_control/ros2_ws/src/xtrack_control/xtrack_control/motor_control_node.py`

### Other components

- **Operator**
- **LiDAR sensor**
- **IMU sensor**
- **Browser**
- **RViz2 operator**
- **Joystick**
- **Tracked vehicle**

## Connections

- LiDAR sensor → LiDAR service: supplies scans (evidence: `README.md`)
- IMU sensor → IMU service: supplies measurements (evidence: `README.md`)
- IMU sensor → VN100 processing: feeds processing (evidence: `README.md`)
- LiDAR service → ROS odometry server: provides LiDAR data
- IMU service → ROS odometry server: provides IMU data
- ROS odometry server → KISS-ICP estimator: constructs estimator (evidence: `app/client/ros2_ws/src/kiss-icp/ros/src/OdometryServer.cpp`)
- KISS-ICP estimator → Scan preprocessing: configures preprocessing (evidence: `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`)
- KISS-ICP estimator → Point registration: configures registration (evidence: `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`)
- KISS-ICP estimator → Adaptive threshold: configures threshold (evidence: `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`)
- KISS-ICP estimator → Voxel map: configures map (evidence: `app/client/ros2_ws/src/kiss-icp/cpp/kiss_icp/pipeline/KissICP.hpp`)
- ROS odometry server → ROS navigation: provides odometry
- Operator → Web interface: opens interface (evidence: `README.md`)
- Web interface → ROS navigation: supports navigation
- Operator → RViz2 operator: sets goal pose (evidence: `README.md`)
- RViz2 operator → ROS navigation: dispatches goal (evidence: `README.md`)
- Operator → Joystick: steers manually (evidence: `README.md`)
- Joystick → Gamepad bridge: provides input
- Gamepad bridge → Motor control: forwards controls
- Motor control → Tracked vehicle: drives tracks
- ROS navigation → Motor control: commands vehicle
