Git Product home page Git Product logo

microsoft / airsim-neurips2019-drone-racing Goto Github PK

View Code? Open in Web Editor NEW
341.0 26.0 86.0 64.9 MB

Drone Racing @ NeurIPS 2019, built on Microsoft AirSim

Home Page: https://microsoft.github.io/AirSim-NeurIPS2019-Drone-Racing/

License: MIT License

Python 90.62% Shell 7.96% Dockerfile 1.42%
airsim neurips-competition drones drone-racing unreal-engine microsoft machine-learning computer-vision motion-planning robotics

airsim-neurips2019-drone-racing's Issues

Cannot run AirSimExe on Windows 7 with NVIDIA Quadro 400

Hello,
I tried to run AirSimExe on Windows 7 64 bit with NVIDIA Quadro 400 driver, installed version 340.52.
I got a warning to upgrade to version 398.36. Unfortunately it was not possible to install this version.
Runnung AirSimExe I've got the following Assertion error:
Assrtion failed: Resource
[File:D\Build++UE4\Sync\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11UniformBuffer.cpp] [Line: 257]
Invalid resource entry creating uniform buffer,
FViewUniformShaderParameters.Resources[48],ResourceType 0x6.

and the application crashed.

Is there any way to short-cut this assertion?

How is disqualification defined?

Hello,

I am having a hard time understanding the new rule for disqualification. For what I understood so far, the leading drone (closest to the next gate center) would disqualify the other drone if he got within the collision radius, but this seems not to be the case in the released binary. I need this information for my reward function to work accordingly.

Tier 1 waypoints for gates.

For Tier 1, are the gates/levels going to be fixed with what is provided in the example levels ?
If not is there going to be an API call that returns the pose of the next gate/all the gates ?

Error while trying to run baseline_racer.py

Hello, I just recently upgraded to airsimneurips v-0.20 in python. I am now getting this error while trying to run baseline_racer. Did I miss some pre-configuration?

Traceback (most recent call last): File "baseline_racer.py", line 284, in <module> main(args) File "baseline_racer.py", line 252, in main baseline_racer.initialize_drone() File "baseline_racer.py", line 63, in initialize_drone self.airsim_client.setTrajectoryTrackerGains(traj_tracker_gains.to_list(), vehicle_name=self.drone_name) File "D:\Softwares\Anaconda\envs\AirSimComp\lib\site-packages\airsimneurips\client.py", line 701, in setTrajectoryTrackerGains self.client.call('setTrajectoryTrackerGains', *((gains.to_list(),)+(vehicle_name,))) AttributeError: 'list' object has no attribute 'to_list'

What's the proper way to capture images for the competition?

Following Airsim Image API docs like the one here, when I run

# reshape array to 4 channel image array H X W X 4
img_rgba = img1d.reshape(response.height, response.width, 4)

I get this error:

img_rgba = img1d.reshape(response.height, response.width, 4)  
    ValueError: cannot reshape array of size 110592 into shape (144,256,4)  

It seems that the dimensions being returned are actually (144,256,3), and the image is also not inverted. I can capture and view images with:

responses = client.simGetImages([
        airsim.ImageRequest("0", airsim.ImageType.DepthVis),  #depth visualization image
        airsim.ImageRequest("1", airsim.ImageType.DepthPerspective, True), #depth in perspective projection
        airsim.ImageRequest("1", airsim.ImageType.Scene), #scene vision image in png format
        airsim.ImageRequest("1", airsim.ImageType.Scene, False, False)])  #scene vision image in uncompressed RGB array
response = responses[3]
img1d = np.fromstring(response.image_data_uint8, dtype=np.uint8)  # get numpy array
img_rgb = img1d.reshape(response.height, response.width, 3)  # reshape array to 3 channel image array H X W X 3
cv2.imshow('RGB',img_rgb)

but I wonder if you could point to updated Image API docs or give an example of how best to capture images in the context of the competition.
Thanks!

client.confirmConnection() fails

Hi, I get the following error

