BrunoTh / ETS2Autopilot

Autopilot for Euro Truck Simulator 2 using TensorFlow (OBSOLETE)
https://www.ets2autopilot.com/
MIT License
89 stars 15 forks source link

Project Still Active? #9

Closed Caleb-J773 closed 6 years ago

Caleb-J773 commented 6 years ago

I noticed that this project isn't being updated recently and there's been new problems since. Is the updates paused?

Caleb-J773 commented 6 years ago

No?

BrunoTh commented 6 years ago

Sorry. I've lost motivation a bit. I also had to do some stuff for university. Maybe after the exams I will work on this project again. One point is an algorithm for filtering the driving data.

Caleb-J773 commented 6 years ago

ah nice to see you around, one thing that might motivate you, Is possibly getting it working with ATS?

BrunoTh commented 6 years ago

It should work but you have to train a new model because the roads a different. Actually I'm trying it too :D

Caleb-J773 commented 6 years ago

Ah, I did ran into an issue with it, I wonder if that was just my pc, I'll have another go at it, soon. As I just did a new fresh install of windows, no python before. And yea, I figured It'll need a new model, sure it's the same game engine and such, but it just uses frames and input from like a gamepad and not like code from the game heh.

Caleb-J773 commented 6 years ago

Yea the problem im getting is still happening, there's no input from the AI to the vjoy controller and my controller can't move the vjoy output either. using vjoy monitor and ATS

BrunoTh commented 6 years ago

What's the ID of the vjoy device in the AP settings? Is it set to 1?

Caleb-J773 commented 6 years ago

yea, let me send a screenshot one second.

Caleb-J773 commented 6 years ago

image

Caleb-J773 commented 6 years ago

image Also still get this error ^

BrunoTh commented 6 years ago

Settings are correct. Can you please open the autopilot folder and check if the pyvjoy directory is empty?

Caleb-J773 commented 6 years ago

Let me check that,

Caleb-J773 commented 6 years ago

image

BrunoTh commented 6 years ago

Nice. There is the problem. The pyvjoy package is missing.

https://www.ets2autopilot.com/

Download it by using the link and do step 2. After that it will work.

Caleb-J773 commented 6 years ago

Oh lol, I don't know how I forgot that, but I did heh.

Caleb-J773 commented 6 years ago

Is the training data still good with it's inputs or do I need to re-do it?

BrunoTh commented 6 years ago

I'm not sure xD Try it with the data. If the steering wheel does not move at all in autopilot mode, then you have to re-do it.

Caleb-J773 commented 6 years ago

I get this error as well Exception in thread Thread-1: Traceback (most recent call last): File "threading.py", line 914, in _bootstrap_inner File "C:\Users\Desktop\ETS2Autopilot-master\thread_controller.py", line 38, in run angle = round((joystick.get_axis(self.axis) + 1) * 32768 / 2) pygame.error: joystick system not initialized

Caleb-J773 commented 6 years ago

But It seems to be just a normal error, as pyjoy shows movement from my controller, now to see if there's any inputs from the AI.

Caleb-J773 commented 6 years ago

Yep, I got movements, I think the reason it worked was because the way you setup the recording, It doesn't involve vjoy at all when it comes to recording inputs in the frames. So luckily the training data is safe.

Caleb-J773 commented 6 years ago

Also, another question to ask you, how many epoch's do you say, you should train and or how long you should train for.

BrunoTh commented 6 years ago

Good. I try to keep this error message in mind.

Puh. It has been a while since the last time I did some coding on the autopilot. But if it works I did it right for this part :D

BrunoTh commented 6 years ago

It does 30 epochs maximum. If the loss drops below 0.25 or 0.30 it stops automatically.

Caleb-J773 commented 6 years ago

Ah okay, so 30 then. But yea, thanks for the help so far, Hopefully you are able to continue doing this project. A lot more to do :D. But yea the goal is to get it to 0.30 or so.

Caleb-J773 commented 6 years ago

Also, I seen there is the logs files, What can I do to them?

BrunoTh commented 6 years ago

After I've seen some videos of Tesla's Autopilot Update I got motivatated to work on the autopilot again :D

Which log files do you mean? In the models folder? These are generated by tensorflow while training. They show the progress of the training.

Caleb-J773 commented 6 years ago

How do I access them?

BrunoTh commented 6 years ago

You can visualize them with tensorboard. Just Google it. On the tensorflow website is an guide

Caleb-J773 commented 6 years ago

yea for some reason tensorboard isn't working at all. Doesn't have anything for tensorboard

Caleb-J773 commented 6 years ago

image Because python is embedded I think.

Caleb-J773 commented 6 years ago

Ah wait, I figured it out, needed to do python -m tensorboard.main

Caleb-J773 commented 6 years ago

I do have an idea, maybe add a deadzone setting for controllers?

Caleb-J773 commented 6 years ago

Yea now I'm getting a new odd error message which is just crashing the UI

Traceback (most recent call last): File "D:\ETS2Autopilot-master\UI\main.py", line 169, in enter_mode self.thread_training = TrainingThread(self.ui.statusbar) File "D:\ETS2Autopilot-master\thread_training.py", line 14, in __init__ self.driving_data = DrivingData() File "D:\ETS2Autopilot-master\driving_data.py", line 87, in __init__ self.xs, self.ys = zip(*self.c) ValueError: not enough values to unpack (expected 2, got 0)

along with it the normal pygame.error: joystick system not initialized

BrunoTh commented 6 years ago

The list with the recorded images seems to be empty. That's why the error popped up.

Currently I'm working on another method for the autopilot. I call it AP1. It uses only lane detection and no neural network. When the AP1 is engaged it will record the images for you. Later on these images will be used for training the AP2 (neural network). I want to improve the user experience and stability of the program. I think, therefore I have to do some refactoring. But the first goal is that the AP1 works.

Caleb-J773 commented 6 years ago

That doesn't seem to be the case for me, I have no recorded images at all no saves either, I got the project again, added vjoy and all of that stuff and I'm still getting this error. there's no captured folder either.

BrunoTh commented 6 years ago

You are trying to start the training mode without recorded images. That's the reason why this error appears.