# uppishdonkey/dronepathplanningpt2 architecture

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

- Interactive diagram: https://gitdiagram.com/uppishdonkey/dronepathplanningpt2
- Repository: https://github.com/uppishdonkey/dronepathplanningpt2

## Overview

This repository contains scripts for drone navigation and path-planning experiments in CoppeliaSim. The main test1 workflow scans the course with LiDAR, builds an obstacle grid, plans collision-aware routes for multiple drones, simulates their flight, and records results for plotting. Separate scripts provide standalone A* navigation and a noise-sensitivity experiment. The excerpts show the main data handoffs and shared simulator utilities; the README gives no further capability detail, and some modules are indexed but not excerpted.

Main entry points: [`test1/scan_map.py`](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/scan_map.py) (LiDAR mapping and SLAM), [`test1/fly_drone.py`](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/fly_drone.py) (Flight simulation), [`test1/plan_path.py`](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/plan_path.py) (Multi-drone path planner), [`shared/sim_tools.py`](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/sim_tools.py) (Simulator tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_course["Course and simulation"]
  node_environment["Course settings<br/>[environment.py]"]
  node_setup["Scene setup"]
  node_simtools["Simulator tools<br/>[sim_tools.py]"]
  node_aliases["Domain types<br/>[aliases.py]"]
end

subgraph group_workflow["Mapping and flight"]
  node_scan["LiDAR mapping and SLAM<br/>[scan_map.py]"]
  node_buildmap["Obstacle grid builder<br/>[build_map.py]"]
  node_planning["Multi-drone path planner<br/>[plan_path.py]"]
  node_flight["Flight simulation<br/>[fly_drone.py]"]
  node_helpers["Grid and clearance helpers<br/>[helpers.py]"]
  node_files["Test data paths<br/>[files.py]"]
  node_pointcloud["Point cloud and SLAM data"]
  node_mapdata["Obstacle map"]
  node_pathsdata["Planned paths"]
  node_flightdata["Flight results"]
end

subgraph group_analysis["Experiments and analysis"]
  node_plots["Path visualization<br/>[plots.py]"]
  node_astar["Standalone A* navigation"]
  node_move["Drone movement script<br/>[move_drone.py]"]
  node_noise["Noise experiment"]
  node_noiseresults["Noise results<br/>[noise_results.csv]"]
end

node_user(("Experiment operator"))
node_sim["CoppeliaSim"]

node_user -.->|"runs scene setup"| node_setup
node_setup -->|"uses simulator tools"| node_simtools
node_setup -->|"reads settings"| node_environment
node_simtools -->|"controls simulation"| node_sim
node_simtools -->|"uses types"| node_aliases
node_scan -->|"reads LiDAR"| node_simtools
node_scan -->|"uses course settings"| node_environment
node_scan -->|"uses types"| node_aliases
node_scan -->|"uses data paths"| node_files
node_scan -->|"writes scans"| node_pointcloud
node_buildmap -->|"reads scan data"| node_pointcloud
node_buildmap -->|"writes grid"| node_mapdata
node_buildmap -->|"uses grid helpers"| node_helpers
node_planning -->|"reads grid"| node_mapdata
node_planning -->|"uses path helpers"| node_helpers
node_planning -->|"reads starts and targets"| node_environment
node_planning -->|"writes routes"| node_pathsdata
node_flight -->|"reads routes"| node_pathsdata
node_flight -->|"moves drones"| node_simtools
node_flight -->|"checks clearance"| node_helpers
node_flight -->|"uses course settings"| node_environment
node_flight -->|"writes outcomes"| node_flightdata
node_plots -->|"reads planned routes"| node_pathsdata
node_plots -->|"reads flown routes"| node_flightdata
node_noise -->|"writes experiment results"| node_noiseresults
node_user -.->|"runs mapping"| node_scan
node_user -.->|"runs grid build"| node_buildmap
node_user -.->|"runs planning"| node_planning
node_user -.->|"runs flight"| node_flight
node_user -.->|"runs plotting"| node_plots
node_user -.->|"runs navigation"| node_astar
node_user -.->|"runs movement"| node_move
node_user -.->|"runs experiment"| node_noise

click node_environment "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/environment.py"
click node_setup "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/setup_environment.py"
click node_simtools "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/sim_tools.py"
click node_aliases "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/aliases.py"
click node_scan "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/scan_map.py"
click node_buildmap "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/build_map.py"
click node_planning "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/plan_path.py"
click node_flight "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/fly_drone.py"
click node_helpers "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/helpers.py"
click node_files "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/files.py"
click node_pointcloud "https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data"
click node_mapdata "https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data"
click node_pathsdata "https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data"
click node_flightdata "https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/results"
click node_plots "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/plots.py"
click node_astar "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/astar_navigation.py"
click node_move "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/move_drone.py"
click node_noise "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/noise_experiment.py"
click node_noiseresults "https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/results/noise_results.csv"

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_environment,node_setup,node_simtools,node_aliases toneBlue
class node_scan,node_buildmap,node_planning,node_flight,node_helpers,node_files,node_pointcloud,node_mapdata,node_pathsdata,node_flightdata toneAmber
class node_plots,node_astar,node_move,node_noise,node_noiseresults toneMint
class node_user,node_sim toneIndigo
```

## Components

### Course and simulation

- [Course settings](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/environment.py): `shared/environment.py`
- [Scene setup](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/setup_environment.py): `shared/setup_environment.py`
- [Simulator tools](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/sim_tools.py): `shared/sim_tools.py`
- [Domain types](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/aliases.py): `shared/aliases.py`

### Mapping and flight

- [LiDAR mapping and SLAM](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/scan_map.py): `test1/scan_map.py`
- [Obstacle grid builder](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/build_map.py): `test1/build_map.py`
- [Multi-drone path planner](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/plan_path.py): `test1/plan_path.py`
- [Flight simulation](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/fly_drone.py): `test1/fly_drone.py`
- [Grid and clearance helpers](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/shared/helpers.py): `shared/helpers.py`
- [Test data paths](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/files.py): `test1/files.py`
- [Point cloud and SLAM data](https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data): `test1/data`
- [Obstacle map](https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data): `test1/data`
- [Planned paths](https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/data): `test1/data`
- [Flight results](https://github.com/uppishdonkey/dronepathplanningpt2/tree/main/test1/results): `test1/results`

### Experiments and analysis

- [Path visualization](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/test1/plots.py): `test1/plots.py`
- [Standalone A* navigation](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/astar_navigation.py): `astar_navigation.py`
- [Drone movement script](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/move_drone.py): `move_drone.py`
- [Noise experiment](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/noise_experiment.py): `noise_experiment.py`
- [Noise results](https://github.com/uppishdonkey/dronepathplanningpt2/blob/main/results/noise_results.csv): `results/noise_results.csv`

### Other components

- **Experiment operator**
- **CoppeliaSim**

## Connections

- Experiment operator → Scene setup: runs scene setup
- Scene setup → Simulator tools: uses simulator tools (evidence: `shared/setup_environment.py`)
- Scene setup → Course settings: reads settings (evidence: `shared/setup_environment.py`)
- Simulator tools → CoppeliaSim: controls simulation (evidence: `shared/sim_tools.py`)
- Simulator tools → Domain types: uses types (evidence: `shared/sim_tools.py`)
- LiDAR mapping and SLAM → Simulator tools: reads LiDAR (evidence: `test1/scan_map.py`)
- LiDAR mapping and SLAM → Course settings: uses course settings (evidence: `test1/scan_map.py`)
- LiDAR mapping and SLAM → Domain types: uses types (evidence: `test1/scan_map.py`)
- LiDAR mapping and SLAM → Test data paths: uses data paths (evidence: `test1/scan_map.py`)
- LiDAR mapping and SLAM → Point cloud and SLAM data: writes scans (evidence: `test1/scan_map.py`)
- Obstacle grid builder → Point cloud and SLAM data: reads scan data (evidence: `test1/build_map.py`)
- Obstacle grid builder → Obstacle map: writes grid (evidence: `test1/build_map.py`)
- Obstacle grid builder → Grid and clearance helpers: uses grid helpers (evidence: `test1/build_map.py`)
- Multi-drone path planner → Obstacle map: reads grid (evidence: `test1/plan_path.py`)
- Multi-drone path planner → Grid and clearance helpers: uses path helpers (evidence: `test1/plan_path.py`)
- Multi-drone path planner → Course settings: reads starts and targets (evidence: `test1/plan_path.py`)
- Multi-drone path planner → Planned paths: writes routes (evidence: `test1/plan_path.py`)
- Flight simulation → Planned paths: reads routes (evidence: `test1/fly_drone.py`)
- Flight simulation → Simulator tools: moves drones (evidence: `test1/fly_drone.py`)
- Flight simulation → Grid and clearance helpers: checks clearance (evidence: `test1/fly_drone.py`)
- Flight simulation → Course settings: uses course settings (evidence: `test1/fly_drone.py`)
- Flight simulation → Flight results: writes outcomes (evidence: `test1/fly_drone.py`)
- Path visualization → Planned paths: reads planned routes (evidence: `test1/plots.py`)
- Path visualization → Flight results: reads flown routes (evidence: `test1/plots.py`)
- Noise experiment → Noise results: writes experiment results (evidence: `noise_experiment.py`)
- Experiment operator → LiDAR mapping and SLAM: runs mapping
- Experiment operator → Obstacle grid builder: runs grid build
- Experiment operator → Multi-drone path planner: runs planning
- Experiment operator → Flight simulation: runs flight
- Experiment operator → Path visualization: runs plotting
- Experiment operator → Standalone A* navigation: runs navigation
- Experiment operator → Drone movement script: runs movement
- Experiment operator → Noise experiment: runs experiment
