julianneswinoga / flightgear-python Goto Github PK
View Code? Open in Web Editor NEWInterface package to the FlightGear flight simulation software aimed at simplicity
License: MIT License
Interface package to the FlightGear flight simulation software aimed at simplicity
License: MIT License
For the native protocols (FDM, Ctrls, Gui) we force the user to manually enter the protocol version, and we bail out if the version number in the message doesn't match.
However the version number is the first couple bytes of every message. We could dynamically parse this and then decide how to parse the rest of the message.
This would require restructuring how we represent the native interface structures (I think?) which would be annoying, but overall the benefit would be fantastic for usability ๐
Supporting Python 3.6 is now becoming a large hassle and my personal use case for using 3.6 is no longer needed.
I try to run a basic FDM example, but I get an error:
Traceback (most recent call last):
File "C:\Users\Grishin\PycharmProjects\pythonProject1\FDM_TEST.py", line 25, in <module>
fdm_conn.start() # Start the FDM RX/TX loop
File "C:\Users\Grishin\PycharmProjects\pythonProject1\venv\lib\site-packages\flightgear_python\fg_if.py", line 118, in start
self.rx_proc.start()
File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'construct.core.Pass'>: it's not the same object as construct.core.Pass
Process finished with exit code 1
What can I do to fix it?
python version: 3.8 (I also tested on 3.11.2 but nothing changed)
my start options: --fdm=null --max-fps=30 --native-fdm=socket,out,30,,5501,udp --native-fdm=socket,in,30,,5502,udp
When I work via telnet everything is fine
Can just copy configuration from https://github.com/julianneswinoga/ecobee_train_sim/blob/master/pyproject.toml#L1
Like tests/test_props_connection.py
a test for the new HTTPConnection
class would be fantastic.
They both interface with FlightGear's property tree so there is a lot of shared code. This will probably involve renaming PropsConnection
to something like TelnetConnection
and creating a shared base class (named something like PropertyConnectionBase
)
Thank you for this project. Seems very interesting.
I'm trying out the examples. Simple_fdm.py seems to work as expected.
However, if I run simple_gui.py I receive an error:
line 2728, in _parse raise ConstError(f"parsing expected {repr(self.value)} but parsed {repr(obj)}", path=path) construct.core.ConstError: Error in path (parsing) -> version parsing expected 8 but parsed 402653184
And if I run simple_ctrls.py I get an error:
line 2728, in _parse raise ConstError(f"parsing expected {repr(self.value)} but parsed {repr(obj)}", path=path) construct.core.ConstError: Error in path (parsing) -> version parsing expected 27 but parsed 24
These errors don't really explain what is wrong, or what to do about it.
Any additional guidance would be appreciated.
Thanks,
Is there a documentation for this?
As shown in #9 CircleCI did not trigger a build. For easier community contributions this is required.
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.