Code Monkey home page Code Monkey logo

Comments (19)

Matrixchung avatar Matrixchung commented on June 18, 2024
  1. Sorry for the inconvenience, but you should click the Home button inside the Passenger Lounge (I will add it to the readme later,sorry again)
  2. I recommend to use the 1600x900 windowed setting for the game itself, but it seems that you use fullscreen and is in 1920x1080, which may cause some problems when it's doing clicking (buttons etc.) because I use some relative offsets for button-clicking.
  3. Remember to drag the status screen (as you see, black background with green text) out of game screen to prevent recognition error once you have set the right config as above.
  4. Feel free to ask more if the problem continues.

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

I guess that did the trick, the bot now takes the missions accordingly.
After that it seems to lock on a loop where it clicks the top image constantly (see the mouse in the image below)
image
After opening the galaxy map manually with O it goes to the tab of bookmarks and outputs me an error
Traceback (most recent call last): File "D:\Elite Dangerous\EDAutopilot\.vscode\robigo.py", line 229, in <module> setDest(session,'Sothis') File "D:\Elite Dangerous\EDAutopilot\.vscode\robigo.py", line 70, in setDest if bookmarkLoc[0] == -1: TypeError: 'NoneType' object is not subscriptable
idk if that's because i didnt bookmark the middle destinations on the route or has to do anything about my jump range (currently at 21LY)

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

