# seongilheo/mushr-ros architecture

> Architecture diagram of the GitHub repository seongilheo/mushr-ros, 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/seongilheo/mushr-ros
- Repository: https://github.com/seongilheo/mushr-ros

## Overview

MuSHR ROS is a ROS Noetic/catkin project for the MuSHR simulator. Its main robot workflow is to start the simulator, estimate vehicle pose with particle-filter localization, plan a route through a roadmap, and track a path with a controller; the README documents these as separate launch commands, so their runtime integration is not asserted here. The repository also includes introductory ROS examples and shared utilities, maps, and launch files. Internal call links follow the source index or excerpts; unsampled launch wiring is not inferred.

Main entry points: [`control/src/control/control_ros.py`](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/control_ros.py) (Controller ROS adapter), [`planning/src/planning/planner_ros.py`](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/planner_ros.py) (Planner ROS node), [`localization/src/localization/particle_filter.py`](https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/particle_filter.py) (Particle filter), [`control/src/control/controller.py`](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/controller.py) (Controller loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared resources"]
  node_maps["Maps"]
  node_shared_utils["ROS utilities<br/>[utils.py]"]
  node_collector["Data collector<br/>[collector.py]"]
  node_frechet["Fréchet distance<br/>[frechet.py]"]
end

subgraph group_intro["ROS examples"]
  node_fibonacci["Fibonacci example<br/>[fibonacci.py]"]
  node_indexing["Indexing example<br/>[indexing.py]"]
  node_listener["Pose listener<br/>[listener.py]"]
end

subgraph group_localization["Localization"]
  node_motion_model["Motion model<br/>[motion_model.py]"]
  node_sensor_model["Laser sensor model<br/>[sensor_model.py]"]
  node_resampler["Particle resampler<br/>[resampler.py]"]
  node_particle_filter["Particle filter<br/>[particle_filter.py]"]
end

subgraph group_planning["Planning"]
  node_planner_ros["Planner ROS node<br/>[planner_ros.py]"]
  node_roadmap["Roadmap<br/>[roadmap.py]"]
  node_samplers["State samplers<br/>[samplers.py]"]
  node_problems["Planning problems<br/>[problems.py]"]
  node_dubins["Dubins paths<br/>[dubins.py]"]
  node_search["A-star search<br/>[search.py]"]
end

subgraph group_control["Path control"]
  node_controller_ros["Controller ROS adapter<br/>[control_ros.py]"]
  node_controller["Controller loop<br/>[controller.py]"]
  node_pid["PID controller<br/>[pid.py]"]
  node_purepursuit["Pure Pursuit<br/>[purepursuit.py]"]
  node_mpc["MPC controller<br/>[mpc.py]"]
  node_path_generator["Path generator<br/>[path_generator.py]"]
end

node_operator(("Operator"))
node_simulator["MuSHR simulator"]

node_operator -->|"launches"| node_simulator
node_operator -->|"launches localization"| node_particle_filter
node_operator -->|"launches planning"| node_planner_ros
node_operator -->|"launches control"| node_controller_ros
node_indexing -->|"imports"| node_fibonacci
node_particle_filter -->|"uses"| node_motion_model
node_particle_filter -->|"uses"| node_sensor_model
node_particle_filter -->|"uses"| node_resampler
node_planner_ros -->|"calls"| node_search
node_planner_ros -->|"uses"| node_problems
node_planner_ros -->|"uses"| node_roadmap
node_planner_ros -->|"uses"| node_samplers
node_roadmap -->|"queries"| node_problems
node_roadmap -->|"uses"| node_samplers
node_problems -->|"uses"| node_dubins
node_search -->|"uses queue"| node_shared_utils
node_controller_ros -->|"runs"| node_controller
node_controller_ros -->|"selects"| node_pid
node_controller_ros -->|"selects"| node_purepursuit
node_controller_ros -->|"selects"| node_mpc
node_pid -->|"extends"| node_controller
node_purepursuit -->|"extends"| node_controller
node_mpc -->|"extends"| node_controller
node_mpc -->|"uses"| node_motion_model
node_controller_ros -->|"uses"| node_shared_utils

click node_maps "https://github.com/seongilheo/mushr-ros/tree/main/cse478/maps"
click node_shared_utils "https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/utils.py"
click node_collector "https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/collector.py"
click node_frechet "https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/frechet.py"
click node_fibonacci "https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/fibonacci.py"
click node_indexing "https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/indexing.py"
click node_listener "https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/listener.py"
click node_motion_model "https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/motion_model.py"
click node_sensor_model "https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/sensor_model.py"
click node_resampler "https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/resampler.py"
click node_particle_filter "https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/particle_filter.py"
click node_planner_ros "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/planner_ros.py"
click node_roadmap "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/roadmap.py"
click node_samplers "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/samplers.py"
click node_problems "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/problems.py"
click node_dubins "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/dubins.py"
click node_search "https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/search.py"
click node_controller_ros "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/control_ros.py"
click node_controller "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/controller.py"
click node_pid "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/pid.py"
click node_purepursuit "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/purepursuit.py"
click node_mpc "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/mpc.py"
click node_path_generator "https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/path_generator.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_maps,node_shared_utils,node_collector,node_frechet toneBlue
class node_fibonacci,node_indexing,node_listener toneAmber
class node_motion_model,node_sensor_model,node_resampler,node_particle_filter toneMint
class node_planner_ros,node_roadmap,node_samplers,node_problems,node_dubins,node_search toneRose
class node_controller_ros,node_controller,node_pid,node_purepursuit,node_mpc,node_path_generator,node_operator,node_simulator toneIndigo
```

## Components

### Shared resources

- [Maps](https://github.com/seongilheo/mushr-ros/tree/main/cse478/maps): `cse478/maps`
- [ROS utilities](https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/utils.py): `cse478/src/cse478/utils.py`
- [Data collector](https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/collector.py): `cse478/src/cse478/collector.py`
- [Fréchet distance](https://github.com/seongilheo/mushr-ros/blob/main/cse478/src/cse478/frechet.py): `cse478/src/cse478/frechet.py`

### ROS examples

- [Fibonacci example](https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/fibonacci.py): `introduction/src/introduction/fibonacci.py`
- [Indexing example](https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/indexing.py): `introduction/src/introduction/indexing.py`
- [Pose listener](https://github.com/seongilheo/mushr-ros/blob/main/introduction/src/introduction/listener.py): `introduction/src/introduction/listener.py`

### Localization

- [Motion model](https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/motion_model.py): `localization/src/localization/motion_model.py`
- [Laser sensor model](https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/sensor_model.py): `localization/src/localization/sensor_model.py`
- [Particle resampler](https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/resampler.py): `localization/src/localization/resampler.py`
- [Particle filter](https://github.com/seongilheo/mushr-ros/blob/main/localization/src/localization/particle_filter.py): `localization/src/localization/particle_filter.py`

### Planning

- [Planner ROS node](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/planner_ros.py): `planning/src/planning/planner_ros.py`
- [Roadmap](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/roadmap.py): `planning/src/planning/roadmap.py`
- [State samplers](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/samplers.py): `planning/src/planning/samplers.py`
- [Planning problems](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/problems.py): `planning/src/planning/problems.py`
- [Dubins paths](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/dubins.py): `planning/src/planning/dubins.py`
- [A-star search](https://github.com/seongilheo/mushr-ros/blob/main/planning/src/planning/search.py): `planning/src/planning/search.py`

### Path control

- [Controller ROS adapter](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/control_ros.py): `control/src/control/control_ros.py`
- [Controller loop](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/controller.py): `control/src/control/controller.py`
- [PID controller](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/pid.py): `control/src/control/pid.py`
- [Pure Pursuit](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/purepursuit.py): `control/src/control/purepursuit.py`
- [MPC controller](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/mpc.py): `control/src/control/mpc.py`
- [Path generator](https://github.com/seongilheo/mushr-ros/blob/main/control/src/control/path_generator.py): `control/src/control/path_generator.py`

### Other components

- **Operator**
- **MuSHR simulator**

## Connections

- Operator → MuSHR simulator: launches (evidence: `README.md`)
- Operator → Particle filter: launches localization (evidence: `README.md`)
- Operator → Planner ROS node: launches planning (evidence: `README.md`)
- Operator → Controller ROS adapter: launches control (evidence: `README.md`)
- Indexing example → Fibonacci example: imports (evidence: `introduction/src/introduction/indexing.py`)
- Particle filter → Motion model: uses (evidence: `localization/src/localization/particle_filter.py`)
- Particle filter → Laser sensor model: uses (evidence: `localization/src/localization/particle_filter.py`)
- Particle filter → Particle resampler: uses (evidence: `localization/src/localization/particle_filter.py`)
- Planner ROS node → A-star search: calls (evidence: `planning/src/planning/planner_ros.py`)
- Planner ROS node → Planning problems: uses (evidence: `planning/src/planning/planner_ros.py`)
- Planner ROS node → Roadmap: uses (evidence: `planning/src/planning/planner_ros.py`)
- Planner ROS node → State samplers: uses (evidence: `planning/src/planning/planner_ros.py`)
- Roadmap → Planning problems: queries (evidence: `planning/src/planning/roadmap.py`)
- Roadmap → State samplers: uses (evidence: `planning/src/planning/roadmap.py`)
- Planning problems → Dubins paths: uses (evidence: `planning/src/planning/problems.py`)
- A-star search → ROS utilities: uses queue (evidence: `planning/src/planning/search.py`)
- Controller ROS adapter → Controller loop: runs (evidence: `control/src/control/control_ros.py`)
- Controller ROS adapter → PID controller: selects (evidence: `control/src/control/control_ros.py`)
- Controller ROS adapter → Pure Pursuit: selects (evidence: `control/src/control/control_ros.py`)
- Controller ROS adapter → MPC controller: selects (evidence: `control/src/control/control_ros.py`)
- PID controller → Controller loop: extends (evidence: `control/src/control/pid.py`)
- Pure Pursuit → Controller loop: extends (evidence: `control/src/control/purepursuit.py`)
- MPC controller → Controller loop: extends (evidence: `control/src/control/mpc.py`)
- MPC controller → Motion model: uses (evidence: `control/src/control/mpc.py`)
- Controller ROS adapter → ROS utilities: uses (evidence: `control/src/control/control_ros.py`)
