# nezih-niegu/auv_ftc_ws architecture

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

- Interactive diagram: https://gitdiagram.com/nezih-niegu/auv_ftc_ws
- Repository: https://github.com/nezih-niegu/auv_ftc_ws

## Overview

This ROS 2/Gazebo stack simulates fault-tolerant control of an AUV, from vehicle setup and reference generation through fuzzy control and actuator allocation to simulated motion. Operators can track trajectories, inject actuator faults, view live signals, and reproduce paper scenarios with rosbag-based plots. The controller excerpt shows its internal control sequence; README statements support the broader launch, dashboard, and analysis workflows. Several package implementations were not sampled, so their connections are included only where documented.

Main entry points: [`src/auv_control/src/auv_controller_node.cpp`](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/auv_controller_node.cpp) (Controller node), [`src/auv_bringup/launch/full_simulation.launch.py`](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/full_simulation.launch.py) (Stack launch), [`src/auv_bringup/launch/reproduce_paper.launch.py`](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/reproduce_paper.launch.py) (Paper replay launch), [`src/auv_dashboard/web/dashboard.html`](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_dashboard/web/dashboard.html) (Live dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation"]
  node_bringup["Stack launch"]
  node_gazebo["Gazebo world<br/>[gazebo.launch.py]"]
  node_vehicle["AUV model"]
end

subgraph group_control["Control"]
  node_controller["Controller node"]
  node_references["Reference generator"]
  node_trajectory["Trajectory tracking"]
  node_fuzzy["T-S fuzzy control<br/>[ts_fuzzy.cpp]"]
  node_allocator["Thrust allocation"]
  node_params["Vehicle parameters<br/>[auv_params.hpp]"]
end

subgraph group_operations["Operations"]
  node_faultcli["Fault CLI"]
  node_scenario["Scenario runner<br/>[scenario_runner.py]"]
  node_paperlaunch["Paper replay launch"]
end

subgraph group_observability["Observability"]
  node_dashboardlaunch["Dashboard launch"]
  node_dashboard["Live dashboard<br/>[dashboard.html]"]
  node_rosbridge["ROS bridge"]
  node_rosbag[("Signal recording")]
  node_plotter["Bag plotting<br/>[plot_from_bag.py]"]
end

node_operator(("Operator"))

node_operator -->|"starts simulation"| node_bringup
node_bringup -->|"launches"| node_gazebo
node_gazebo -->|"spawns model"| node_vehicle
node_bringup -->|"starts control"| node_controller
node_bringup -->|"starts generator"| node_references
node_references -->|"publishes references"| node_controller
node_controller -->|"updates reference"| node_trajectory
node_controller -->|"computes command"| node_fuzzy
node_controller -->|"allocates wrench"| node_allocator
node_allocator -->|"uses geometry"| node_params
node_operator -->|"requests fault"| node_faultcli
node_faultcli -->|"calls fault service"| node_controller
node_paperlaunch -->|"starts scenario"| node_scenario
node_scenario -->|"injects fault"| node_controller
node_paperlaunch -->|"records signals"| node_rosbag
node_rosbag -->|"supplies bag"| node_plotter
node_operator -->|"opens dashboard"| node_dashboardlaunch
node_dashboardlaunch -->|"starts bridge"| node_rosbridge
node_dashboard -->|"streams ROS data"| node_rosbridge
node_dashboard -->|"injects faults"| node_controller

click node_bringup "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/full_simulation.launch.py"
click node_gazebo "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_gazebo/launch/gazebo.launch.py"
click node_vehicle "https://github.com/nezih-niegu/auv_ftc_ws/tree/main/src/auv_description/urdf"
click node_controller "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/auv_controller_node.cpp"
click node_references "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/reference_generator_node.cpp"
click node_trajectory "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/auv_controller_node.cpp"
click node_fuzzy "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/ts_fuzzy.cpp"
click node_allocator "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/thrust_allocator.cpp"
click node_params "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/include/auv_control/auv_params.hpp"
click node_faultcli "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/inject_fault_cli.py"
click node_scenario "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/scenario_runner.py"
click node_paperlaunch "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/reproduce_paper.launch.py"
click node_dashboardlaunch "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_dashboard/launch/dashboard.launch.py"
click node_dashboard "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_dashboard/web/dashboard.html"
click node_rosbag "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/reproduce_paper.launch.py"
click node_plotter "https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/plot_from_bag.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_bringup,node_gazebo,node_vehicle toneBlue
class node_controller,node_references,node_trajectory,node_fuzzy,node_allocator,node_params toneAmber
class node_faultcli,node_scenario,node_paperlaunch toneMint
class node_dashboardlaunch,node_dashboard,node_rosbridge,node_rosbag,node_plotter toneRose
class node_operator toneIndigo
```

## Components

### Simulation

- [Stack launch](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/full_simulation.launch.py): `src/auv_bringup/launch/full_simulation.launch.py`
- [Gazebo world](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_gazebo/launch/gazebo.launch.py): `src/auv_gazebo/launch/gazebo.launch.py`
- [AUV model](https://github.com/nezih-niegu/auv_ftc_ws/tree/main/src/auv_description/urdf): `src/auv_description/urdf`

### Control

- [Controller node](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/auv_controller_node.cpp): `src/auv_control/src/auv_controller_node.cpp`
- [Reference generator](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/reference_generator_node.cpp): `src/auv_control/src/reference_generator_node.cpp`
- [Trajectory tracking](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/auv_controller_node.cpp): `src/auv_control/src/auv_controller_node.cpp`
- [T-S fuzzy control](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/ts_fuzzy.cpp): `src/auv_control/src/ts_fuzzy.cpp`
- [Thrust allocation](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/src/thrust_allocator.cpp): `src/auv_control/src/thrust_allocator.cpp`
- [Vehicle parameters](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/include/auv_control/auv_params.hpp): `src/auv_control/include/auv_control/auv_params.hpp`

### Operations

- [Fault CLI](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/inject_fault_cli.py): `src/auv_control/scripts/inject_fault_cli.py`
- [Scenario runner](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/scenario_runner.py): `src/auv_control/scripts/scenario_runner.py`
- [Paper replay launch](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/reproduce_paper.launch.py): `src/auv_bringup/launch/reproduce_paper.launch.py`

### Observability

- [Dashboard launch](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_dashboard/launch/dashboard.launch.py): `src/auv_dashboard/launch/dashboard.launch.py`
- [Live dashboard](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_dashboard/web/dashboard.html): `src/auv_dashboard/web/dashboard.html`
- **ROS bridge**
- [Signal recording](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_bringup/launch/reproduce_paper.launch.py): `src/auv_bringup/launch/reproduce_paper.launch.py`
- [Bag plotting](https://github.com/nezih-niegu/auv_ftc_ws/blob/main/src/auv_control/scripts/plot_from_bag.py): `src/auv_control/scripts/plot_from_bag.py`

### Other components

- **Operator**

## Connections

- Operator → Stack launch: starts simulation (evidence: `README.md`)
- Stack launch → Gazebo world: launches (evidence: `README.md`)
- Gazebo world → AUV model: spawns model (evidence: `src/auv_gazebo/launch/gazebo.launch.py`)
- Stack launch → Controller node: starts control (evidence: `README.md`)
- Stack launch → Reference generator: starts generator (evidence: `README.md`)
- Reference generator → Controller node: publishes references (evidence: `README.md`)
- Controller node → Trajectory tracking: updates reference (evidence: `src/auv_control/src/auv_controller_node.cpp`)
- Controller node → T-S fuzzy control: computes command (evidence: `src/auv_control/src/auv_controller_node.cpp`)
- Controller node → Thrust allocation: allocates wrench (evidence: `src/auv_control/src/auv_controller_node.cpp`)
- Thrust allocation → Vehicle parameters: uses geometry
- Operator → Fault CLI: requests fault (evidence: `README.md`)
- Fault CLI → Controller node: calls fault service (evidence: `README.md`)
- Paper replay launch → Scenario runner: starts scenario (evidence: `src/auv_bringup/launch/reproduce_paper.launch.py`)
- Scenario runner → Controller node: injects fault (evidence: `README.md`)
- Paper replay launch → Signal recording: records signals (evidence: `src/auv_bringup/launch/reproduce_paper.launch.py`)
- Signal recording → Bag plotting: supplies bag (evidence: `README.md`)
- Operator → Dashboard launch: opens dashboard (evidence: `README.md`)
- Dashboard launch → ROS bridge: starts bridge (evidence: `src/auv_dashboard/launch/dashboard.launch.py`)
- Live dashboard → ROS bridge: streams ROS data (evidence: `README.md`)
- Live dashboard → Controller node: injects faults (evidence: `README.md`)
