Compiled AirSim Plugin
aqibsaeed opened this issue · 10 comments
Hi,
Could you provide compiled airsim plugin that is compatible with Unreal 4.18.3. I tried several things to compile it from source from but build is failing due to missing Eigen library.
So that issued is solved and AirSim complied successfully but now when I copy plugin to airlearning-ue4 and run the command to make the project it fails. "AirLearning could not be compiled. Try rebuilding from source manually"
@srivatsankrishnan could you please guide me?
@aqibsaeed
Did you run this `move.py' script? We made some changes to the airsim plugin and the types and client.py needs to be replaced in the original airsim plugin. The move.py script takes care of it. Can you give this a try and let me know if this works?
https://github.com/harvard-edge/airlearning-rl/tree/dcd8a39f77992873f49b6872aa534a64a2bfa23a
@srivatsankrishnan Thank you for the response.
I did not reach to RL part yet. If I start/play the environment within Unreal it renders the drone and environment but drone does not move/fly with keyboard. Is it the default behavior that drone only fly if when we run data generation script?
Yes, unfortunately the UE4 (AirSim for that matter) does not take the keyboard inputs and translate to the drone control APIs (See below).
As a simple test you can try running this script:
https://github.com/harvard-edge/airlearning-rl/blob/dcd8a39f77992873f49b6872aa534a64a2bfa23a/test_suites/move.py
You can change the variables in the following API if you want something specific. Currently it randomly generates the x, y values and makes the drone fly. In reality, you want your autonomy algorithm (or RL) to generate those for you.
client.moveToPositionAsync(x, y, -6, 1, yaw_mode=airsim.YawMode(False, 0)).join()
Ah! Thanks for clarifying it! I will give it a try.
I spent a decent time on installing/re-installing everything again and again as I thought this is an issue with the installation.
Could you please also point which version of airsim
you used?
https://github.com/harvard-edge/airlearning-rl/tree/dcd8a39f77992873f49b6872aa534a64a2bfa23a
Installing latest version for python3.5 and tensorflowv1.8 throws following error:
Using cached https://files.pythonhosted.org/packages/4e/cf/8d77947faa031d39a791cc9de4c136c2975babbaf8f52c5a8ec59cd01f23/airsim-1.6.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\aqib_\AppData\Local\Temp\pip-install-mmksucyx\airsim\setup.py", line 2, in <module>
from airsim import __version__
File "C:\Users\aqib_\AppData\Local\Temp\pip-install-mmksucyx\airsim\airsim\__init__.py", line 1, in <module>
from .client import *
File "C:\Users\aqib_\AppData\Local\Temp\pip-install-mmksucyx\airsim\airsim\client.py", line 3, in <module>
from .utils import *
File "C:\Users\aqib_\AppData\Local\Temp\pip-install-mmksucyx\airsim\airsim\utils.py", line 208
logging.error(f"Writing PNG file {filename} failed")
^
SyntaxError: invalid syntax
Installed airsim 1.2.4
. If I run move.py
I get following:
WARNING:tornado.general:Connect error on fd 312: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 312: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 312: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 312: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 312: WSAECONNREFUSED
....
msgpackrpc.error.TransportError: Retry connection over the limit
Got it! I had to run UE and click play before running move.py.
Thanks for the help :)