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

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

Error during start #25

Closed scorpio1441 closed 1 year ago

scorpio1441 commented 1 year ago

I'm getting this error

image

When I click OK, then I'm getting this:

RuntimeError: D:\a\_work\1\s\onnxruntime\core\providers\cuda\cuda_call.cc:124 onnxruntime::CudaCall D:\a\_work\1\s\onnxruntime\core\providers\cuda\cuda_call.cc:117 onnxruntime::CudaCall CUDA failure 35: CUDA driver version is insufficient for CUDA runtime version ; GPU=48 ; hostname=ALEX-PC ; expr=cudaSetDevice(info_.device_id);

I don't have NVIDIA and want to use CPU only.

Tumppi066 commented 1 year ago

Hmm, that's interesting let me check the code real quick 👍

Tumppi066 commented 1 year ago

Ok just as a quick fix try and open currentProfile.txt And change default.json for defaultCPU.json

scorpio1441 commented 1 year ago

currentProfile.txt

Great, it started, but not responding.....

image

scorpio1441 commented 1 year ago

Ok just as a quick fix try and open currentProfile.txt And change default.json for defaultCPU.json

Invalid joystick button
Most likely fix : change your indicator and or enable/disable buttons.
Tumppi066 commented 1 year ago

Seems that I forgot to reset that profile. Just open the profiles/defaultCPU.json file and edit the button indexes to be zero.

Edit: These Screenshot_2023-06-27-22-27-37-561_com.github.android.png

scorpio1441 commented 1 year ago

Perfect, the errors are gone! But both windows are still not responding...

image

D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater>cd D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater/app   & D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater/venv/Scripts/python AppUI.py   & pause

 _____                             _  ___   __    __