>>> import airsimneurips as airsim
>>> client = airsim.MultirotorClient()
>>> client.confirmConnection()
WARNING:tornado.general:Connect error on fd 7: ECONNREFUSED
WARNING:tornado.general:Connect error on fd 7: ECONNREFUSED
WARNING:tornado.general:Connect error on fd 7: ECONNREFUSED
WARNING:tornado.general:Connect error on fd 7: ECONNREFUSED
WARNING:tornado.general:Connect error on fd 7: ECONNREFUSED
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/miniconda/lib/python3.7/site-packages/airsimneurips/client.py", line 54, in confirmConnection
    if self.ping():
  File "/app/miniconda/lib/python3.7/site-packages/airsimneurips/client.py", line 24, in ping
    return self.client.call('ping')
  File "/app/miniconda/lib/python3.7/site-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "/app/miniconda/lib/python3.7/site-packages/msgpackrpc/future.py", line 43, in get
    raise self._error
msgpackrpc.error.TransportError: Retry connection over the limit

I'm running AirSim headless with a GPU accelerated X-server. When I take a screenshot it looks like this:
image

I can't interact with the UI to see what happens, though.

Maximum acceleration of drone

Hi,
While testing moveByAngleThrottle(), it appears that the maximum acceleration of the drone is ~1.7g which is low for a racing drone. Are you planing on modifying it or will it be the same throughout the competition? Or is the drag coefficient too high?
Cheers,
CT

RGB or RGBD cameras, what resolution?

Hi!

At competition_guidelines.md, Tier II: Perception Only, two RGB cameras mentioned ("Equipped with two RGB cameras"). So, no depth information or 'D' should be added?

At Tier III: Full Autonomy there is "Given forward and downward facing RBD cameras". Do you mean RGBD cameras? Is it a typo?

Thanks!

baseline_racer.py problem

Hi,

I am getting the following error when running the baseline script:

Traceback (most recent call last):
  File "baseline_racer.py", line 190, in <module>
    main(args)
  File "baseline_racer.py", line 166, in main
    baseline_racer.initialize_drone()
  File "baseline_racer.py", line 37, in initialize_drone
    self.airsim_client.setTrajectoryTrackerGains(traj_tracker_gains.to_list(), vehicle_name=self.drone_name)
  File "/home/charbel/.local/lib/python3.6/site-packages/airsimneurips/client.py", line 224, in setTrajectoryTrackerGains
    self.client.call('setTrajectoryTrackerGains', gains, vehicle_name)
  File "/home/charbel/.local/lib/python3.6/site-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "/home/charbel/.local/lib/python3.6/site-packages/msgpackrpc/future.py", line 45, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: server could not find function 'setTrajectoryTrackerGains' with argument count 2.

I git pulled all repos to make sure I have the latest versions.
Any Ideas?

Cheers,
CT

airsimneurips==0.0.14 doesn't work with corresponding AirSim-Linux.tar.gz

Repro instructions:

I'm looking at: https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/releases/tag/v0.1.2

  1. Download and unpack https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/releases/download/v0.1.2/AirSim-Linux.tar.gz and ZhangJiaJie.pak
  2. pip install airsimneurips==0.0.14
  3. python baseline_racer.py

I get the error:

sean:~/pg/game-of-drones/AirSim-NeurIPS2019-Drone-Racing/baselines % python baseline_racer.py
Connected!
Connected!
Traceback (most recent call last):
  File "baseline_racer.py", line 188, in <module>
    main(args)
  File "baseline_racer.py", line 164, in main
    baseline_racer.initialize_drone()
  File "baseline_racer.py", line 24, in initialize_drone
    self.airsim_client.enableApiControl(vehicle_name=self.drone_name)
  File "/home/sean/.local/lib/python2.7/site-packages/airsimneurips/client.py", line 49, in enableApiControl
    return self.client.call('enableApiControl', True, vehicle_name)
  File "/home/sean/.local/lib/python2.7/site-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "/home/sean/.local/lib/python2.7/site-packages/msgpackrpc/future.py", line 45, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'enableApiControl' (called with 2 arg(s)) threw an exception. The exception is not derived from std::exception. No further information available.
zsh: exit 1     python baseline_racer.py

Doing pip install airsimneurips==0.0.11 fixes the issue.

simGetObjectPose(gate_name) randomly returns nan

Hello,

I have been working quite a while on debugging an algorithm where 'nan' appeared randomly to finally find that this snippet from the baseline is responsible:

