graph LR
A[Perception] -->|Detected Objects| B[Planning]
B -->|Target Path| C[Control]
C -->|Vehicle Motion| A
-
Perception System
- Obstacle detection within sensor range
- Traffic light state recognition
- Distance calculation to objects
-
Planning System
- Reference path generation
- Dynamic path modification for obstacle avoidance
- Traffic light response logic (stop/slow down)
-
Control System
- Lookahead point tracking
- Steering angle calculation
- Speed regulation with acceleration profiles
Ensure you have Python 3.7+ and the required libraries:
pip install matplotlib numpyTo run the simulation:
python Car.pyMake sure your file is named appropriately, or change the filename accordingly.
self-driving-car-simulator/
├── Car.py # Main simulation code
├── README.md # Project documentation
- Python 3.7+
- NumPy
- Matplotlib
git clone https://github.com/yourusername/Car.git
cd Car
pip install -r requirements.txt
python simulation.pyThe animation shows:
- Autonomous vehicle (blue rectangle)
- Planned path (blue line)
- Obstacles (red circles)
- Traffic light (color-coded indicator)
- Lane markings (dashed lines)
- Dynamic speed display
Contributions are welcome! Please fork the repository
