Over the course of two years,
- 🎮 We used "Assetto Corsa" and "BeamNG.drive" to test.
- 🌃 And coded our simulator in Unity.
- 🎥 We hacked an RC ride-on car and attached a camera to show the real world to our AI.
- 🚘 Then we optimized our entire AI system to work with cars instead of trucks in ETS2. When we tested the project on real roads with a real car, we obtained outstanding results with only 37 minutes of driving dataset (all data is syntetic).
- 🛑 Additionally, we collected a dataset for detecting traffic signs in Türkiye (~20.000 images), and our project is compatible with both SSD and YOLO models for receiving instructions.
- 📐 Moreover, the project can use the RealSense depth camera to measure the distance between detected objects and adjust throttle input.
In this video, the program processes the image of the screen, gives it to the artificial intelligence model, turns the steering wheel according to the result.
I drove the vehicle for 1 hour and also collected data and saved them in a CSV file. I trained the data in the CSV file using the method and model in this link.
The model gives us a pixel value equal to the steering angle of the steering wheel. Then the mouse is moved to this pixel value.
There are things you need to do before running codes:
- You need to install Python (I used version 3.7.9),
- You have to install the components I use. If this is your first time using Python type in cmd:
python -m pip install -r requirements.txt
- Change the Windows cursor speed to 4
- Set the game to full screen and at 1280x720 resolution,
- Adjust your seat to be the same as in the picture,
- Type in console (enable console):
c_rsteersens 0.325500
Move game window top-left corner (or full screen) and make the steering wheel centered. Press F1 and stop game, run the code and turn back to game. Code will take over steering control. You must not move your mouse before code start. (Press F1 to stop the code) (Hold "Z" to pass to left lane, hold "X" to pass to right lane)
They were driving the car using only the A and D keys. It was working with bunch of if-else' instead deep learning.
❗ Not compatible over 1.40. SCS has changed the way mouse steering works. I wrote new controller that can be used with newer versions of ETS2, but I am hesitant to release it due to fear of being sued.
Not compatible over 1.40. Because high beams don't affect shadows.
Shadows can confuse the model (for example this clip). To avoid this you can use high beams.
The supervised learning model is powerful as dataset. If you use 5 or 10 hours of driving footage instead of 1 hour, the model performance will increase amazingly.
If I do it before you do, I'll upload the model here ;) Now I am trying to reduce dataset size while increasing accuracy
✅ Lane changing⚙️ Adaptive cruise control✅ Emergency brakeExport as exe file- It's not over until we win
Special thanks to r/trucksim and r/Python.