def get_ground_truth_gate_poses(self):
        gate_names_sorted_bad = sorted(self.airsim_client.simListSceneObjects("Gate.*"))
        gate_indices_bad = [int(gate_name.split('_')[0][4:]) for gate_name in gate_names_sorted_bad]
        gate_indices_correct = sorted(range(len(gate_indices_bad)), key=lambda k: gate_indices_bad[k])
        gate_names_sorted = [gate_names_sorted_bad[gate_idx] for gate_idx in gate_indices_correct]
        for gate_name in gate_names_sorted:
            p = self.airsim_client.simGetObjectPose(gate_name)
            assert not math.isnan(p.position.x_val), f"DEBUG: {gate_name} p.position.x_val is {p.position.x_val}"
            assert not math.isnan(p.position.y_val), f"DEBUG: {gate_name} p.position.y_val is {p.position.y_val}"
            assert not math.isnan(p.position.z_val), f"DEBUG: {gate_name} p.position.z_val is {p.position.z_val}"
        return [self.airsim_client.simGetObjectPose(gate_name) for gate_name in gate_names_sorted]

This randomly returns 'nan's on random gates after calling airsim_client.reset() repeatedly.

Regards,
Yann.

Random Airsim crash with segmentation fault after many iterations

Hello,

I am testing reinforcement learning approaches in Airsim, and during training Airsim randomly crashes with a segmentation fault. I don't really understand the error, what is happening here please?

The full Airsim terminal output is available at https://pastebin.com/Mrxk3dZy

The actual error output starts at line 750 I believe. It says:

[2019.09.18-21.47.57:359][549]LogOutputDevice: Warning:

Script Stack (2 frames):
CompManager_BP_C.ExecuteUbergraph_CompManager_BP
CompManager_BP_C.Reset

Failed to find symbol file, expected location:
"/home/yann/Desktop/GoD/AirSim/AirSimExe/Binaries/Linux/AirSimExe.sym"
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:/home/airsim/repos/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/Array.h] [Line: 611]
Array index out of bounds: 0 from an array of size 0
[2019.09.18-21.47.57:364][549]LogCore: Error: appError called: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:/home/airsim/repos/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/Array.h] [Line: 611]

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=118144 LargeMemoryPoolOffset=249280
[2019.09.18-21.47.57:375][549]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x00000000000042e3

[2019.09.18-21.47.57:375][549]LogCore: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:/home/airsim/repos/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/Array.h] [Line: 611]

0x0000000002ecc314 AirSimExe!UnknownFunction(0x2ccc313)
0x0000000002d4e66b AirSimExe!UnknownFunction(0x2b4e66a)
0x0000000002cee6d7 AirSimExe!UnknownFunction(0x2aee6d6)
0x0000000002cee4fd AirSimExe!UnknownFunction(0x2aee4fc)
0x0000000002730f93 AirSimExe!UnknownFunction(0x2530f92)
0x0000000002730abd AirSimExe!UnknownFunction(0x2530abc)
0x00000000027324ee AirSimExe!UnknownFunction(0x25324ed)
0x0000000002fd9ed7 AirSimExe!UnknownFunction(0x2dd9ed6)
0x0000000003102333 AirSimExe!UnknownFunction(0x2f02332)
0x0000000003102dfd AirSimExe!UnknownFunction(0x2f02dfc)
0x0000000003110ef9 AirSimExe!UnknownFunction(0x2f10ef8)
0x0000000003102dfd AirSimExe!UnknownFunction(0x2f02dfc)
0x0000000002fd9ed7 AirSimExe!UnknownFunction(0x2dd9ed6)
0x000000000310557e AirSimExe!UnknownFunction(0x2f0557d)
0x0000000004a19855 AirSimExe!UnknownFunction(0x4819854)
0x0000000002702d0b AirSimExe!UnknownFunction(0x2502d0a)
0x0000000002702bc1 AirSimExe!UnknownFunction(0x2502bc0)
0x00000000026a835b AirSimExe!UnknownFunction(0x24a835a)
0x0000000002b9229d AirSimExe!UnknownFunction(0x299229c)
0x0000000002b90f74 AirSimExe!UnknownFunction(0x2990f73)
0x00000000056a2201 AirSimExe!UnknownFunction(0x54a2200)
0x000000000569d1bb AirSimExe!UnknownFunction(0x549d1ba)
0x0000000004ffd538 AirSimExe!UnknownFunction(0x4dfd537)
0x0000000004e8756f AirSimExe!UnknownFunction(0x4c8756e)
0x000000000257664b AirSimExe!UnknownFunction(0x237664a)
0x000000000257cf5a AirSimExe!UnknownFunction(0x237cf59)
0x0000000005d9995f AirSimExe!UnknownFunction(0x5b9995e)
0x00007fbd18ca4b97 libc.so.6!__libc_start_main(+0xe6)
0x000000000256c029 AirSimExe!UnknownFunction(0x236c028)

