ETS2LA / Euro-Truck-Simulator-2-Lane-Assist

Plugin based interface program for ETS2/ATS.
http://wiki.ets2la.com/
MIT License
188 stars 21 forks source link

Missing The 'linux/input.h' - Windows #26

Closed scorpio1441 closed 11 months ago

scorpio1441 commented 1 year ago

I'm trying to run the newest v2.0-rewrite on Windows and apparently evdev requires linux/input.h

      The 'linux/input.h' and 'linux/input-event-codes.h' include files
      are missing. You will have to install the kernel header files in
      order to continue:
Tumppi066 commented 1 year ago

That is a bug that I'll fix today, you can fix it by removing the 'app/plugins/EvdevControler' folder.

Tumppi066 commented 1 year ago

This should now be solved in the newest update I did 👍

scorpio1441 commented 1 year ago

@Tumppi066 Thanks, but now the First Time Panel won't start:

[0.031] [src\logger.py]  - Logger initialized!
[0.125] [src\settings.py]        - ('Theme',)
[0.344] [main.py]     - ("No module named 'evdev'",)
pygame 2.5.0 (SDL 2.28.0, Python 3.9.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
[0.531] [src\settings.py]        - ('LSTRDrawLanes',)
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-2.0-rewrite\src\mainUI.py", line 59, in <lambda>
    helpers.MakeButton(pluginFrame, "First Time Setup", lambda: switchSelectedPlugin("plugins.FirstTimeSetup.main"), 2, 0, width=20, style="Accent.TButton")
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-2.0-rewrite\src\mainUI.py", line 127, in switchSelectedPlugin
    ui = plugin.UI(pluginFrame)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-2.0-rewrite\plugins\FirstTimeSetup\main.py", line 47, in __init__
    self.page0()
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-2.0-rewrite\plugins\FirstTimeSetup\main.py", line 71, in page0
    self.logo = self.logo.resize((width, height), Image.ANTIALIAS)
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
Tumppi066 commented 1 year ago

Have you tried restarting the app?

If so then do this.

Installed with installer:

Installed from source:

scorpio1441 commented 1 year ago

@Tumppi066 Same thing

Tumppi066 commented 1 year ago

@rknetwork

Ok that's interesting pillow really should be working. Can you run this command like you did the last ones?

pip show pillow

And then tell me the version.

scorpio1441 commented 1 year ago

@Tumppi066 Got it fixed:

Search and replace this: Image.ANTIALIAS

with this:

resample=Image.LANCZOS

Tumppi066 commented 1 year ago

Yup I for some reason your pillow doesn't include the default ANTIALIAS ._.

In any case good that you got it fixed, will add that to the FAQ on discord!

scorpio1441 commented 1 year ago

@Tumppi066 Also, I just wiped the whole thing and decided to start from scratch using installer, here is what was missing in vdev:

D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\Scripts

pip install sv_ttk psutil pillow pygame cv2 opencv-python 
pip install dxcam onnx playsound mss pygments vgamepad wheel
pip install onnxruntime keyboard chlorophyll
Tumppi066 commented 1 year ago

This is extremely weird since the installer should just get all of them from the requirements.txt file in the app folder. I guess I should probably check my installer again xD

scorpio1441 commented 1 year ago

This is extremely weird since the installer should just get all of them from the requirements.txt file in the app folder. I guess I should probably check my installer again xD

Yes, but when 1 package fails (evdev) - rest are ignored 😎

Tumppi066 commented 1 year ago

Ah seems that I didn't push the changes yet xD

I added a check for different systems so that it now doesn't do that xD

scorpio1441 commented 1 year ago

Anyways, I wasn't able to get it to work properly for weeks now, I tried both ETS2 and ATS, same result... Can you run it on a normal 1080p monitor with 1920x1080 resolution?

Tumppi066 commented 1 year ago

What part exactly are you having issues with? And yes it should definitely work on a 1080p monitor :D

  1. The lanes detecting correctly
  2. Setting up the app side of the input.
  3. Setting up the game side of the input.
  4. Inaccurate / "Bouncy" / Aggressive steering
scorpio1441 commented 1 year ago

What part exactly are you having issues with? And yes it should definitely work on a 1080p monitor :D

  1. The lanes detecting correctly - NO
  2. Setting up the app side of the input. - YES
  3. Setting up the game side of the input. - YES
  4. Inaccurate / "Bouncy" / Aggressive steering - YES

https://github.com/cfzd/Ultra-Fast-Lane-Detection-v2 - Demo is looking good, no matter how the camera is setup, but your lane detection is not even close to that, what's the difference?

Tumppi066 commented 1 year ago

Can you send me an image of what the app sees then? Preferably in a place where it doesn't detect them well and I'll check how it looks.

I'm using a different technique than UFLD called LSTR. It is much more prone to errors if the camera is not set just right. The flipside being it can run without a GPU. I could try and check v2 and see how well it runs and them might implement that as an option 👍

scorpio1441 commented 1 year ago

@Tumppi066 I will wait for the new version, I'm giving up on this one. None of the lane recognition projects look promising at this point.

FYI: I found that CoordinateX,Y are being provided by the telemetry. Maybe it's worth comparing them to the GPS route and adjust steering accordingly. =)

Tumppi066 commented 1 year ago

You can actually check how it should look and work here (though I had the sensitivity etc... wrong so it's bouncing) https://github.com/Tumppi066/Euro-Truck-Simulator-2-Lane-Assist/issues/25#issuecomment-1612848281

Tumppi066 commented 1 year ago

Unfortunately I can't actually get the route from the game (well I get the start and end, but no the route itself) xD

I could do that otherwise 👍

scorpio1441 commented 1 year ago

You can actually check how it should look and work here (though I had the sensitivity etc... wrong so it's bouncing) #25 (comment)

I have tried every possible scenario, you know - I'm a maniac...

scorpio1441 commented 1 year ago

Unfortunately I can't actually get the route from the game (well I get the start and end, but no the route itself) xD

I could do that otherwise 👍

The game does autosaves right, it should include the route. I'm still researching this

Tumppi066 commented 1 year ago

@rknetwork

That's actually genius. Want to come to a discord call tomorrow so I can get your lane assist fixed? I suddenly have an urge to get you onboard with developing some kind of route plugin xD. I already have access to the ETS2 API because of a plugin another person made

scorpio1441 commented 1 year ago

@Tumppi066 Let's hold off on this one for now... I lost my patience =))) I think I should write something in Rust hitting the memory directly... SCS is really hiding all these pointers. =)

Tumppi066 commented 1 year ago

No worries!

Tell me if you find something, I'm focusing on the tutorials for v2 xD

edit: You can close this if you want, tho we didn't get the issue fixed.

Tumppi066 commented 11 months ago

Been a while so I will close this now regardless :)