# manuelgantiva/asv_loyola_us_low_level architecture

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

- Interactive diagram: https://gitdiagram.com/manuelgantiva/asv_loyola_us_low_level
- Repository: https://github.com/manuelgantiva/asv_loyola_us_low_level

## Overview

This ROS 2 workspace implements low-level software for a surface-vehicle fleet. Its documented capabilities include Zigbee inter-ship communication, state estimation, trajectory control, interfaces, and launch configurations; the source also includes PWM/RC handling, recording, and a vehicle description. The visible control workflow includes Wang’s mid-level controller using trajectory functions to publish low-level references. Several other runtime connections are not established by the excerpts, so they are omitted rather than inferred.

Main entry points: [`asv_control/src/wang_mlc.cpp`](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/wang_mlc.cpp) (Wang Mid-Level), [`asv_control/src/rc_handler.cpp`](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/rc_handler.cpp) (RC Handler), [`asv_comunication/scripts/transceiver_xbee.py`](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_comunication/scripts/transceiver_xbee.py) (XBee Transceiver), [`asv_control/src/curvas_3.cpp`](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/curvas_3.cpp) (Trajectory Functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control and Estimation"]
  node_wang["Wang Mid-Level<br/>[wang_mlc.cpp]"]
  node_trajectories["Trajectory Functions<br/>[curvas_3.cpp]"]
  node_trajectory_alt["Other Trajectories<br/>[curvas.cpp]"]
  node_observer_liu["Liu Observer<br/>[observer_liu.cpp]"]
  node_observer_guille["Guille Observer"]
  node_observer_zono["Zono Observer<br/>[observer_zono.cpp]"]
  node_ref_llc["Low-Level Reference<br/>[ref_llc.cpp]"]
  node_ref_mlc["Mid-Level Reference<br/>[ref_mlc.cpp]"]
  node_apm_llc["APM Controller<br/>[apm_llc.cpp]"]
  node_ifac_llc["IFAC Controller<br/>[ifac_llc.cpp]"]
  node_mpc_llc["MPC Controller<br/>[mpc_llc.cpp]"]
  node_pwm_mux["PWM and LLC Routing<br/>[mux_llc.cpp]"]
  node_obs_mux["Observer Routing<br/>[mux_obs.cpp]"]
  node_rc_handler["RC Handler<br/>[rc_handler.cpp]"]
  node_pwm_mapper["PWM Mapper<br/>[pwm_mapper.cpp]"]
  node_interfaces["ROS Interfaces"]
end

subgraph group_comm["Fleet Communication"]
  node_xbee["XBee Transceiver"]
end

subgraph group_ops["Bringup and Recording"]
  node_bag_record[("Data Recorder<br/>[bag_record.cpp]")]
  node_launch["Launch Configurations"]
end

subgraph group_vehicle["Vehicle Model"]
  node_vehicle_description["ASV Description"]
end

node_operator(("Operator / Tests"))
node_fleet(("Fleet Vessels"))

node_wang -->|"calls functions"| node_trajectories
node_rc_handler -->|"calls services"| node_interfaces
node_operator -.->|"starts tests"| node_launch
node_xbee -.->|"communicates"| node_fleet

click node_wang "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/wang_mlc.cpp"
click node_trajectories "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/curvas_3.cpp"
click node_trajectory_alt "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/curvas.cpp"
click node_observer_liu "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_liu.cpp"
click node_observer_guille "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_guille.cpp"
click node_observer_zono "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_zono.cpp"
click node_ref_llc "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ref_llc.cpp"
click node_ref_mlc "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ref_mlc.cpp"
click node_apm_llc "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/apm_llc.cpp"
click node_ifac_llc "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ifac_llc.cpp"
click node_mpc_llc "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mpc_llc.cpp"
click node_pwm_mux "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mux_llc.cpp"
click node_obs_mux "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mux_obs.cpp"
click node_rc_handler "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/rc_handler.cpp"
click node_pwm_mapper "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/pwm_mapper.cpp"
click node_interfaces "https://github.com/manuelgantiva/asv_loyola_us_low_level/tree/main/asv_interfaces"
click node_xbee "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_comunication/scripts/transceiver_xbee.py"
click node_bag_record "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_comunication/src/bag_record.cpp"
click node_launch "https://github.com/manuelgantiva/asv_loyola_us_low_level/tree/main/asv_bringup/launch"
click node_vehicle_description "https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/yf_description/urdf/asv_loyola.urdf.xacro"

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_wang,node_trajectories,node_trajectory_alt,node_observer_liu,node_observer_guille,node_observer_zono,node_ref_llc,node_ref_mlc,node_apm_llc,node_ifac_llc,node_mpc_llc,node_pwm_mux,node_obs_mux,node_rc_handler,node_pwm_mapper,node_interfaces toneBlue
class node_xbee toneAmber
class node_bag_record,node_launch toneMint
class node_vehicle_description toneRose
class node_operator,node_fleet toneIndigo
```

## Components

### Control and Estimation

- [Wang Mid-Level](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/wang_mlc.cpp): `asv_control/src/wang_mlc.cpp`
- [Trajectory Functions](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/curvas_3.cpp): `asv_control/src/curvas_3.cpp`
- [Other Trajectories](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/curvas.cpp): `asv_control/src/curvas.cpp`
- [Liu Observer](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_liu.cpp): `asv_control/src/observer_liu.cpp`
- [Guille Observer](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_guille.cpp): `asv_control/src/observer_guille.cpp`
- [Zono Observer](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/observer_zono.cpp): `asv_control/src/observer_zono.cpp`
- [Low-Level Reference](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ref_llc.cpp): `asv_control/src/ref_llc.cpp`
- [Mid-Level Reference](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ref_mlc.cpp): `asv_control/src/ref_mlc.cpp`
- [APM Controller](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/apm_llc.cpp): `asv_control/src/apm_llc.cpp`
- [IFAC Controller](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/ifac_llc.cpp): `asv_control/src/ifac_llc.cpp`
- [MPC Controller](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mpc_llc.cpp): `asv_control/src/mpc_llc.cpp`
- [PWM and LLC Routing](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mux_llc.cpp): `asv_control/src/mux_llc.cpp`
- [Observer Routing](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/mux_obs.cpp): `asv_control/src/mux_obs.cpp`
- [RC Handler](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/rc_handler.cpp): `asv_control/src/rc_handler.cpp`
- [PWM Mapper](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_control/src/pwm_mapper.cpp): `asv_control/src/pwm_mapper.cpp`
- [ROS Interfaces](https://github.com/manuelgantiva/asv_loyola_us_low_level/tree/main/asv_interfaces): `asv_interfaces`

### Fleet Communication

- [XBee Transceiver](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_comunication/scripts/transceiver_xbee.py): `asv_comunication/scripts/transceiver_xbee.py`

### Bringup and Recording

- [Data Recorder](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/asv_comunication/src/bag_record.cpp): `asv_comunication/src/bag_record.cpp`
- [Launch Configurations](https://github.com/manuelgantiva/asv_loyola_us_low_level/tree/main/asv_bringup/launch): `asv_bringup/launch`

### Vehicle Model

- [ASV Description](https://github.com/manuelgantiva/asv_loyola_us_low_level/blob/main/yf_description/urdf/asv_loyola.urdf.xacro): `yf_description/urdf/asv_loyola.urdf.xacro`

### Other components

- **Operator / Tests**
- **Fleet Vessels**

## Connections

- Wang Mid-Level → Trajectory Functions: calls functions (evidence: `asv_control/src/wang_mlc.cpp`)
- RC Handler → ROS Interfaces: calls services (evidence: `asv_control/src/rc_handler.cpp`)
- Operator / Tests → Launch Configurations: starts tests
- XBee Transceiver → Fleet Vessels: communicates (evidence: `README.md`)