[2019.09.18-21.47.57:387][549]LogExit: Executing StaticShutdownAfterError
[2019.09.18-21.47.57:403][549]LogCore: Warning: Unable to statfs('/home/yann/Desktop/GoD/AirSim/AirSimExe/Saved/Crashes/crashinfo-AirSimExe-pid-17123-027EF2E008D73C60573494863D049F27/AirSimExe.log'): errno=2 (No such file or directory)
Malloc Size=75426 LargeMemoryPoolOffset=324722
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

how to run aisrim using root user

Hello, i figured out how to use airsim without visualization. Now i was trying to run airsim in floydhub cloud . But it uses root user. How can i run airsim despite knowing only root user?

Which sim prefix functions are OK to use in which tiers?

I got confused with reading closed issues from July to here on. On here

#14

It says

For planning only tier, you'd get access to the ground truth poses of gates, but that would not be the case of tiers using perception

Which itself calls simListSceneObjects method/function. A prefix sim function. As far i know only sim related functions were simLoadLevel and simGetImage

#19

Stay tuned for an official release of whitelisted APIs for the competition, but as a general rule of thumb, APIs with the sim prefix will be blocked. The exceptions to this being simGetImage(s) and simLoadLevel

Can you post what is OK to use and what's not for each tier
thank you

Plot Transform

Hi, sorry for opening many issues, I am trying to get some help since this is my first experience in both Python and Airsim. After defining a Pose I called function plot_transform it did not work , please call this function and tell me whether it works or not

Open .pak files with UE4

Hi,
Is it possible to open the .pak files with Unreal Engine 4 in order to get ground-truth poses of gates and obstacles? I tried UnrealPak and other third party unpackers but they didn't work.
Cheers,
CT

Mysterious exception thrown with `enableApiControl`

Trace:

Traceback (most recent call last):
  File "baseline_racer.py", line 188, in <module>
    main(args)
  File "baseline_racer.py", line 164, in main
    baseline_racer.initialize_drone()
  File "baseline_racer.py", line 24, in initialize_drone
    self.airsim_client.enableApiControl(vehicle_name=self.drone_name)
  File "env/lib/python3.7/site-packages/airsimneurips/client.py", line 49, in enableApiControl
    return self.client.call('enableApiControl', True, vehicle_name)
  File "env/lib/python3.7/site-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "env/lib/python3.7/site-packages/msgpackrpc/future.py", line 45, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'enableApiControl' (called with 2 arg(s)) threw an exception. 
The exception is not derived from std::exception. No further information available.

Env:

  • Ubuntu
  • Neurips binary version: v0.1.2
  • airsimneurips version (from PyPI): 0.0.14

[Linux] AirSimExe only working if NOT windowed

Hi,

When running ./AirSimExe.sh in window mode in Ubuntu 18.04, once I choose the vehicle at the start, it crashes.
This does not happen if in full screen mode. However, if I am in full screen mode and try switching workplaces or alt-tab to the terminal it also crashes.
I have a Dell XPS 9560 (GTX1050 - latest Nvidia driver and Vulkan version).
The errors that appeared in the terminal:

[2019.07.26-18.38.32:291][  0]LogPawn: Error: EnableInput can only be specified on a Pawn for its Controller
[2019.07.26-18.38.32:557][  0]LogScript: Warning: Script Msg: Attempted to access index 0 from array 'CallFunc_GetAllActorsOfClass_OutActors' of length 0 in '/AirSim/Weather/WeatherFX/WeatherActor.WeatherActor_C:ExecuteUbergraph_WeatherActor'!
[2019.07.26-18.38.32:557][  0]LogStreaming: Error: Couldn't find file for package /AirSim/HUDAssets/MenuActor requested by async loading code. NameToLoad: /AirSim/HUDAssets/MenuActor
[2019.07.26-18.38.32:557][  0]LogStreaming: Error: Found 0 dependent packages...
[2019.07.26-18.38.32:557][  0]LogTemp: Warning: Warning, WeatherAPI got invalid menu actor class!
[2019.07.26-18.38.32:559][  0]LogTemp: PhysXCar
PhysXCar