/__   \_   _ _ __ ___  _ __  _ __ (_)/ _ \ / /_  / /_
  / /\/ | | | '_ ` _ \| '_ \| '_ \| | | | | '_ \| '_ \
 / /  | |_| | | | | | | |_) | |_) | | |_| | (_) | (_) |
 \/    \__,_|_| |_| |_| .__/| .__/|_|\___/ \___/ \___/
                      |_|   |_|
      __                   ___           _     __
     / /  ___ ____  ___   / _ | ___ ___ (_)__ / /_
    / /__/ _ `/ _ \/ -_) / __ |(_-<(_-</ (_-</ __/
   /____/\_,_/_//_/\__/ /_/ |_/___/___/_/___/\__/

Importing modules...

Loading the lane detection files
the app will hang, be patient...

pygame 2.1.2 (SDL 2.0.18, Python 3.9.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: '[WinError 127] The specified procedure could not be found'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(
Loading settings...
> Done!

Exception in thread DXCamera:
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python39\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\lib\site-packages\dxcam\dxcam.py", line 162, in __capture
    set_periodic_timer(self.__timer_handle, period_ms)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\lib\site-packages\dxcam\util\timer.py", line 34, in set_periodic_timer
    raise ctypes.WinError()
OSError: [WinError 87] The parameter is incorrect.
Initializing model...
> Model is of type lstr_360x640
> Done!

Loading settings...
Exception in thread DXCamera:
> Done!
Traceback (most recent call last):

  File "C:\Program Files\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python39\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\lib\site-packages\dxcam\dxcam.py", line 162, in __capture
    set_periodic_timer(self.__timer_handle, period_ms)
  File "D:\Downloads\Euro-Truck-Simulator-2-Lane-Assist-anaconda-updater\venv\lib\site-packages\dxcam\util\timer.py", line 34, in set_periodic_timer
    raise ctypes.WinError()
OSError: [WinError 87] The parameter is incorrect.
Initializing model...
> Model is of type lstr_360x640
> Done!

Connected to the VIGEM driver (took 0 tries).

> Loading Done! (6.02s)

Discovering models...
> 5 models found.

Loading UI...
> Done! (0.21s)

App initialization complete in 6.37s! 
scorpio1441 commented 1 year ago

@Tumppi066 can you remote to my PC?

Tumppi066 commented 1 year ago

Seems that it's actually some type of windows error. That's very weird. I'll have to go to bed now and I'll probably be available in about 12h.

In the meantime if you have any sort of experience with python then you can try and Google it, but I'll be here helping tomorrow anyway so no worries either way!

scorpio1441 commented 1 year ago

Seems that it's actually some type of windows error. That's very weird. I'll have to go to bed now and I'll probably be available in about 12h.

In the meantime if you have any sort of experience with python then you can try and Google it, but I'll be here helping tomorrow anyway so no worries either way!

Thanks.

I changed this to false "useDirectX": false, and it started working!!! The Preview is accurate, line drawing is correct, however the steering is extremely inaccurate.

Tumppi066 commented 1 year ago

I might've forgotten to continue this -_-

Well I am here now xD Anyway I kind of despise remoting to people's PCs so I won't do it.

Can I get some more information on how the steering is inaccurate? You can make it more sensitive by dropping the sensitivity (yes, I know how to code, trust me), and you can lower the smoothness to eliminate any bouncing between lanes.

scorpio1441 commented 1 year ago

@Tumppi066 I mean it's crossing the lanes and hitting other cars, sometimes jumping on the shoulder, sensitivity doesn't make much difference... I'm testing https://www.ets2autopilot.com/ now.

Tumppi066 commented 1 year ago

Hmm that would seem like high (actually low) sensitivity.

Once you test out that can you send me a screenshot of A) your preview window B) and you controller settings in app

Edit: I also tested that before making my own and I don't think it's been updated in like 4-5 years xD

scorpio1441 commented 1 year ago

@Tumppi066 ets2autopilot does the same thing, inadequate steering. I think I need to have an actual racing wheel instead of a Joystick.

The description below refers to some youtube video, which is no longer available, do you remember what that was about?

THIS APP WILL NOT WORK WITH A KEYBOARD. You have to have a controller, this (youtube.com) is a possible alternative. I have not tested it myself.

Tumppi066 commented 1 year ago

Ah, that was an old app that did indeed (at least in the video) work with a keyboard. My new version does have keyboard support though!

If you want to try it out then you can just download the v2.0-rewrite branch and install all the requirements with pip.

edit: still working on installer support, it might work if you replace LSTR-Development with v2.0-rewrite

scorpio1441 commented 1 year ago

@Tumppi066 Just uploaded a video for you: https://youtu.be/RRgFTRKOvt8

image image

Tumppi066 commented 1 year ago

Yeah those settings probably aren't the cause here. Never seen it perform that badly.

Try it on the highway, if it still can't keep up then I'm going to have to look into this for the rewrite!

scorpio1441 commented 1 year ago

@Tumppi066

Out of curiosity I installed fresh Windows 10, latest v2.0-rewrite (had to fix bunch of dependencies), now it's always pulling to the right in both Keyboard or Wheel mode...

Tumppi066 commented 1 year ago

That's easily fixed by going into (in app) plugins -> LSTR Steering -> Load UI -> offset Negative values will offset left and positive values will offset right.

edit: You will have to disable it first before changing settings. And right now there is a bug that means you have to restart after changes, otherwise it will steer into the wall xD

scorpio1441 commented 1 year ago

@Tumppi066 Tried that, still very unreliable steering, more like random...

Tumppi066 commented 1 year ago

It really shouldn't be like that, should be very smooth.

I'm against remoting but maybe a discord voice call (or at least a screenshare) tomorrow so I can better check what's going on?

(I'll later then add the fix here for any others of course)

scorpio1441 commented 1 year ago

@Tumppi066 Sure, we can also do Skype with screen sharing... Can you send a working config of yours (JSON) and the screen resolution....

Tumppi066 commented 1 year ago

I don't have Skype xD

I'll send them tomorrow, already turned off my PC so I don't have access to the configs.

My resolution is 5120x1440 (32:9) and the app capture is approximately x,y = 2080, 325 w,h = 1280x720

Tumppi066 commented 1 year ago

Wrong button xD

scorpio1441 commented 1 year ago

@Tumppi066 With resolution this high - you are probably using OS native scaling to lower it down. Maybe that's what's going on. I figured that changing DXCamScreenCapture values in certain way - affects steering adequacy, even though - lane detection is not affected, and still shows correctly.

Tumppi066 commented 1 year ago

OH WAIT I REALIZED SOMETHING XD

I don't scale the output with the width so that means that higher resolutions have a natively higher sensitivity. That should affect this case but thx I guess xD

I'll be going to bed again now and will be back in 12h (hopefully), we can do the discord call tomorrow and I'll see what I can do then!

scorpio1441 commented 1 year ago

@Tumppi066 Makes sense. But my case is standard (1920x1080 16:9) and yours is not. =))) Who in the world is using 4k monitors? Let's make this project popular. Have a good night....

Tumppi066 commented 1 year ago

You can add me on discord tumppi066 and I'll be available in around 3 hours. Feel free to send me a message once you are ready and we'll see if we can get this fixed!

Tumppi066 commented 1 year ago

https://github.com/Tumppi066/Euro-Truck-Simulator-2-Lane-Assist/assets/83072683/643cf25b-0960-48ab-b8a2-94b5dee8344d

This is how it looks for me on v2.0 (with keyboard mode) and absolutely no tuning of the values (this is why it is "bouncing" between lanes).

scorpio1441 commented 1 year ago

@Tumppi066 I'd call it totally acceptable! Mine is not even close to that!

I just woke up and have to attend a conference. I will be available in about 2 hours...

Tumppi066 commented 1 year ago

Yup I'll be available when you need, just contact me on discord!