An open API service indexing awesome lists of open source software.

https://github.com/bilgeswe/swe599

SWE599_ProjectPage
https://github.com/bilgeswe/swe599

Last synced: 5 months ago
JSON representation

SWE599_ProjectPage

Awesome Lists containing this project

README

          

uskudar_network_net_xml

# ๐Ÿ™๏ธ AV Simulation Project

> **Professional OpenDRIVE/OpenSCENARIO export system for Istanbul's รœskรผdar district, evolved from basic OSM data to advanced AV simulation pipeline.**

## ๐ŸŽฏ Project Overview

This project demonstrates the evolution from **basic OSM data processing** to **professional autonomous vehicle simulation** using real-world data from รœskรผdar, Istanbul.

### ๐Ÿ“Š **Final Achievement:**
- **๐Ÿ—บ๏ธ 9,421 nodes** and **24,157 road edges** covering รœskรผdar district
- **๐Ÿšฆ 42 traffic lights** with realistic behavior
- **๐Ÿ“ Geographic coverage:** 29.006ยฐ-29.092ยฐE, 40.992ยฐ-41.078ยฐN
- **๐Ÿ”ง Professional formats:** OpenDRIVE (16.3 MB) + OpenSCENARIO (6.8 KB)
- **๐ŸŽฎ Interactive simulation:** Ready for SUMO-GUI with moving traffic

## ๐Ÿ—๏ธ Two-Version Architecture

### **Version 1: Basic Method** (`v1_basic_method/`)
The foundation - basic OSM data fetching and simple SUMO conversion.

```bash
๐Ÿ—๏ธ PRIMITIVE METHOD
โ”œโ”€โ”€ Fetch OSM data for รœskรผdar โ†’ 7.4 MB .osm file
โ”œโ”€โ”€ Convert to basic SUMO โ†’ 12.3 MB .net.xml
โ””โ”€โ”€ Foundation for advanced processing
```

**Run:** `cd v1_basic_method && python fetch_and_convert.py`

### **Version 2: Advanced Method** (`v2_advanced_method/`)
Professional AV simulation with advanced algorithms and export systems.

```bash
๐Ÿš€ ADVANCED METHOD
โ”œโ”€โ”€ OpenDRIVE Export Algorithm โ†’ 16.3 MB .xodr
โ”œโ”€โ”€ OpenSCENARIO Export โ†’ 6.8 KB .xosc
โ”œโ”€โ”€ Intelligent Traffic Generation โ†’ Real edge IDs
โ”œโ”€โ”€ Professional SUMO Integration โ†’ Interactive simulation
โ””โ”€โ”€ Ready for AV development tools
```

**Run:** `cd v2_advanced_method && python advanced_uskudar_pipeline.py`

## ๐Ÿš€ Quick Start

### **Option 1: Full Pipeline (Recommended)**
```bash
# Step 1: Create foundation data
cd v1_basic_method
python fetch_and_convert.py

# Step 2: Build advanced simulation
cd ../v2_advanced_method
python advanced_uskudar_pipeline.py

# Step 3: Launch interactive simulation
cd output/uskudar/advanced_simulation
sumo-gui uskudar_simulation.sumocfg
```

### **Option 2: Use Existing Results**
```bash
# Launch our pre-built รœskรผdar simulation
cd v2_advanced_method/output/uskudar/opendrive_scenario
sumo-gui uskudar_simulation.sumocfg
```

## ๐Ÿ“ Repository Structure

