saihv / AirSimMulti

Slightly modified version of Microsoft Airsim with focus on simulating multiple UAVs
Other
14 stars 7 forks source link

Guidelines to use just 2 drones in Airsim #1

Open geevargs opened 7 years ago

geevargs commented 7 years ago

I am trying to implement the AirsimMulti in an unreal environment and it works but I just want to use 2 drones simultaneously in the simulation. There are 5 drones that are inherently there and if I delete the 3 I don't and remove the code for drone 3 -5 it crash's and doesn't just show two drones.

If there is anyway you can tell me how to execute just 2 drones without the split screen.I care about only one and I am sending data using UDP to both.

Any help would be appreciated.

saihv commented 7 years ago

Could you elaborate on which parts of the code you tried to change in order to simulate only 2 UAVs?

If you cloned the swarm branch and you want to change the number of UAVs, you can open BP_SimModeWorldMultiRotor.uasset inside Unreal: there you can see 5 spawn blocks for 5 UAVs. You can remove the last three blocks and then you’ll only have two UAVs. Similarly, adding more such blocks will simulate more UAVs, and you will also have to add more PlayerStart icons in Unreal corresponding to this number. To make it easier, I would recommend you try checking out the '3uav' branch. Please let me know if you run into any further issues.

geevargs commented 7 years ago

I removed the BP_flyingpawn from 3 to 5 and the PIP camera's from 3 to 5 . Then I went into the BP_SimModeWorldMultiRotor.uasset and removed 3 to 5. The compiled it and then I ran Airsim; after which it crashes immediately. I will get more details to you shortly. I appreciate all the help. Regards, Sujith Mathew

On Thu, Jul 27, 2017 at 1:52 PM, Sai Vemprala notifications@github.com wrote:

Could you elaborate on which parts of the code you tried to change in order to simulate only 2 UAVs?

If you cloned the swarm branch and you want to change the number of UAVs, you can open BP_SimModeWorldMultiRotor.uasset inside Unreal: there you can see 5 spawn blocks for 5 UAVs. You can remove the last three blocks and then you’ll only have two UAVs. Similarly, adding more such blocks will simulate more UAVs, and you will also have to add more PlayerStart icons in Unreal corresponding to this number. To make it easier, I would recommend you try checking out the '3uav' branch. Please let me know if you run into any further issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saihv/AirSimMulti/issues/1#issuecomment-318483177, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab4Y3fzAPdo1aHXgydE29nRLA-jdlXwvks5sSPingaJpZM4Okq7I .

--


PRIVATE AND CONFIDENTIAL - NOTICE TO RECIPIENT: THIS E-MAIL IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, AND MAY BE A COMMUNICATION PRIVILEGE BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, ANY REVIEW, USE, DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS EMAIL IS STRICTLY PROHIBITED. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND PLEASE DELETE THIS MESSAGE FROM YOUR SYSTEM.

saihv commented 7 years ago

You can leave the FlyingPawn and PIPCamera assets as it is, because SimModeMultiRotor will only use the ones it needs. You can look at what error is causing it to crash in the bottom right of Visual Studio (usually an output log)

geevargs commented 7 years ago

[image: Inline image 2]

[image: Inline image 3]

It says access violation writing location 0x000000000000154

On Thu, Jul 27, 2017 at 4:08 PM, Sai Vemprala notifications@github.com wrote:

You can leave the FlyingPawn and PIPCamera assets as it is, because SimModeMultiRotor will only use the ones it needs. You can look at what error is causing it to crash in the bottom right of Visual Studio (usually an output log)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saihv/AirSimMulti/issues/1#issuecomment-318511556, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab4Y3XK8-i5HNGDo-PInIaXJlPzmCLfLks5sSRhugaJpZM4Okq7I .

--


PRIVATE AND CONFIDENTIAL - NOTICE TO RECIPIENT: THIS E-MAIL IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, AND MAY BE A COMMUNICATION PRIVILEGE BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, ANY REVIEW, USE, DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS EMAIL IS STRICTLY PROHIBITED. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND PLEASE DELETE THIS MESSAGE FROM YOUR SYSTEM.

geevargs commented 7 years ago

It worked before I deleted the 3-5 drone in SimModeMultiRotor and now it throws this exception handling error.

On Thu, Jul 27, 2017 at 5:12 PM, Sujith Mathew sujith@airspace.co wrote:

[image: Inline image 2]

[image: Inline image 3]

It says access violation writing location 0x000000000000154

On Thu, Jul 27, 2017 at 4:08 PM, Sai Vemprala notifications@github.com wrote:

You can leave the FlyingPawn and PIPCamera assets as it is, because SimModeMultiRotor will only use the ones it needs. You can look at what error is causing it to crash in the bottom right of Visual Studio (usually an output log)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saihv/AirSimMulti/issues/1#issuecomment-318511556, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab4Y3XK8-i5HNGDo-PInIaXJlPzmCLfLks5sSRhugaJpZM4Okq7I .