For the given two errors, i suggest that you should re-check the keybinds because it seems that the program tries to click the bookmark button in Galaxy Map before it opens, so make sure all keybinds are correct (you can set the required keys to the game's second key slots for every function).
also, whatever your ship config is, make sure it's a two-hop journey (with only one middle dest), so I think your 21LY's cap is not enough..
If you haven't bookmarked the dests, you can see sothis and robigo. The two bookmarks are all needed for correct guidance.
next time you comment, plz remember to mention current state (shown as green text on the left-top corner) for every error.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

make sure you set all keybinds correctly..
Edit: the locateButtons() shouldn't return a none object..
I think you should manually run pip install for all modules needed in utils.py(see the head)
for example: 'import pyautogui' requires you to run pip install pyautogui
I will add a requirements.txt to the project later

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Update: clone the project again and run the command in readme to install dependencies

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

Alright, i'm gonna do some tests and feedback to you later.

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

So here's what i found.
Yesterday i was out all day to unlock the guardian FSD booster so i could make those 30LY jumps. After that i started messing around with the bot, at start it does correctly, at status: mission-received opens the map and plots a route, (seems to get stuck in plotting the route where it selects the sothis planet, but doesnt click "plot the route" so i manually pressed space to plot it.
After that it starts the route, everything is ok to Atmospherics. when in atmospherics, fourth-align same thing happens when plotting the route but this time (i believe its because this middle star is different when plotting the route) it outputs an error:
Traceback (most recent call last): File "D:\Elite Dangerous\EDAutopilot\.vscode\robigo.py", line 407, in <module> setDest(session,'Robigo') File "D:\Elite Dangerous\EDAutopilot\.vscode\robigo.py", line 70, in setDest if bookmarkLoc[0] == -1: TypeError: 'NoneType' object is not subscriptable
I believe in this one is because the middle star changes when going back to Wredguia TH-U c16-17 instead of the same one Wredguia TH-U c16-18 (a possible fix would be to not add a specific star follow but just a route follow)
While being in that error loop some ship scanned my ship, and the watchdog detected it and killed my process.
but it does not launch back up (it would be awesome to add an option to it so it does automatically launch it back and continues where it left).
After that the bot stopped so i had to manually go back to robigo mines.

Here's some errors of watchdog btw:
Watchdog: killing process Correcto: se terminó el proceso "EliteDangerous64.exe" con PID 5320. Process Process-2: Traceback (most recent call last): File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 111, in imageProcessing gameCoord = getWindowRectByHwnd(windowHwnd) File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 304, in getWindowRectByHwnd left, top, right, bottom = win32gui.GetWindowRect(windowHwnd) pywintypes.error: (1400, 'GetWindowRect', 'El identificador de la ventana no es válido.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 113, in imageProcessing gameCoord,windowHwnd = getWindowRectByName(globalWindowName) File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 311, in getWindowRectByName left, top, right, bottom = win32gui.GetWindowRect(hwnd) pywintypes.error: (1400, 'GetWindowRect', 'El identificador de la ventana no es válido.') Process Process-3: Traceback (most recent call last): File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\_pswindows.py", line 688, in wrapper return fun(self, *args, **kwargs) File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\_pswindows.py", line 942, in create_time user, system, created = cext.proc_times(self.pid) ProcessLookupError: [Errno 3] assume no such process (originated from OpenProcess -> ERROR_INVALID_PARAMETER)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\__init__.py", line 361, in _init self.create_time() File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\__init__.py", line 717, in create_time self._create_time = self._proc.create_time() File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\_pswindows.py", line 690, in wrapper raise convert_oserror(err, pid=self.pid, name=self._name) psutil.NoSuchProcess: process no longer exists (pid=6668)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 172, in watchdog if isEmergency and terminate and isProcessExist(globalProcessName): # Force terminating... File "D:\Elite Dangerous\EDAutopilot\.vscode\utils.py", line 359, in isProcessExist if psutil.Process(pid).name() == processName: return True File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\__init__.py", line 332, in __init__ self._init(pid) File "C:\Users\Thurion\AppData\Local\Programs\Python\Python310\lib\site-packages\psutil\__init__.py", line 373, in _init raise NoSuchProcess(pid, msg='process PID not found') psutil.NoSuchProcess: process PID not found (pid=6668)

Ask: About the middle star where it changes when going back, should i limit my FSD a bit so it always selects the same star? Or does it work a bit different?

Notes:
After selecting a specific mission (in random circunstances) it seems to click on SHOW REWARD CHOICES: ALL CHOICES so the menu pops out, then it continues clicking in the next mission without closing the menu, causing it to skip that mission select and skipping to the next set or ending the get-mission early.
I couldn't get to the part where it sells all the mission rewards because of that second route error.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Actually there's some variables which you can change about jump destination and more in robigo.py such as firstJumpDest which refers to the middle dest from Robigo to Sothis and thirdJumpDest which is for Sothis to Robigo.
What's more, in the same area mentioned above(USER_DEFINITIONS_AREA) there is an stateOverride where you can input the beginning state manually in case the process are killed or you have to start from middle transition,but not initial or sth. Just make sure you enter a correct state from states, then press home, and the bot will start from the chosen state.
Note: you may also want missionCountOverride which have not been released yet, for every time the process is killed by watchdog, then next time it will create a new session log which doesnt contain mission information, which causes an ignorance in claim-reward state.
For the NoneType error, I believe that its a misconfiguration to some of required pip modules such aspyautogui. You may want to reinstall it and see what happens next, because the other recognition work except galaxy map and mission collecting is done by OpenCV and it works well according to your description, such as auto align the navpoints and etc.
feel free to ask more. always at your service.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

For the watchdog issue, its normal to bring out some errors after the watchdog killed the process, because the imageProcessing thread couldnt get the game window(it has been closed), so the errors come. You dont need to pay attention to them.
The improvements of watchdog's logic are on the way, but now its just served as a final prevention from further loss caused by any interdiction or attack, so you may need to start the game manually by yourself.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Update: please check the newest version v1.1 and clone it to update. This version contains big restructure, including many improvements and fixes to make the whole project more robust.

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

Whenever i try to update the requirements i end up with this error in the opencv_python==4.4.0.46:

TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
        [end of output]

It happened to me a while ago aswell, i didnt successfully updated but the bot was working well until that issue that i told you about, i was about to test it today and saw your update, so i tried doing it with this method anyways *removing the opencv from requirements, updating, and launching the bot)
After i click home, it detects the passengers in get-mission but when it goes to click pick cabin it does not click it, instead clicks something else and gets stuck in a loop where it does not complete the click nor does go back to picking missions.
I guess it has to do with that opencv issue, aswell as the pywin32==301
In this one it tells me it doesn't find a 301 version and gave me 2 options, 302 or 303, so i chose 303 wich is the closest possible i guess.
honestly im a bit lost when it comes to install the OpenCV, i searched in google how to install it when the env error appears but it tells me to install the visual studio 2022 wich i did, but seems complicated because a lot of options appear and im not so sure what exactly do i need.

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

nvm all avobe, i got it working by cloning again entirely.
Seems to happen the same as the first issue commented here and some other mistakes.
When in get-mission it comes to select the mission, when it detects some high-value missions it does go back but selects the same mission in a loop. I scrolled down to avoid it and see where it continues (i've noticed in missions it does not scroll down to see the rest of the missions and skip to the second mission dealer)
After it opens the galaxy map and goes to sothis planet bookmar, again it does not plot the route and outputs mentioned error i've said in the past. Manually plot the route myself and the ship parts.

Again it might be because i dont have the exact dependencies as opencv-python==4.4.0.46 and pywin32==301. I don't know for sure.

I'm gonna go to the mission and see if the ship goes back on its own and see the behavior.

EDIT:
In status Sothis-A-5-Avoiding it doesn't exit the map, and skip to the fourth align. (btw still does not plot the route)
After exiting the map manually it proceeds to align.
All correct until second-assist-select, seems to skip the robigo mines detection by going up, stucking it in a loop where it only goes up the selection. (see image)
image
After manually selecting the assist it still keeps thinking it didn't select it, when dropping to the station i was tabbed out so idk if its my fault or not, but it didnt aprox the station less than 7.5km so it didn't want to accept the dock request. After getting near it, all fine and done.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Whenever i try to update the requirements i end up with this error in the opencv_python==4.4.0.46:

TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
        [end of output]

It happened to me a while ago aswell, i didnt successfully updated but the bot was working well until that issue that i told you about, i was about to test it today and saw your update, so i tried doing it with this method anyways *removing the opencv from requirements, updating, and launching the bot) After i click home, it detects the passengers in get-mission but when it goes to click pick cabin it does not click it, instead clicks something else and gets stuck in a loop where it does not complete the click nor does go back to picking missions. I guess it has to do with that opencv issue, aswell as the pywin32==301 In this one it tells me it doesn't find a 301 version and gave me 2 options, 302 or 303, so i chose 303 wich is the closest possible i guess. honestly im a bit lost when it comes to install the OpenCV, i searched in google how to install it when the env error appears but it tells me to install the visual studio 2022 wich i did, but seems complicated because a lot of options appear and im not so sure what exactly do i need.

did you install opencv-contrib? is there still a NoneType error in setDest()? that shouldnt be there cause I rewrite the entire locating area. if it still come, then it may be your OpenCV issue.
Note: I did all the testing in Windows 10. Noticing that you are in Windows 11 with a series of weird bugs about mouse clicking and so on, therefore we cant ignore the possibility that it may end up as a compability issue with win11, especially the module pyautogui and opencv. So if necessary, considering a fallback or test in another environment. Since I dont have any plan to update to win11 currently, I have no idea whether the problem has sth to do with the OS.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Update: plz consider http403@aa06f4f
there might be a mismatch with opencv version. If it is I will fix it later.

from edautopilot-v2.

Thurion666 avatar Thurion666 commented on June 18, 2024

I guess the win11 enviroment you said makes sense. Idk if it has anything to do with it yet but i'll try to run it in a w10 enviroment whenever i can.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Uploaded showcase: here see if there's any difference in transitions from yours.
And please check the interface brightness mentioned in readme.md, hoping this can fix your recognition brightness error.

from edautopilot-v2.

DLAcoding avatar DLAcoding commented on June 18, 2024

Same behaviour here but in windows 10 except for the TypeError: CCompiler_spawn() which not happend to me.

About missions loop I found that if you press the back button is when it mess it up. I solved by adding a new key to go back in the UI (in my case Key B) and go UI_Down:

if isDebug: print("get-mission: High-value target detected")
session.sendKey('B')
session.sendDelay(1)
session.sleep(2)
session.sendKey('UI_Down')
session.sendDelay(1)

Also had to change the High-value target detected image as it was not recognising it. So I keep thinking there is something we have different in the graphics as some images are found and others not.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Same behaviour here but in windows 10 except for the TypeError: CCompiler_spawn() which not happend to me.

About missions loop I found that if you press the back button is when it mess it up. I solved by adding a new key to go back in the UI (in my case Key B) and go UI_Down:

if isDebug: print("get-mission: High-value target detected")
session.sendKey('B')
session.sendDelay(1)
session.sleep(2)
session.sendKey('UI_Down')
session.sendDelay(1)

Also had to change the High-value target detected image as it was not recognising it. So I keep thinking there is something we have different in the graphics as some images are found and others not.

Right, pressing other buttons will mess it all up since there's not any prevention measure.

from edautopilot-v2.

Matrixchung avatar Matrixchung commented on June 18, 2024

Works well on Windows 11.
You can check the new version and do some debugs according to the compassImg.

from edautopilot-v2.

Related Issues (19)

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.