Skip to content

Canvas painted project written in Flutter/Dart without 3rd-party libraries.

License

Notifications You must be signed in to change notification settings

matejhocevar/self_driving_car

Repository files navigation

Self-Driving Car project

Self-Driving Car

Canvas painted project written in Flutter/Dart without 3rd-party libraries.

Preview

Project contains two game modes:

  • Infinity road with endless traffic spawn
  • Virtual world with editor builder
Infinity road Virtual world
Infinity road Virtual world

Project features

  • 🛠️ Configurable world with custom settings
  • 🕹 Manual steering controls
  • 📈 Custom Neural network
  • 🧰 Toolbar with various actions
  • 🚗 20+ different car models
  • 🗺️ Minimap
  • 🗂️ Load/Save/Import world actions
  • 🏡 Pseudo-generated buildings & trees
  • 🧭 Shortest path finding algorithms (Dijkstra + more coming soon)

Build editor

In build editor you are enable you to edit:

  • 🛣 Road builder supported by spacial graph
  • 🛑 Stop sign
  • ⚠️️ Yield sign
  • 🚦 Traffic lights system
  • 🚸 Crossing marking
  • 🅿️ Parking marking
  • 🏎️ Start marking position
  • 🏁 Target marking position
Build editor

Import from Open Street map

Parser will extract the following data:

  • 🏠 Buildings
  • 🛣 Roads️
  • 🌊 Water areas
  • 🌲 Tree areas
  • 🦦 Rivers
  • 🌾 All land field types
Real world example

Fetching the data

Open Street map data can be fetch via overpass turbo with the following query:

[out:json];
(
  // Routes
  way['highway']
  ['highway' !~ 'pedestrian']
  ['highway' !~ 'footway']
  ['highway' !~ 'cycleway']
  ['highway' !~ 'path']
  ['highway' !~ 'service']
  ['highway' !~ 'corridor']
  ['highway' !~ 'track']
  ['highway' !~ 'steps']
  ['highway' !~ 'raceway']
  ['highway' !~ 'bridleway']
  ['highway' !~ 'proposed']
  ['highway' !~ 'construction']
  ['highway' !~ 'elevator']
  ['highway' !~ 'bus_guideway']
  ['access' !~ 'private']
  ['access' !~ 'no']
  ({{bbox}});
  
  // Buildings
  way['building']({{bbox}});
  
  // Lands
  way["natural"]({{bbox}});
  way["landuse"]({{bbox}});
  relation["natural"]({{bbox}});
  relation["landuse"]({{bbox}});
  
  // Rivers
  way["waterway"]({{bbox}});
  
  // Waterbodies
  node["natural"="water"]({{bbox}});
  way["natural"="water"]({{bbox}});
  relation["natural"="water"]({{bbox}});
);

out body;	// Full body, not just summary
>;
out skel;	// Remove some extra details

Supported platforms

  • 🖥️ Desktop (macOS, Linux, Windows)
  • 📱 Mobile (iOS, Android)
  • 🔗 Web

Special Thank You

Special thanks to Radu Mariescu-Istodor for:

Thank you! 🙏