--


PRIVATE AND CONFIDENTIAL - NOTICE TO RECIPIENT: THIS E-MAIL IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, AND MAY BE A COMMUNICATION PRIVILEGE BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, ANY REVIEW, USE, DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS EMAIL IS STRICTLY PROHIBITED. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND PLEASE DELETE THIS MESSAGE FROM YOUR SYSTEM.

geevargs commented 7 years ago

I don't want the screen divided into 4...I just want 2 drones to be there and I feed commands to each. Have the normal view that the original Airsim Has.

saihv commented 7 years ago

I cannot view the images you posted, could you please upload them again? Regarding the other issues:

  1. Did you also remove the corresponding Player Start icons when you removed the 3-5 drone spawn blocks? Can you see the images from all cameras on the bottom?

  2. Looks like your Unreal Engine has split screen on. In that case, you should go to Unreal Engine -> Settings -> Project Settings -> Maps & Modes and uncheck splitscreen.

geevargs commented 7 years ago

image

geevargs commented 7 years ago

image 1

geevargs commented 7 years ago

Did you also remove the corresponding Player Start icons when you removed the 3-5 drone spawn blocks? Can you see the images from all cameras on the bottom? No I didn't remove the assets in the content manager but removed them in the SimModemultirotor. the main screen is static and does not move.The right and left are controllable and the middle one is dark. It shows FPV view for the one I control and the collision physics is not right because it goes right through the landscape when I try to land but I checked with the original Airsim and it works just fine in the same environment.

It still gives that exception error after running it for a few mins.

geevargs commented 7 years ago

image

geevargs commented 7 years ago

Almost there....the collision physics is off or not working...It falls right through the landscape.

saihv commented 7 years ago

The camera view in the middle being black is normal: because I map each sub view to the FPV of an individual drone, so with two quadrotors, one of the subviews becomes unnecessary. The collision check problem is interesting though: so when you spawn the drones, they fall straight through the ground? Could you also please test on the Minimal world (Unreal default world created when you create a new project) and see if the same problem happens?

PS: By the way, the two FPV images look almost identical: did you make sure you have two separate PlayerStarts in Unreal before flying the drones?

saihv commented 7 years ago

I just made a new branch (2uav) that focuses only on 2 UAVs. Perhaps that will make things easier.

geevargs commented 7 years ago

image21

geevargs commented 7 years ago

I used the default LandscapeMountains and the drones initialize underneath the landscape. I literally flies out to the landscape.

saihv commented 7 years ago

Did you make sure your PlayerStarts are a certain altitude away from the ground? I don't seem to have any collision problems with mine:

1111

geevargs commented 7 years ago

image34

geevargs commented 7 years ago

collision works for the 1st drone but I control the second drone and that flies literally through the mountains.

geevargs commented 7 years ago

image

geevargs commented 7 years ago

Collision not working it is falling thru the ground....It worked in one instance.. Which is weird.

geevargs commented 7 years ago

image

geevargs commented 7 years ago

The picture above shows the what happens in the beginning.

saihv commented 7 years ago

Can you check what happens with the default environment (MinimalDefault: the one in my screenshot)?

geevargs commented 7 years ago

image

geevargs commented 7 years ago

In the minimal default environment and I tried moving the player start up and above the ground.

saihv commented 7 years ago

Unfortunately, I am not able to replicate your problem. Are you using actual PIXHAWKs in HIL? Which version of firmware are you running on them?

geevargs commented 7 years ago

Yes I use one pixhawk px4 fmu V2 and firmware version 1.6.5 and the other one I control using udp python client SITL.

On Tue, Aug 1, 2017 at 1:03 PM, Sai Vemprala notifications@github.com wrote:

Unfortunately, I am not able to replicate your problem. Are you using actual PIXHAWKs in HIL? What firmware are you running on them?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saihv/AirSimMulti/issues/1#issuecomment-319480410, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab4Y3YfUfDTGzAZ4KJ7VgojTP1aCsYQSks5sT4SPgaJpZM4Okq7I .

--


PRIVATE AND CONFIDENTIAL - NOTICE TO RECIPIENT: THIS E-MAIL IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, AND MAY BE A COMMUNICATION PRIVILEGE BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, ANY REVIEW, USE, DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS EMAIL IS STRICTLY PROHIBITED. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND PLEASE DELETE THIS MESSAGE FROM YOUR SYSTEM.

saihv commented 7 years ago

My PIXHAWKs run version 1.4.4, because I've had problems with firmware versions higher than that with this version of AirSim. Would it be possible to try with that?

EDIT: I've checked with some other versions and PX4 firmware 1.6.3 works better.