-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PX4 + AirSim + QGC #3167
Comments
Hi @eggbread, from the screenshot, it seems like you're executing Also, which version of the Cygwin Toolchain are you using? |
Hello @ahmed-elsaharti, {
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"Vehicles": {
"Drone1": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4560,
"ControlPort": 14580,
"VehicleSysID": 10,
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165,
"COM_OBL_ACT": 1
}
},
"Drone2": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4560,
"ControlPort": 14580,
"VehicleSysID": 20,
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165,
"COM_OBL_ACT": 1
}
}
}
} But the only one drone can be connected with QGC. I saw your suggestion #1599 |
@eggbread sorry for the late reply. I tried to look into using multiple drones with SITL. The main issue I found was that Also, I think the settings file you're using would be slightly problematic since its spawning both drones at the same point and makes them both use the same TCP port to connect to PX4 which would cause a conflict (as seen on the on-screen log in AirSim).
This would offset the spawn points and use two different ports. |
@ahmed-elsaharti I tried like what you said. |
@eggbread I think I found a way to make this work.
To kill the instances run The simulation was slightly wonky but I think it should work. |
Forgot to mention, I had to get rid of the entire
section for this to work |
@ahmed-elsaharti {
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"Vehicles": {
"Drone1": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4560,
"ControlPort": 14580,
"VehicleSysID": 10,
"X": 0,
"Y": 1,
"Z": 0
},
"Drone2": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4561,
"ControlPort": 14580,
"VehicleSysID": 20,
"X": 0,
"Y": -1,
"Z": 0
}
}
} I am really appreciate for you help :) |
@eggbread here's my settings.json:
the only difference I see are make sure you wait a couple of seconds after QGroundControl confirms the connection before launching the UE4 environment |
Also, then open another Cygwin terminal -> cd to Firmware -> execute: |
@ahmed-elsaharti Here is my sequence.
It shows continue |
@eggbread did you change the settings.json file? I get the same errors but I'm able to upload and execute a mission before the errors cause disturbance in the behavior of the drone. Try running the |
@ahmed-elsaharti {
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"Vehicles": {
"Drone1": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4560,
"ControlPort": 14580,
"X": 0,
"Y": 1,
"Z": 0
},
"Drone2": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"UseTcp": true,
"TcpPort": 4561,
"ControlPort": 14580,
"X": 0,
"Y": -1,
"Z": 0
}
},
"OriginGeopoint": {
"Latitude": 47.641468,
"Longitude": -122.140165,
"Altitude": 0
}
} |
I'm not sure why its not obtaining GPS lock in your case. Try giving it more time? |
Could you give me version what you use? |
@eggbread sorry for replying late. Also, glad it worked on Ubuntu. If you want to do more testing with the Windows version, could you try to reclone the PX4 repo into a new folder and try rebuilding to see if it makes any difference if you start from the beginning? |
@ahmed-elsaharti |
@eggbread Good find! Also, I found a mistake in my instructions, instead of And yes, I did notice that the PX4 documentation does not mention how Airsim could be run in Multi-Vehicle mode so I'm thinking of trying to submit a PR here with some of that info added to the docs in case others miss this thread while searching through the issues on the repo. And I'm always glad to be of help 😊 |
Hi, @ahmed-elsaharti |
Hi again @eggbread , I dont think airsim has anything like that at the moment, but i think you could create your own using the drone location |
@ahmed-elsaharti |
Hello again @eggbread I was able to run PX4 SITL and have the takeoff command work fine: |
@ahmed-elsaharti |
Hello,
I am trying to set up the AirSim with multi drones + PX4 sitl + QGC.
OS : Window
Tool :
Cygwin Toolchain for PX4(v1.10.1).
Visual Studio 2019
QGC(Latest)
AirSim(Latest)
I followed up the instruction here
I think, After I done the
make px4_sitl_default nonoe_iris
,It is supposed to be show the message. As shown below
But In my case, It just shows
It seems mavlink doesn't work.
I have tried changing the setting, make again, and so on.
What's the matter? and What should I do?
BTW, In my ubuntu desktop, The mavlink works. But I couldn't send the command via QGC. Because It shows "takeoff denied"
Thank you for your cooperation. I am waiting for your help serously.
The text was updated successfully, but these errors were encountered: