This project consists of a Python backend API and a React frontend. Follow the steps below to set up and run both.
- Python 3.8+
- Node.js 16+ and npm
- Git
cd backendpython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython main.pyThe backend API will start running and serve requests from the frontend.
cd frontendnpm installnpm startor
npm run devThe frontend will open in your browser, typically at http://localhost:5173 (Vite default).
If you want to set up both backend and frontend from the root directory:
# Backend setup
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# In one terminal, run the backend
python main.py
# In another terminal, set up and run the frontend
cd ../frontend
npm install
npm startTo run the complete pipeline (data loading, routing, and visualization):
cd backend
source venv/bin/activate
python main.pyThis will:
- Load the data.
- Solve the routing problem.
- Generate the
drone_missions_map.htmlfile in the project root.
You can then open drone_missions_map.html in your browser to view the interactive map of drone missions.
.
├── data/
│ ├── asset_indexes.npy
│ ├── distance_matrix.npy
│ ├── photo_indexes.npy
│ ├── points_lat_long.npy
│ ├── polygon_lon_lat.wkt
│ ├── predecessors.npy
│ ├── waypoint_indexes.npy
├── src/
│ ├── __init__.py
│ ├── config.py
│ ├── data_loader.py
│ ├── routing.py
│ ├── path_decoder.py
│ ├── visualize.py
├── main.py
├── requirements.txt
├── .gitignore
├── venv/
└── drone_missions_map.html
data/: Contains input data files.src/: Contains modular Python scripts for the pipeline.main.py: Entry point for the pipeline.requirements.txt: Lists Python dependencies..gitignore: Specifies files to ignore in version control.drone_missions_map.html: Output file with the interactive map.
-
Virtual Environment Not Activated:
- Ensure you see
(venv)in your terminal prompt. - Run
source venv/bin/activateto activate the virtual environment.
- Ensure you see
-
Missing Dependencies:
- Run
pip install -r requirements.txtto install all required packages.
- Run
-
Index Out of Bounds Errors:
- Ensure all
.npyand.wktfiles are in thedata/directory.
- Ensure all
Refer to the official documentation for tools used in this project: