zappybiby / eurotruckautopilot Goto Github PK
View Code? Open in Web Editor NEWAutonomous Driving for Euro Truck Simulator 2
License: MIT License
Autonomous Driving for Euro Truck Simulator 2
License: MIT License
Hy, when i run it , i got only this
but he don't steering ! :-\ what i do wrong...
Once #2 is resolved, we would need to find the positions of the lines detected in order to calculate the center of the lane.
One way to do that would be to create a histogram of the merged binary threshold we currently use to isolate the road lines.
Then we would determine the two highest peaks in that histogram to find the left (closest to 0) and right (closest to width) lines. Afterwards, we would calculate the midpoint of the two peaks to find the center of the lane.
Having ETA remember lines will prevent noise from causing sudden deviations in the detected lane.
An example of this can be seen in this image which is taken from this website. The blue lines represent the current frame and the green lines represent the averaged past frames polynomial fit. In this example, the current frame has lines that significantly deviate from the averaged lines. A secondary objective would be to compare the line in the current frame against the averaged line in order to ignore lines that significantly deviate from the previous x lines.
One way of doing this would be to create an empty array that will store the previous x number of lanes which would then be averaged to draw a single extrapolated lane. This method is discussed here.
We are currently drawing one line at a time. We need to draw two lines simultaneously in order to calculate the center of the lane.
Implementing mouse movement into our program will allow it to drive the truck autonomously.
The two modules that could be used to do this are pyautogui
using its moveTo() function and win32api
using its mouse_event function as done here.
We can find the midpoint of the line that connects the left and right lane lines produced by our program in the Experimental branch
https://github.com/zappybiby/EuroTruckAutopilot/blob/EXPERIMENTAL/hough_lines.py#L16 to determine the center of the lane.
Here wot I think
#2
by #3a
1 / #3a
#3b
by #3c
if #3d is > some_number
, initiate turn (to prevent overcorrection)Currently ETA uses hardcoded coordinates to display OpenCV windows. This means that the windows may not display correctly for those that don't have a 1920x1080 monitor. We need to implement a way to have the windows resize/move so that they display alongside the ETS2 Window.
It might be beneficial to have ETA detect if there are two monitors available so that those windows can be displayed on the monitor opposite of ETS2
Using ctypes (windows only): https://code.activestate.com/recipes/460509-get-the-actual-and-usable-sizes-of-all-the-monitor/
Currently looking for a environment-agnostic method of doing this (future goal to make ETA work for mac/linux)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.