```
SWE599/
โ”œโ”€โ”€ README.md # This file
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ v1_basic_method/ # ๐Ÿ—๏ธ VERSION 1: Foundation
โ”‚ โ”œโ”€โ”€ README.md
โ”‚ โ”œโ”€โ”€ fetch_and_convert.py # Main script
โ”‚ โ”œโ”€โ”€ data/ # OSM data (7.4 MB)
โ”‚ โ”œโ”€โ”€ osm_fetcher/ # Basic OSM tools
โ”‚ โ”œโ”€โ”€ converter/ # Basic conversion
โ”‚ โ””โ”€โ”€ utils/ # Utility functions
โ””โ”€โ”€ v2_advanced_method/ # ๐Ÿš€ VERSION 2: Advanced
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ advanced_uskudar_pipeline.py # Main advanced script
โ”œโ”€โ”€ add_traffic_uskudar.py # Traffic generation algorithm
โ”œโ”€โ”€ export_uskudar_simple.py # รœskรผdar-specific export
โ”œโ”€โ”€ test_export_simple.py # Testing framework
โ”œโ”€โ”€ exporters/ # Advanced export algorithms
โ”‚ โ”œโ”€โ”€ opendrive_exporter/ # OpenDRIVE export system
โ”‚ โ””โ”€โ”€ openscenario_exporter/ # OpenSCENARIO export system
โ”œโ”€โ”€ av_algorithms/ # AV-specific algorithms
โ”œโ”€โ”€ examples/ # Advanced examples
โ”œโ”€โ”€ validation/ # Validation tools
โ”œโ”€โ”€ visualization/ # Advanced visualization
โ”œโ”€โ”€ cli/ # Command-line interface
โ””โ”€โ”€ output/ # ๐ŸŽฏ GENERATED FILES
โ””โ”€โ”€ uskudar/
โ””โ”€โ”€ opendrive_scenario/ # Working simulation
โ”œโ”€โ”€ uskudar_network.xodr # 16.3 MB OpenDRIVE
โ”œโ”€โ”€ uskudar_av_scenario.xosc # 6.8 KB OpenSCENARIO
โ”œโ”€โ”€ uskudar_network.net.xml # 15.9 MB SUMO network
โ”œโ”€โ”€ uskudar_routes.rou.xml # Traffic routes
โ”œโ”€โ”€ uskudar_simulation.sumocfg # Complete simulation
โ””โ”€โ”€ export_summary.json # Statistics
```

## ๐Ÿ”ง Key Technologies & Algorithms

### **Version 1 Technologies:**
- **OSMnx** - OpenStreetMap data fetching
- **SUMO netconvert** - Basic network conversion
- **XML processing** - Data parsing

### **Version 2 Advanced Algorithms:**
- **๐Ÿ›ฃ๏ธ OpenDRIVE Exporter** - Professional road network format
- **๐ŸŽฌ OpenSCENARIO Exporter** - AV scenario testing format
- **๐Ÿšฆ Intelligent Traffic Generator** - Real edge ID extraction
- **๐ŸŽฎ SUMO Integration** - Complete simulation pipeline

## ๐Ÿ’ก Real-World Applications

### **๐Ÿš— Autonomous Vehicle Development**
- Test AV algorithms in realistic Istanbul traffic
- Use OpenSCENARIO for scenario-based validation
- Professional-grade simulation environment

### **๐Ÿ™๏ธ Urban Planning & Traffic Research**
- Analyze traffic patterns in รœskรผdar district
- Test traffic light optimization algorithms
- Study real-world urban mobility

### **๐Ÿ”ฌ Academic Research**
- Ready-to-use Istanbul traffic simulation
- Professional export formats for research tools
- Complete pipeline for similar cities

## ๐ŸŒ Geographic Coverage

- **๐Ÿ›๏ธ District:** รœskรผdar, Istanbul, Turkey
- **๐Ÿ“ Coordinates:** 29.006ยฐ-29.092ยฐE, 40.992ยฐ-41.078ยฐN
- **๐Ÿ—บ๏ธ Area:** Real urban district with complex road network
- **๐Ÿšฆ Infrastructure:** 42 traffic lights, major intersections

## ๐Ÿ”— Integration with Professional Tools

The generated files are compatible with:

- **๐ŸŽฎ esmini** - Load `.xodr` and `.xosc` for 3D simulation
- **๐ŸŽฏ Unreal Engine** - Import OpenDRIVE for photorealistic AV simulation
- **๐Ÿš— CARLA** - Use as custom map for AV research
- **๐Ÿญ IPG CarMaker** - Professional AV simulation platform
- **๐Ÿ“Š SUMO** - Traffic flow analysis and optimization

## ๐Ÿ“ฆ Installation & Dependencies

```bash
# Clone repository
git clone [repository-url]
cd SWE599

# Install Python dependencies
pip install -r requirements.txt

# Install SUMO (macOS)
brew install sumo

# Verify installation
sumo-gui --version
```

## ๐ŸŽ‰ Project Success Metrics

โœ… **Data Processing:** 7.4 MB OSM โ†’ 16.3 MB OpenDRIVE
โœ… **Network Scale:** 9,421 nodes, 24,157 edges
โœ… **Professional Formats:** OpenDRIVE + OpenSCENARIO export
โœ… **Interactive Simulation:** Working SUMO-GUI with traffic
โœ… **Real-World Data:** Actual Istanbul geography
โœ… **Algorithm Development:** Custom export and traffic generation
โœ… **Professional Integration:** Ready for AV development tools

---

**๐Ÿ“ง Contact:** Built for SWE599 - Advanced software development project
**๐Ÿ›๏ธ Location:** รœskรผdar, Istanbul, Turkey
**๐Ÿš€ Status:** Production-ready AV simulation environment