And:

[2019.07.26-18.38.34:921][  0]LogCore: Error: appError called: Assertion failed:  [File:/home/airsim/repos/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanMemory.cpp] [Line: 243] 
Out of Device Memory, Requested=31552.00Kb MemTypeIndex=7

[2019.07.26-18.38.34:932][  0]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x00000000000034e7

[2019.07.26-18.38.34:932][  0]LogCore: Assertion failed:  [File:/home/airsim/repos/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanMemory.cpp] [Line: 243] 
Out of Device Memory, Requested=31552.00Kb MemTypeIndex=7

You can find the full crash report in the zip below,

Cheers,
CT

crash-info.zip

msgpackrpc.error.RPCError: rpclib: server could not find function 'simStartRace' with argument count 1.

Hi, I am trying to run baseline_racer.py, but I got an error.

The version of the api is the latest one after performing upgrade with pip as follows sudo pip3 install --upgrade airsimneurips and the repository's version is the master branch and the latest version.

My settings.json:

{
  "ClockSpeed": 1,
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
  "SettingsVersion": 1.2,
  "SimMode": "Multirotor",
  "Vehicles": {
    "drone_1": {
      "Cameras": {
        "fpv_cam": {
          "CaptureSettings": [
            {
              "FOV_Degrees": 90,
              "Height": 240,
              "ImageType": 0,
              "Width": 320
            }
          ],
          "Pitch": 0.0,
          "Roll": 0.0,
          "X": 0.25,
          "Y": 0.0,
          "Yaw": 0.0,
          "Z": 0.0
        }
      },
      "Pitch": 0.0,
      "Roll": 0.0,
      "VehicleType": "SimpleFlight",
      "X": 0.0,
      "Y": 0.0,
      "Yaw": 0.0,
      "Z": 0.0
    },
    "drone_2": {
      "Pitch": 0.0,
      "Roll": 0.0,
      "VehicleType": "SimpleFlight",
      "X": 0.0,
      "Y": 1.0,
      "Yaw": 0.0,
      "Z": 0
    }
  }
}

I got the following error:

  File "baseline_racer.py", line 283, in <module>
    main(args)
  File "baseline_racer.py", line 250, in main
    baseline_racer.start_race(args.race_tier)
  File "baseline_racer.py", line 41, in start_race
    self.airsim_client.simStartRace(tier)
  File "/usr/local/lib/python3.6/dist-packages/airsimneurips/client.py", line 132, in simStartRace
    self.client.call('simStartRace', tier)
  File "/usr/local/lib/python3.6/dist-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "/usr/local/lib/python3.6/dist-packages/msgpackrpc/future.py", line 45, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: server could not find function 'simStartRace' with argument count 1.

Also, I tried an older version of the api 0.0.14 and an older version of the repository v0.1.2, and it worked after some slight modifications in the code and there were no errors.

Thanks in advance.

Offline trajectory generation

Hi,

I was wondering if we are allowed to generate trajectories offline (which may take an hour) well before the start of the race, especially for tier 1 where gate positions are known. Granted, overtaking maneuvers will be added real-time.

Cheers,
CT

How to save and set the simulator state?

Hello,

I don't think this is actually possible right now because the closest things I find in the API are getMultirotorState(), getVehiclePose() and setVehiclePose() (I don't think these two last ones allow to save and set kinematics), but it would be useful for some Reinforcement Learning approaches if we could save a previous state and set it back.

Regards,
Yann.

cancelLastTask() issue

Hello,

I've got following error using client.cancelLastTask() method without any arguments

TypeError: cancelLastTask() takes 0 positional arguments but 1 was given

I'm using latest v0.1.2 relises

AirSim Executable Crashing Randomly After Several Baseline Racer Runs

Hello,

AirSim executable is randomly crashing after several baseline racer runs with the following error, anyone else having this issue? Is it system related?

