skai2 / edautopilot Goto Github PK
View Code? Open in Web Editor NEWElite Dangerous computer vision based auto-navigation including long range routing
License: MIT License
Elite Dangerous computer vision based auto-navigation including long range routing
License: MIT License
Don't know if you're still around and just busy with life or if you're still trucking on that rebuild, but I've run into an issue.
The only mod I made to source was hard setting my log location, since it's on a different drive.
From there, after sorting out some binding issues, I arrived at the below issue.
I hope you're still around and have the time to spare a look.
This is a wonderful tool you've built and I'll be sad if I can't manage to get it to function.
INFO RELEASE=v19.05.15-alpha-18
INFO PATH_LOG_FILES=None
INFO PATH_KEYBINDINGS=None
INFO KEY_MOD_DELAY=0.01
INFO KEY_DEFAULT_DELAY=0.2
INFO KEY_REPEAT_DELAY=0.1
INFO FUNCTION_DEFAULT_DELAY=0.5
INFO SCREEN_WIDTH=3840
INFO SCREEN_HEIGHT=2160
INFO get_latest_log=D:- Documents and Folders\Saved Games\Frontier Developments\Elite Dangerous\Journal.220208193928.01.log
INFO get_latest_keybinds=C:\Users\B-Twr\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\EDAP.4.0.binds
INFO get_bindings_={'pre_key': 'DIK_Q', 'key': 16}
INFO get_bindings_={'pre_key': 'DIK_E', 'key': 18}
INFO get_bindings_={'pre_key': 'DIK_A', 'key': 30}
INFO get_bindings_={'pre_key': 'DIK_D', 'key': 32}
INFO get_bindings_={'pre_key': 'DIK_S', 'key': 31}
INFO get_bindings_={'pre_key': 'DIK_W', 'key': 17}
INFO get_bindings_={'pre_key': 'DIK_F2', 'key': 60}
INFO get_bindings_={'pre_key': 'DIK_F3', 'key': 61}
INFO get_bindings_={'pre_key': 'DIK_F4', 'key': 62}
INFO get_bindings_={'pre_key': 'DIK_F5', 'key': 63}
INFO get_bindings_<UI_Up>={'pre_key': 'DIK_UPARROW', 'key': 200}
INFO get_bindings_<UI_Down>={'pre_key': 'DIK_DOWNARROW', 'key': 208}
INFO get_bindings_<UI_Left>={'pre_key': 'DIK_LEFTARROW', 'key': 203}
INFO get_bindings_<UI_Right>={'pre_key': 'DIK_RIGHTARROW', 'key': 205}
INFO get_bindings_<UI_Select>={'pre_key': 'DIK_F7', 'key': 65}
INFO get_bindings_<UI_Back>={'pre_key': 'DIK_F6', 'key': 64}
INFO get_bindings_={'pre_key': 'DIK_F10', 'key': 68}
INFO get_bindings_={'pre_key': 'DIK_F8', 'key': 66}
INFO get_bindings_={'pre_key': 'DIK_SPACE', 'key': 57}
INFO get_bindings_={'pre_key': 'DIK_SPACE', 'key': 57, 'pre_mod': 'DIK_LSHIFT', 'mod': 42}
INFO get_bindings_={'pre_key': 'DIK_F1', 'key': 59}
Traceback (most recent call last):
File "C:\Users\B-Twr\edautopilot\autopilot.py", line 31, in
tray()
File "C:\Users\B-Twr\edautopilot\dev_tray.py", line 47, in tray
icon = Icon(name=name, title=name)
File "C:\Users\B-Twr\AppData\Local\Programs\Python\Python310\lib\site-packages\pystray_win32.py", line 32, in init
super(Icon, self).init(*args, **kwargs)
File "C:\Users\B-Twr\AppData\Local\Programs\Python\Python310\lib\site-packages\pystray_base.py", line 84, in init
self._menu = menu if isinstance(menu, Menu) else Menu(*menu)
TypeError: pystray._base.Menu() argument after * must be an iterable, not NoneType
Exception ignored in: <function Icon.del at 0x000001BAF56F25F0>
Traceback (most recent call last):
File "C:\Users\B-Twr\AppData\Local\Programs\Python\Python310\lib\site-packages\pystray_win32.py", line 50, in del
if self._running:
AttributeError: 'Icon' object has no attribute '_running'
I printed hsv right before the cvtColor function call and found it is empty before I get the exception. however, it is not immediately empty. it becomes empty after a few times not being empty.
[]
Exception in thread EDAutopilot:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 1303, in autopilot
align()
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 1048, in align
off = get_navpoint_offset()
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 827, in get_navpoint_offset
mask_blue = filter_blue(compass_image)
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 731, in filter_blue
hsv = cv2.cvtColor(hsv, cv2.COLOR_BGR2HSV)
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
I don't see anything in the function that would cause it to become empty. so I don't know what is going on
I have set the controls as I should have, and the script works. But for some reason it rejects to see the stars and it tries to directly dive into them which puts me out of FSD. Here is my log.
autopilot.log
INFO RELEASE=v19.05.15-alpha-18
INFO PATH_LOG_FILES=None
INFO PATH_KEYBINDINGS=None
INFO KEY_MOD_DELAY=0.01
INFO KEY_DEFAULT_DELAY=0.2
INFO KEY_REPEAT_DELAY=0.1
INFO FUNCTION_DEFAULT_DELAY=0.5
INFO SCREEN_WIDTH=1920
INFO SCREEN_HEIGHT=1080
INFO get_latest_log=C:\Users\Thurion\Saved Games\Frontier Developments\Elite Dangerous\Journal.220209140252.01.log
INFO get_latest_keybinds=C:\Users\Thurion\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds
Traceback (most recent call last):
File "D:\EDAutopilot\autopilot.py", line 1, in <module>
from dev_tray import tray
File "D:\EDAutopilot\dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "D:\EDAutopilot\dev_autopilot.py", line 372, in <module>
keys = get_bindings()
File "D:\EDAutopilot\dev_autopilot.py", line 354, in get_bindings
binding['key'] = SCANCODE[binding['pre_key']]
KeyError: 'DIK_LEFTBRACKET'
Welp, i've been trying for so long now, but i can't get past this single error.
c:\EDAutopilot>python autopilot.py
Traceback (most recent call last):
File "autopilot.py", line 1, in
from dev_tray import tray
File "c:\EDAutopilot\dev_tray.py", line 3, in
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input
File "c:\EDAutopilot\dev_autopilot.py", line 293, in
keys = get_bindings(PATH_KEYBINDINGS)
File "c:\EDAutopilot\dev_autopilot.py", line 280, in get_bindings
binding['key'] = SCANCODE[binding['pre_key']]
KeyError: 'DIK_'
At first thank you for investing time and effort in a helpful tool! I am happy to discover this project! :)
However, I am having issues getting your tool to work and would appreciate a little help. Here's what (not) happening:
Thank you!
Traceback (most recent call last):
File "autopilot.py", line 1, in
from dev_tray import tray
File "C:\Users\User\Music\EDAutopilot-master\dev_tray.py", line 3, in
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "C:\Users\User\Music\EDAutopilot-master\dev_autopilot.py", line 372, in
keys = get_bindings()
File "C:\Users\User\Music\EDAutopilot-master\dev_autopilot.py", line 322, in get_bindings
bindings_tree = parse(latest_bindings)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\lib\xml\etree\ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\lib\xml\etree\ElementTree.py", line 584, in parse
source = open(source, "rb")
TypeError: expected str, bytes or os.PathLike object, not NoneType
So when I try to enable the script through the EXE the script runs just fine, it trys to find my next jump but it sort of juts around trying to find it for so long that I give up and just do it manually. I've tried changing the setting to the recommended 1080p borderless and also set the brightness on the ship UI to max but it still seems to miss it's mark. Any ideas?
hello,
i primary had issues w<ith the same lasted post
the ship continue pitching up
it's seems to come from the 4K résolution screen.
in another screen it's seems to work better :)
but, somethings doesn't work, and don't know if logically must work?.
i'm in a ultra wide résolution (3840/1080) and FOV to the max
starting is good
the ship goes foward , searching for location and jump.
after that
he stop in front of sun
make the 'honk scan'
make a pitch up, until don't see the sun,
goes foward
and seems to looking for the next target.
problèm
it doesn't found the next target
and, doesn't make the fuelscoop
i had some issue in the log, but don't know if this means something ...
chek here please
DEBUG:root:send=key:{'pre_key': 'DIK_Q', 'key': 16},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_D', 'key': 32},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_A', 'key': 30},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_E', 'key': 18},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_S', 'key': 31},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_Z', 'key': 44},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_F', 'key': 33},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_R', 'key': 19},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_T', 'key': 20},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_V', 'key': 47},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_B', 'key': 48},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_Y', 'key': 21},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_O', 'key': 24},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_L', 'key': 38},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_K', 'key': 37},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_M', 'key': 50},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_U', 'key': 22},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_J', 'key': 36},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_P', 'key': 25},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_N', 'key': 49},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:clear_input
Hey there,
I sadly got another issue after reinstalling the script.
First of all, sorry for spamming issues.
Now to my problem: Whenever I plan a route the script says "Aligning ship" and then it presses the keys w and e. That happens no matter what I do,
Have you got any solutions?
Getting an error after typing 'python autopilot.py'
Traceback (most recent call last): File "autopilot.py", line 1, in <module> from dev_tray import tray File "C:\Users\fouso\Desktop\EDAutopilot-master\EDAutopilot\dev_tray.py", line 3, in <module> from dev_autopilot import autopilot, resource_path, get_bindings, clear_input File "C:\Users\fouso\Desktop\EDAutopilot-master\EDAutopilot\dev_autopilot.py", line 293, in <module> keys = get_bindings(PATH_KEYBINDINGS) File "C:\Users\fouso\Desktop\EDAutopilot-master\EDAutopilot\dev_autopilot.py", line 280, in get_bindings binding['key'] = SCANCODE[binding['pre_key']] KeyError: 'DIK_▒'
Itere some big gas stars that got about 70-100 red. I guess 60 points of red for alert is good as i tested.
P.S. Make a small video guide how to startup the program. Everyone has got tons of problems with installing. Short 5min video will make everyone more happy:)
g´day
i have already set a route in game, select the next system, then i activate Autopilot, it say's "Routing" then a message popped up: Aborting
i checked \Data\GetNavPointOffset\GetNavPointOffset.exe, its generate two files: NavPoint.txt and RouteIndex.txt
the content insite those files is always -1 and 1
how can i see if the route is saved correctly?
So essentially EDAutoPilot parks on this star at Col 285 Sector JX-T d3-76 even though it is Class:T. In the Python debugger the ship() method returns 'star_class': 'M' so is mistaken on the star class. It looks as if the Star Class of the FSDTarget (the next star) is being populated too early for the fuel scoop decision. I need to understand how EDAutoPilot determines star_class in ship() to work on a fix.
ED Log:
{ "timestamp":"2021-01-04T04:39:59Z", "event":"StartJump", "JumpType":"Hyperspace", "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "StarClass":"TTS" }
{ "timestamp":"2021-01-04T04:40:04Z", "event":"Music", "MusicTrack":"NoTrack" }
{ "timestamp":"2021-01-04T04:40:07Z", "event":"FSDTarget", "Name":"Col 285 Sector NZ-C b14-1", "SystemAddress":2868904273297, "StarClass":"M", "RemainingJumpsInRoute":3 }
{ "timestamp":"2021-01-04T04:40:17Z", "event":"ReceiveText", "From":"", "Message":"$COMMS_entered:#name=Col 285 Sector JX-T d3-76;", "Message_Localised":"Entered Channel: Col 285 Sector JX-T d3-76", "Channel":"npc" }
{ "timestamp":"2021-01-04T04:40:17Z", "event":"FSDJump", "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "StarPos":[-78.25000,77.12500,-54.15625], "SystemAllegiance":"", "SystemEconomy":"$economy_None;", "SystemEconomy_Localised":"None", "SystemSecondEconomy":"$economy_None;", "SystemSecondEconomy_Localised":"None", "SystemGovernment":"$government_None;", "SystemGovernment_Localised":"None", "SystemSecurity":"$GAlAXY_MAP_INFO_state_anarchy;", "SystemSecurity_Localised":"Anarchy", "Population":0, "Body":"Col 285 Sector JX-T d3-76 A", "BodyID":1, "BodyType":"Star", "JumpDist":19.221, "FuelUsed":4.620865, "FuelLevel":5.408135 }
{ "timestamp":"2021-01-04T04:40:17Z", "event":"Music", "MusicTrack":"Supercruise" }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A A Belt Cluster 5", "BodyID":10, "Parents":[ {"Ring":5}, {"Star":1}, {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":5.226392, "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A", "BodyID":1, "Parents":[ {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":0.000000, "StarType":"TTS", "Subclass":2, "StellarMass":0.964844, "Radius":718677632.000000, "AbsoluteMagnitude":5.582504, "Age_MY":48, "SurfaceTemperature":4780.000000, "Luminosity":"Va", "SemiMajorAxis":471539974212.646484, "Eccentricity":0.120456, "OrbitalInclination":23.009228, "Periapsis":213.535804, "OrbitalPeriod":644373738.765717, "RotationPeriod":309500.146263, "AxialTilt":0.000000, "Rings":[ { "Name":"Col 285 Sector JX-T d3-76 A A Belt", "RingClass":"eRingClass_MetalRich", "MassMT":1.4533e+14, "InnerRad":1.1858e+09, "OuterRad":2.6044e+09 } ], "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A A Belt Cluster 3", "BodyID":8, "Parents":[ {"Ring":5}, {"Star":1}, {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":8.481720, "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A A Belt Cluster 4", "BodyID":9, "Parents":[ {"Ring":5}, {"Star":1}, {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":5.205257, "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A A Belt Cluster 1", "BodyID":6, "Parents":[ {"Ring":5}, {"Star":1}, {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":7.940810, "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:40:24Z", "event":"Scan", "ScanType":"AutoScan", "BodyName":"Col 285 Sector JX-T d3-76 A A Belt Cluster 2", "BodyID":7, "Parents":[ {"Ring":5}, {"Star":1}, {"Null":0} ], "StarSystem":"Col 285 Sector JX-T d3-76", "SystemAddress":2621800728931, "DistanceFromArrivalLS":3.995406, "WasDiscovered":true, "WasMapped":false }
{ "timestamp":"2021-01-04T04:43:37Z", "event":"ReservoirReplenished", "FuelMain":4.778135, "FuelReservoir":0.630000 }
{ "timestamp":"2021-01-04T04:49:54Z", "event":"Music", "MusicTrack":"SystemMap" }
{ "timestamp":"2021-01-04T04:50:39Z", "event":"Music", "MusicTrack":"Supercruise" }
{ "timestamp":"2021-01-04T04:51:09Z", "event":"ModuleInfo" }
{ "timestamp":"2021-01-04T04:51:14Z", "event":"Music", "MusicTrack":"SystemMap" }
{ "timestamp":"2021-01-04T04:51:16Z", "event":"Music", "MusicTrack":"Supercruise" }
{ "timestamp":"2021-01-04T04:51:17Z", "event":"Music", "MusicTrack":"GalaxyMap" }
{ "timestamp":"2021-01-04T04:51:51Z", "event":"Music", "MusicTrack":"Supercruise" }
{ "timestamp":"2021-01-04T04:57:54Z", "event":"ReservoirReplenished", "FuelMain":4.148135, "FuelReservoir":0.630000 }
EDAutoPilot Log:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---- AUTOPILOT JUMP ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DEBUG:root:jump
DEBUG:root:jump= try:0
DEBUG:root:jump= start fsd
DEBUG:root:send=key:{'pre_key': 'DIK_J', 'key': 36},hold:1,repeat:1,repeat_delay:None,state:None
DEBUG:root:jump= in jump
DEBUG:root:jump= speed 0
DEBUG:root:send=key:{'pre_key': 'DIK_X', 'key': 45},hold:None,repeat:1,repeat_delay:None,state:None
DEBUG:root:jump=complete
INFO:root:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---- AUTOPILOT REFUEL ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DEBUG:root:refuel
DEBUG:root:refuel= start refuel
DEBUG:root:send=key:{'pre_key': 'DIK_R', 'key': 19},hold:None,repeat:1,repeat_delay:None,state:None
DEBUG:root:refuel= wait for refuel
DEBUG:root:send=key:{'pre_key': 'DIK_X', 'key': 45},hold:None,repeat:3,repeat_delay:None,state:None
Debug Console:
ship()
{'fuel_capacity': 32.0, 'fuel_level': 5.408135, 'fuel_percent': 17, 'is_scooping': False, 'location': 'Col 285 Sector JX-T d3-76', 'star_class': 'M', 'status': 'in_supercruise', 'target': 'Col 285 Sector NZ-C b14-1', 'time': 663, 'type': 'krait_mkii'}
i have tried key rebinding several times for various keys, not sure what to try next
The log is Below
INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=1920
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\jgwar\Saved Games\Frontier Developments\Elite Dangerous\Journal.190911122548.01.log
DEBUG:root:ship={'time': 16, 'status': 'in_space', 'type': 'asp', 'location': 'Veroandi', 'star_class': None, 'target': 'HR 8061', 'fuel_capacity': 32.0, 'fuel_level': 32.0, 'fuel_percent': 100, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\jgwar\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\StartPreset.start
Hey there! works great for a few minutes, between 10-30 minutes. Then the alignment to target becomes off center over time, to a point that jump fails more than 3 times which errors out the program. Never had any issues with it running into stars (unless I have a cheat engine trainer running, somehow that messes with the program).
this is great for as you say not to leave unattended, but wondering if you've abandoned this project. is there plans to make this fully autopilot? I'm willing to donate if so.
Also, I'm about to dive into learning python and Computer Vision, I only know java, and C# through unity. is there any udemy courses I can take to learn how to recreate or even contribute to something like this?
after running the exe, I got the error that everyone seems to get, "Script failed to execute..", after looking at the log and actually running the py script, the reason for my case is:
Traceback (most recent call last):
File "dev_autopilot.py", line 372, in
keys = get_bindings()
File "dev_autopilot.py", line 354, in get_bindings
binding['key'] = SCANCODE[binding['pre_key']]
KeyError: 'DIK_HASH'
Before this one, I got the same error but for DIK_NUMPAD_SUBTRACT
, thought someone just forgot the NUMPAD_
missing from directinput.py
and moved along, now I realize that these keybinds aren't very compatible, as HASH (the # character) doesn't seem to even exist in dinput.h
It seems that ED can identify these keys in a reliable fashion, but I'm not quite sure how this program could be made to do the same.
After spending a bit of time finding random keys that didn't conflict with anything, it worked (still not on the exe, that one's just broken, although maybe in a similar place).
Hello
I have began playing elite again, I had it on a old pc and had created some similar to this using autohotkey with image matching and vjoy as the joystick emulator. I had this system, long range autopilot, fuel scooping and planet investigating(exploration system has changed now). I have since lost the code and knowledge of autohotkey scripts. But i do remember a lot of the pseudo code/logic of how i approach some of the issues which might be useful.
The uses of Python and OpenCV in this makes this far more robust and with greater potential
1:
Avoiding stars
Your current approach
You have sun_percent() which returns a value for the amount of screen covered in star, and over a threshold up pitch up until its reduced.
My old approach
Sample 9 regions of the screen,(I only had an asp explorer so these where hard coded positions matched up with the cock pit windows). Sampled for brightness and fly towards the dark area(A). I found this good for multi star system to get away safe. Also gives a escape direction that shortest from core stars
2:
Refueling
Your Current approach
On arrival drop speed to zero and wait, then escape via above method
My old approach
On Arrival at half speed, swing 90, maintain a tangential path while keeping temp as close to, but below 60. To maintain direction, I had a system to control the hud(B) and would select the scoop star as a target and just keep the target indicator at the top. It allows to scoop at max speed and has the potential to investigate planet when mixed with the targeting as you can maintain a distance from a planet and circle it
A: I think this system would be better as it more stable, but it may require a improved input system. I used vJoy to give granular control, where this used keys presses repeated. The repeating of key presses may also trip a anti cheat mechanism with ED
B: I think have it select target might be nice, as it could complete the exploring, and the new filtering on the nav hud might make it easier that it was for me
autopilot.log
Hi!)
I downloaded the latest binary release (autopilot_portable_v19-05-15-alpha-18.exe)
After some tries set up the keys required for it to successfully start up, but after I hit Home nothing happens.If the ship was moving, it just stops.
Hope this helps to get whats wrong.
Unfortunately, I didn't get to test the thing)
First of all, AWESOME work skai2! The code is so much nicer to work with since it's now 100% Python.
I just got my fork synced so I will be pushing a couple PRs to add some sanity checking and whatnot. This issue refers to the use of getctime when trying to get the latest file. I believe getmtime should work much better since it gets the latest modified file instead of the last created file (which may not be the latest change the user has done). See below for screenshot:
I started out looking at this thinking I was having the same issue as #37 but the debug log looks like it is actually failing to find my keybindings in the appropriate file. I confirmed that file is present and readable and I've walked through the recommended steps in #37 (shutting down and restarting, ensuring I have a route plotted, etc.)
Hello,
where do i find the 'PitchModifierKey' and the 'YawModifierKey' in the ED settings?
Also some keybinds are not working. I set 'j' for jumping but when the autopilot displayes 'Jump' nothing happens.
I also don't understand how to set up the ship parameters except of the roll360time and the yaw360time.
It would be very nice if you could make a youtube video on how to set up your autopilot because it is extremely confusing for me and some other people on how to measure everything, exspecially when your game is not in english.
Hey,
I have an issue where after aligning the ship it just aborts. It briefly displays JUMP and throttles up the ship then instantly aborts and goes to 0% throttle.
GUI is default orange.
Any suggestions?
Thanks
help i have never used python before and have tried putting the texts in the python box
the coding corse im on is helping not at all by not teachng a thing about computing
I HAVE NO CLUE WHAT IM DOING HELP
INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=2560
INFO:root:SCREEN_HEIGHT=1440
INFO:root:get_latest_log=C:\Users\Dustin\Saved Games\Frontier Developments\Elite Dangerous\Journal.190720152024.01.log
DEBUG:root:ship={'time': 29, 'status': 'in_space', 'type': 'asp', 'location': 'Leamuae DZ-I c12-544', 'star_class': None, 'target': 'Leamuae AH-S d5-4220', 'fuel_capacity': 32.0, 'fuel_level': 32.0, 'fuel_percent': 100, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\Dustin\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\StartPreset.start
I had been experiencing a problem where sometimes when arriving in a system the Advise tooltip would say "Jump" then immediately change to "Aborting" and the script would end. Looking at the code I see there's some missing brackets on the code in FinishJump()
Line 1040 in 90d560b
while (HaveTarget() = 0) {
FailCount++
Sleep, 100
Brake()
- if (FailCount > 40)
+ if (FailCount > 40) {
Advise("Navigation Error", 2)
Abort()
+ }
}
This means if HaveTarget()
returns false just once, it will call Abort()
and not try again, although the "Navigation Error" advise will not fire because FailCount is only 1. Adding the proper brackets I haven't had a problem since. I blame Python's indention-is-brackets syntax for this oversight.
Note that this is not the same issue reported in #2, but sort of for the same reason. HaveTarget()
fails frequently and despite being sampled 10 times it still kicks out in CheckRoute()
which doesn't think there's a nav target any more. I get a lot of -3 results from GetNavPointOffset.exe (which I think is navpoint outside of navball) but with valid coordinates so it seems like maybe there needs to be a little fudge in the sanity check or something to fix that?
Had a bad/old pull, possibly from wrong fork. Issue may be closed
Only keybind set in the "Primary" slot will be recognized by the program. Secondary keybind results in a KeyError.
When I am trying to execute the script I get following:
`
python3 autopilot.py
(autopilot.py:5127): Gtk-WARNING **: 17:10:10.218: Locale not supported by C library.
Using the fallback 'C' locale.
Traceback (most recent call last):
File "autopilot.py", line 1, in
from dev_tray import tray
File "/home/marvin/EDAutopilot/dev_tray.py", line 3, in
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/marvin/EDAutopilot/dev_autopilot.py", line 37, in
from PIL import ImageGrab
File "/usr/lib/python3.7/site-packages/PIL/ImageGrab.py", line 22, in
raise ImportError("ImageGrab is macOS and Windows only")
ImportError: ImageGrab is macOS and Windows only
`
How do I get it run?
Hello,
I'm writing in because I have just installed the script and I am able to start it in the game, but then it just maxes out the throttle and puts the ship in an endless spin by pitching upwards. I am also unable to stop the script unless I exit the game and close the command window. Hopefully there is and easy fix to this, I look forward to a reply. Thank you!
File "autopilot.py", line 1, in <module>
from dev_tray import tray
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 382, in <module>
keys = get_bindings()
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 332, in get_bindings
bindings_tree = parse(latest_bindings)
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
Having cloned it via the processe described, the pilot works, however, i am unable ot abort the pilot once it engaged via pressing the end key, which, makes it kinda difficult to use
The docs say that the SHIP CHARACTERISTICS need to be configured.
But from where can I calculate the values of my specific ship?!
; ------------------------------------------------------------------------------
; ---------------------- SECTION TWO: SHIP CHARACTERISTICS ---------------------
; --------------------------You MUST configure these!---------------------------
; ------------------------------------------------------------------------------
; Ship Parameters
Global Pitch360Time = 25700
Global PitchAccelTime = 200
Global PitchAccelAngle = 2
Global PitchAngularSpeed = % 360 / Pitch360Time
Global PitchAccelVal = % PitchAngularSpeed / PitchAccelTime
Global Roll360Time = 5000
Global RollAccelTime = 1300
Global RollAccelAngle = 1
Global RollAngularSpeed = % 360 / Roll360Time
Global RollAccelVal = % RollAngularSpeed / RollAccelTime
Global Yaw360Time = 55300
Global YawAccelTime = 800
Global YawAccelAngle = 1
Global YawAngularSpeed = % 360 / Yaw360Time
Global YawAccelVal = % YawAngularSpeed / YawAccelTime
Global FSDChargeTime = 15000
Global JumpTime = 18000
Global TimeToRefuel = 90000
keyboard module needs root permissions
Traceback (most recent call last):
File "autopilot.py", line 31, in <module>
tray()
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 73, in tray
keyboard.add_hotkey('home', start_action)
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/__init__.py", line 639, in add_hotkey
_listener.start_if_necessary()
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/__init__.py", line 196, in init
_os_keyboard.init()
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/_nixkeyboard.py", line 113, in init
build_device()
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device
ensure_root()
File "/home/speed/.local/lib/python3.6/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root
raise ImportError('You must be root to use this library on linux.')
ImportError: You must be root to use this library on linux.
when I run the script as root I get
Traceback (most recent call last):
File "autopilot.py", line 1, in <module>
from dev_tray import tray
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 43, in <module>
from pyautogui import size# see reference 6
File "/home/speed/.local/lib/python3.6/site-packages/pyautogui/__init__.py", line 94, in <module>
import mouseinfo
File "/home/speed/.local/lib/python3.6/site-packages/mouseinfo/__init__.py", line 149, in <module>
_display = Display(os.environ['DISPLAY'])
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/display.py", line 80, in __init__
self.display = _BaseDisplay(display)
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/display.py", line 62, in __init__
display.Display.__init__(*(self, ) + args, **keys)
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/protocol/display.py", line 129, in __init__
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":1": b'No protocol specified\n'
When starting the .exe it says "failed to execute script autopilot" and the log says the following:
INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=1920
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\username\Saved Games\Frontier Developments\Elite Dangerous\Journal.190608155143.01.log
DEBUG:root:ship={'time': 23393, 'status': 'in_supercruise', 'type': 'cobramkiii', 'location': 'Crucis Sector CL-Y c20', 'star_class': 'K', 'target': 'Kamuy', 'fuel_capacity': 16.0, 'fuel_level': 13.191662, 'fuel_percent': 82, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\username\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds`
How can I fix this?
Thank you!
I am not strong in python, and I hope that you will tell what could be the matter:
D:\EDAutopilot-master\src>python GetNavPointOffset.py
Traceback (most recent call last):
File "GetNavPointOffset.py", line 28, in
round(screenWidth *1/4) : round(screenWidth * 2/4)]
TypeError: slice indices must be integers or None or have an index method
D:\EDAutopilot-master\src>python GetDivertOffset.py
Traceback (most recent call last):
File "GetDivertOffset.py", line 27, in
round(screenWidth *1/4) : round(screenWidth * 2/4)]
TypeError: slice indices must be integers or None or have an index method
Hello :)
When i try to run the .exe file from my desktop i get "fatal error detected - failed to execute script autopilot"
I have made sure to bind all the primary keys, even used a custom binds profile. My screen is not standard resolution (2560x1080) but i have tried running in full screen, bordered and windowless in both 2560x1080 and 1920x1080, but still nothing works. tried your most recent build and the second most recent.
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=2560
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\M\Saved Games\Frontier Developments\Elite Dangerous\Journal.190506155621.01.log
DEBUG:root:ship={'time': 556, 'status': 'in_space', 'type': 'empire_courier', 'location': 'Straae Eohn TC-D c15-0', 'star_class': None, 'target': 'Straae Eohn VN-B c16-0', 'fuel_capacity': 8.0, 'fuel_level': 7.59, 'fuel_percent': 95, 'is_scooping': False}
Exception in thread EDAutopilot:
Traceback (most recent call last):
File "C:\Users\reyny\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "D:\Загрузки\203Null-EDAutopilot\dev_tray.py", line 22, in run
autopilot(stop_action)
File "D:\Загрузки\203Null-EDAutopilot\dev_autopilot.py", line 1212, in autopilot
align()
File "D:\Загрузки\203Null-EDAutopilot\dev_autopilot.py", line 857, in align
crude_align()
File "D:\Загрузки\203Null-EDAutopilot\dev_autopilot.py", line 869, in crude_align
off = get_navpoint_offset()
File "D:\Загрузки\203Null-EDAutopilot\dev_autopilot.py", line 645, in get_navpoint_offset
navpoint_width, navpoint_height = navpoint_template.shape[::-1]
AttributeError: 'NoneType' object has no attribute 'shape'
Can't make it work, shows this error
I'm configured all needed keys, but when i launch autopilot.py, got this error:
Traceback (most recent call last): File "autopilot.py", line 1, in <module> from dev_tray import tray File "C:\Users\Gabriel\Downloads\EDAutopilot-19.05.09-alpha-22\dev_tray.py", line 3, in <module> from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE File "C:\Users\Gabriel\Downloads\EDAutopilot-19.05.09-alpha-22\dev_autopilot.py", line 374, in <module> keys = get_bindings() File "C:\Users\Gabriel\Downloads\EDAutopilot-19.05.09-alpha-22\dev_autopilot.py", line 353, in get_bindings binding['key'] = SCANCODE[binding['pre_key']] KeyError: 'DIK_ACUTE'
But, what the key ACUTE??
Hello! Binded every key but still got an arror
Autopilot Log: https://pastebin.com/iPgjP84P
Binds: https://pastebin.com/QWuZ3VNS
so i activate it, it say's "Routing" for about 10 seconds (ive already set a route in game) "route complete" "aborting" then for a few milliseconds say's "aligning ship" then nothing happens
Hello Skai2,
thanks for your job,
that it can work in Elite Odyssey?
i tried to mail you, but you didn't answer.
so, sorry to make an issue track here, there is not possibility to PM
It did not even try to refuel, it just stopped, turned around ship and then located target.
Trying to run the autopilot script
Traceback (most recent call last):
File "autopilot.py", line 1, in <module>
from dev_tray import tray
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 41, in <module>
from src.directinput import * # see reference 5
File "/home/speed/Desktop/EDAutopilot/src/directinput.py", line 9, in <module>
SendInput = ctypes.windll.user32.SendInput
AttributeError: module 'ctypes' has no attribute 'windll'
Whenever I set a route it says Route Complete and then Aborting.
Then, my ship is slowed down to 0% and nothing happens.
What did I do wrong?
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.