Giter VIP home page Giter VIP logo

hope-autonomous-driving's Introduction

hope-autonomous-driving

Autonomous Driving project for Euro Truck Simulator 2

Video:

working

How is it working ?

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.

vision 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.


I want to run this

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
  • cursor
  • Set the game to full screen and at 1280x720 resolution,
  • Adjust your seat to be the same as in the picture,
  • seat
  • Type in console (enable console):
c_rsteersens 0.325500
  • wheel

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)

Older Versions

They were driving the car using only the A and D keys. It was working with bunch of if-else' instead deep learning.

Limitations

Not compatible with 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 ;)

What's Next

  • ✅ Lane changing
  • ⚙️ Adaptive cruise control
  • Emergency brake
  • Export as exe file

License

MIT

Special thanks to r/trucksim and /Python.

hope-autonomous-driving's People

Contributors

umutkcbs avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.