F0806 22:04:04.803827 18871 polynomial_optimization_linear_impl.h:297] Check failed: segment_time > 0 (-nan vs. 0) Segment times need to be greater than zero *** Check failure stack trace: *** Signal 6 caught. Malloc Size=65538 LargeMemoryPoolOffset=65554 CommonUnixCrashHandler: Signal=6 Malloc Size=65535 LargeMemoryPoolOffset=131119 Malloc Size=118144 LargeMemoryPoolOffset=249280 Failed to find symbol file, expected location: "/home/${USER}/AirSimChallenge/AirSim/AirSimExe/Binaries/Linux/AirSimExe.sym" Malloc Size=66886 LargeMemoryPoolOffset=316182 Engine crash handling finished; re-raising signal 6 for the default handler. Good bye. Aborted (core dumped)

I'm running on Ubuntu18.04 with 64GB of RAM and a TitanXp 12GB VRAM GPU. Please advise. Thanks!

AirSim API environment navigation

After downloading paks of the environments, i followed tutorial in github. but I am facing some problems in changing the environments.
First one , after requesting a specific environment unreal starts loading but eventually it does not change it grey screen and drone only.
in python shell client.simLoadLevel('Building99').
Second one , is hard levels once I request specific hard levels python shell return an error says that you enter incorrect level names as follows.
raise ValueError("Allowed level names are: 'Building99', 'Soccer_Field', 'ZhangJiaJie', or 'MainMenu'")

thanks in advance

enableApiControl() issue

