A self-driving car simulation project that combines game development tools with computer vision and AI techniques. Built with Bevy Engine and enhanced with Python-based image recognition.
Bevy Simulator is an engineering simulation project that demonstrates self-driving capabilities using game development tools. The project creates a virtual environment where a vehicle can be controlled manually or autonomously through computer vision techniques.
The simulation uses the Bevy game engine to create the physics and environment, while Python scripts handle image recognition through OpenCV and YOLOv8. The system detects road edges and uses PID controllers to keep the vehicle on track.
- Interactive Simulation: Drive a vehicle manually using keyboard controls
- Environmental Generation: Procedurally generated roads and obstacles
- Computer Vision Integration: Real-time image processing with OpenCV
- Self-Driving Capabilities: PID-based autonomous driving using edge detection
- Dual Window System: Main game window and secondary vision processing window
- Interprocess Communication: Bidirectional data exchange between Rust and Python
- Bevy Engine: Modern data-driven game engine written in Rust
- Rust: Systems programming language that guarantees memory safety
- Python: Scripting language for computer vision implementation
- OpenCV: Open source computer vision and machine learning library
- YOLOv8: Real-time object detection system
- Interprocess Communication: Custom protocol for Rust-Python communication
- Clone the Repository
git clone https://github.com/username/bevy-simulator.git
cd bevy-simulator- Rust Setup
- Ensure Rust and Cargo are installed on your system
- Cargo will automatically handle all Bevy dependencies
- Python Setup
- Navigate to the Python module directory:
cd src/game/python- Python Setup Continued
- Follow the instructions in the Python README to set up the AI components
- Arrow Keys: Drive the vehicle (up/down for acceleration/braking, left/right for steering)
- G Key: Change gears
- Tab Key: Toggle the secondary window for image recognition visualization (automatically starts autonomous driving)
- 📁 bevy_sim
📌 Note: Folders with 🔗 links contain their own README files with more detailed documentation
| John Klucinec Game States • UI • IPC • Image Recognition |
Brant Cass World Generation • PID Controls |
Ramiro Covarrubias Car Physics • PID Controls |
Alex Collins Initial Planning • Documentation |
This project was created as part of the CS 462 course, Spring 2025