Hi,
After I updated to version 0.0.8 everything was working fine-ish (my controller didn't work anymore with moveByRollPitchYawrateThrottleAsync() - previously worked well with moveByAngleThrottle()). Before I tried to debug my code I updated to 0.0.11. Now, with version 0.0.11 I get the following error when doing client.enableApiControl(True, vehicle_name='drone_1') - or when running the baseline script :

Traceback (most recent call last):
  File "baseline_racer.py", line 190, in <module>
    main(args)
  File "baseline_racer.py", line 166, in main
    baseline_racer.initialize_drone()
  File "baseline_racer.py", line 25, in initialize_drone
    self.airsim_client.enableApiControl(True, vehicle_name=self.drone_name)
TypeError: enableApiControl() got multiple values for argument 'vehicle_name'

Any ideas?
Cheers,
CT

Which drone do I control for the validation leaderboard?

Hi,

When we upload the files for the validation leaderboard, which drone does it choose to publish its results?
Also, It seems as if the world reference frame for drone_2 is different then that of drone_1 and the one used to get gate poses. While testing, according to simGetVehiclePose drone_2 should be in the middle of the gate whereas it is not (translated by a constant vector). If you try baseline_racer with drone_2, you can see the issue.

Cheers,
CT

How to control (or at least speed up) time in the simulator?

Hello everyone,

So, I am experimenting with Reinforcement Learning strategies to develop a controller for the competition. Since this is very sample-intensive, I need to speed Airsim up as much as possible to generate as many samples as possible (for now I understand it only runs real-time?).

Is it possible to basically control time in airsimneurips, please?

This is an obvious requirement for making the engine more useful than the real world in training Machine Learning algorithms in general, and it seems people tried this in microsoft/AirSim#901 modifying the setting.json file, but I don't think we have access to this file?

Regards,
Yann.

AttributeError: 'MultirotorClient' object has no attribute 'getServerVersion'

Hi

this is my settings.json

{
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
  "SettingsVersion": 1.2,
  "SimMode": "Multirotor"
}

and im getting this error when using the example code given

[(base) C:\Users\wings>python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>> import air
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'air'
>>> import airsimneurips as airsim
>>> client = airsim.MultirotorClient()
>>> client.confirmConnection()
Connected!
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\wings\Miniconda3\lib\site-packages\airsimneurips\client.py", line 128, in confirmConnection
    server_ver = self.getServerVersion()
AttributeError: 'MultirotorClient' object has no attribute 'getServerVersion'
>>> import airsim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'airsim'
>>>
KeyboardInterrupt
>>>](url)

also to note that this works fine in another python env so its related to just the competition module

import airsim

# connect to the AirSim simulator 
client = airsim.MultirotorClient()

How to get/set the ground truth for gates sizes?

Hello everyone,

According to the competition guidelines, for difficulties medium and hard, the sizes of the gates will not be constant. How do we get the ground truth for these, please? I am basically simply trying to detect when the drone passes through a gate.

Also, is it possible to change these dimensions algorithmically?

Thanks,
Yann.

How to change API port

Hi!

I tried to change ApiServerPort via settings.json

    "drone_1": {
      "VehicleType": "SimpleFlight",
      "ApiServerPort": 41457,
      "Yaw": 0.0, 
      "Pitch": 0.0, 
      "Y": 0.0, 
      "X": 0.0, 
      "Z": 0.0, 
      "Roll": 0.0
    }

and create client like this
self.airsim_client = airsim.MultirotorClient(ip = "my_ip", port=41457)

But connection only works with port=41451, so it looks like "ApiServerPort": 41457 in settings.json doesn't work.

Thanks!

Neurips Lottery Questions

Hi,

As I understand it, we have to win the lottery to be able to attend NeurIPS and compete in the live event. This means that even if one qualifies in first place, there is no garantee that he will be able to compete in the live event.

  1. What are the odds of the lottery?
  2. Is there a way to make competing in the live event without being physically present at the conference possible?

Cheers,
CT

moveOnSplineAsync is not work

I created my waypoints to navigate drone from a to b, I command moveOnSplineAsync(waypoints)
but drone did not move at all, please check it and let me know if this profound function is working or not ???

Using AirSim Images with NumPy example fails

I was trying out the example "Using AirSim Images with NumPy" (https://microsoft.github.io/AirSim/docs/image_apis/) but it failed. What's the problem here?

Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from airsimneurips import ImageRequest
>>> import airsimneurips as airsim
>>> client = airsim.MultirotorClient()
>>> client.confirmConnection()
Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

>>> # client.simLoadLevel('Soccer_Field_Easy')  
... # client.simLoadLevel('Soccer_Field_Medium')        
... # client.simLoadLevel('ZhangJiaJie_Medium')
... client.simLoadLevel('Building99_Hard')
True
>>> 
>>> responses = client.simGetImages([ImageRequest("0", airsim.ImageType.Scene, False, False)])
>>> response = responses[0]
>>> 
>>> # get numpy array
... img1d = np.fromstring(response.image_data_uint8, dtype=np.uint8) 
__main__:2: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
>>> 
>>> # reshape array to 4 channel image array H X W X 4
... img_rgba = img1d.reshape(response.height, response.width, 4)  
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ValueError: cannot reshape array of size 110592 into shape (144,256,4)

Different Training and Testing environments?

Will the environments used in the final competition be the exact same as the training environments? In case the maps of the final competition environment are the same but the gate placement would be different, would there be a way to randomize gate placement during training to help with generalization?

jupyter lab doesnt run properly with airsim

Hello, I wanted to run jupyter lab and /or jupyter notebook with airsim. But there are some problems with these two.. When I install airsim, i cannot run jupyter notebook properly. and also vice versa..can you tell me the proper version of jupyter for airsim so that i can run both well?

simGetObjectPose() crashes

Hello,

Since Friday, the simulator has become unusable for me because simGetObjectPose() crashes, and therefore I cannot get the gate poses.

What I get is basically:

import airsimneurips as airsim
client = airsim.MultirotorClient()
client.confirmConnection()
Connected!
client.simLoadLevel('Soccer_Field_Easy')
True
client.simGetObjectPose('gate_01')
Traceback (most recent call last):
File "", line 1, in
File "/home/yann/anaconda3/lib/python3.7/site-packages/airsimneurips/client.py", line 221, in simGetObjectPose
pose = self.client.call('simGetObjectPose', object_name)
File "/home/yann/anaconda3/lib/python3.7/site-packages/msgpackrpc/session.py", line 41, in call
return self.send_request(method, args).get()
File "/home/yann/anaconda3/lib/python3.7/site-packages/msgpackrpc/future.py", line 45, in get
raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'simGetObjectPose' (called with 1 arg(s)) threw an exception. The exception is not derived from std::exception. No further information available.

Methods Results

I was trying some methods in documentation but python shell responds Object has no attribute , it seems that it does not exist ?? any solution for that guys.

Thanks in advance

How to run several instances of AirSim in parallel?

Hello,

I am having issues on trying to launch several instances of AirSim in parallel on my machine (say, one per GPU for example) and to communicate with them through the Python API as I will eventually need to do this on a cluster to train RL algorithms. Is there any easy way of doing this, please?

Regards,
Yann.

Baseline enableApiControl error

I am getting the following error while running the baseline, I have already updated the binaries and packages.

Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

False
Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

Traceback (most recent call last):
File "baseline_racer.py", line 190, in
main(args)
File "baseline_racer.py", line 166, in main
baseline_racer.initialize_drone()
File "baseline_racer.py", line 25, in initialize_drone
self.airsim_client.enableApiControl(vehicle_name=self.drone_name)
File "/usr/local/lib/python3.5/dist-packages/airsimneurips/client.py", line 85, in enableApiControl
return self.client.call('enableApiControl', True, vehicle_name)
File "/usr/local/lib/python3.5/dist-packages/msgpackrpc/session.py", line 41, in call
return self.send_request(method, args).get()
File "/usr/local/lib/python3.5/dist-packages/msgpackrpc/future.py", line 45, in get
raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'enableApiControl' (called with 2 arg(s)) threw an exception. The exception is not derived from std::exception. No further information available.

AirSim Windows Binary won't open (missing nlopt-0.dll)

Attempting to open the AirSim binary on my machine gives the following System Error:
"The code execution cannot proceed because nlopt-0.dll was not found. Reinstalling the program may fix this problem."

Using a RoG Zephyrus gx701 with Windows 10 Pro v1809 and haven't had issues with other UE4 games.

What subset of the API are we allowed to use?

The API offers many functions. Which ones will be allowed in the competition?

>>> client.sim
client.simCharGetAvailableFaceExpressions(  client.simCharResetBonePose(                client.simCharSetSkinAgeing(                client.simGetGroundTruthEnvironment(        client.simGetVehiclePose(                   client.simSetObjectPose(
client.simCharGetBonePose(                  client.simCharSetBonePose(                  client.simCharSetSkinDarkness(              client.simGetGroundTruthKinematics(         client.simIsPause(                          client.simSetPose(
client.simCharGetBonePoses(                 client.simCharSetBonePoses(                 client.simContinueForTime(                  client.simGetImage(                         client.simListSceneObjects(                 client.simSetSegmentationObjectID(
client.simCharGetFaceExpression(            client.simCharSetFaceExpression(            client.simDestroyObject(                    client.simGetImages(                        client.simLoadLevel(                        client.simSetTimeOfDay(
client.simCharGetHeadRotation(              client.simCharSetFacePreset(                client.simEnableWeather(                    client.simGetObjectPose(                    client.simPause(                            client.simSetVehiclePose(
client.simCharGetSkinAgeing(                client.simCharSetFacePresets(               client.simGetCameraInfo(                    client.simGetPose(                          client.simPrintLogMessage(                  client.simSetWeatherParameter(
client.simCharGetSkinDarkness(              client.simCharSetHeadRotation(              client.simGetCollisionInfo(                 client.simGetSegmentationObjectID(          client.simSetCameraOrientation(   

bug report and how to change graphic settings?

Bug = --enable_plot_transform parameter is not in latest code yet still in github page. Please remove it

Also how to change graphic settings , my laptop having hard time with current settings would love to change graphic quality and render quality before train

Running AirSim headless

HI,

I'm trying to run AirSim headless using VirtualGL, but I'm having some problems because I need to use the flag -opengl3 and this generates some errors related to the shaders ('uncooked' stuff... I'm not used to Unreal engine).
Error using the flag for OpenGL3:

[2019.07.18-02.54.35:620][  0]LogShaders: Error: The global shader cache file '/home/test/Airsim-Linux/Engine/GlobalShaderCache-GLSL_150.bin' is missing.

Your application is built to load COOKED content. No COOKED content was found; This usually means you did not cook content for this build.
It also may indicate missing cooked data for a shader platform(e.g., OpenGL under Windows): Make sure your platform's packaging settings include this Targeted RHI.

Alternatively build and run the UNCOOKED version instead.

... and this seems to be related to the unchecked project packaging option Share Material Shader Code.

Error without the flag:

[2019.07.18-02.57.33:109][  0]LogRHI: Error: OpenGL 4.3 not supported by driver

BTW, the env variables:

export SDL_VIDEODRIVER_VALUE=offscreen
export SDL_HINT_CUDA_DEVICE=0

...don't make any difference on my system.

Would you have any hints on how to run AirSim headless (or a free-of-charge way to use the Azure AirSim headless option)?

Thanks in advance!

Cheers,
Ricardo

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.